Skip to content

Commit 524e990

Browse files
committed
Fix concurrent modification exception by allowing public access to
unRender()
1 parent 24ed14a commit 524e990

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

standmodels/src/main/java/uk/lewdev/standmodels/StandModelLib.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public void destroy() {
104104
this.events.forEach(event -> HandlerList.unregisterAll(event));
105105
this.events = null;
106106

107-
this.modelManager.getModels().forEach(model -> this.getModelManager().removeModel(model));
107+
this.modelManager.getModels().forEach(model -> model.unRender());
108108
this.modelManager = null;
109109
}
110110

standmodels/src/main/java/uk/lewdev/standmodels/model/Model.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ protected final void render() {
177177
this.instructions.forEach(ins -> this.stands.add(ins.spawnStand(this.center.clone(), this.rotation)));
178178
}
179179

180-
protected final void unRender() {
180+
public final void unRender() {
181181
if (!this.isRendered()) {
182182
return;
183183
}

0 commit comments

Comments
 (0)