mirror of
https://github.com/CarmJos/UserPrefix.git
synced 2026-06-04 23:43:29 +08:00
优化代码
This commit is contained in:
@@ -55,11 +55,11 @@ public class GUI {
|
||||
case FIVEBYNINE:
|
||||
this.items = new GUIItem[45];
|
||||
break;
|
||||
default:
|
||||
case SIXBYNINE:
|
||||
this.items = new GUIItem[54];
|
||||
break;
|
||||
case CANCEL:
|
||||
default:
|
||||
this.items = null;
|
||||
}
|
||||
}
|
||||
@@ -167,17 +167,7 @@ public class GUI {
|
||||
if (this.type == GUIType.CANCEL) {
|
||||
throw new NullPointerException("被取消或不存在的GUI");
|
||||
}
|
||||
switch (type) {
|
||||
default:
|
||||
case ONEBYNINE:
|
||||
case TWOBYNINE:
|
||||
case THREEBYNINE:
|
||||
case FOURBYNINE:
|
||||
case FIVEBYNINE:
|
||||
case SIXBYNINE:
|
||||
inv = Bukkit.createInventory(null, this.items.length, this.name);
|
||||
break;
|
||||
}
|
||||
inv = Bukkit.createInventory(null, this.items.length, this.name);
|
||||
|
||||
for (int index = 0; index < this.items.length; index++) {
|
||||
if (items[index] == null) {
|
||||
|
||||
Reference in New Issue
Block a user