Allow control items in GUIs that they don't control

This commit is contained in:
NichtStudioCode 2022-02-27 21:20:06 +01:00
parent 22e74bc0b1
commit e88e92a325

@ -27,10 +27,7 @@ public abstract class ControlItem<G extends GUI> extends BaseItem {
@SuppressWarnings("unchecked")
public void setGui(Object gui) {
if (this.gui != null)
throw new IllegalStateException("The GUI is already set. (One ControlItem can't control multiple GUIs)");
this.gui = (G) gui;
if (this.gui == null) this.gui = (G) gui;
}
}