forked from SteamWar/SteamWar
@@ -182,7 +182,8 @@ public class GUI {
|
|||||||
}
|
}
|
||||||
Kit prototype = Kit.getAvailableKits(Fight.getFightPlayer(p).isLeader()).get(0);
|
Kit prototype = Kit.getAvailableKits(Fight.getFightPlayer(p).isLeader()).get(0);
|
||||||
PersonalKit kit = PersonalKit.create(user.getId(), Config.GameModeConfig.Schematic.Type.toDB(), s, prototype.getInventory(), prototype.getArmor());
|
PersonalKit kit = PersonalKit.create(user.getId(), Config.GameModeConfig.Schematic.Type.toDB(), s, prototype.getInventory(), prototype.getArmor());
|
||||||
PersonalKitCreator.openKitCreator(p, kit);
|
p.closeInventory();
|
||||||
|
Bukkit.getScheduler().runTask(FightSystem.getPlugin(), () -> PersonalKitCreator.openKitCreator(p, kit));
|
||||||
});
|
});
|
||||||
anvilInv.open();
|
anvilInv.open();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class PersonalKit {
|
|||||||
|
|
||||||
public ItemStack[] getArmor(){
|
public ItemStack[] getArmor(){
|
||||||
YamlConfiguration config = YamlConfiguration.loadConfiguration(new StringReader(getRawArmor()));
|
YamlConfiguration config = YamlConfiguration.loadConfiguration(new StringReader(getRawArmor()));
|
||||||
return Objects.requireNonNull(config.getList("Armor")).toArray(new ItemStack[0]);
|
return Objects.requireNonNull(config.getList("Armor")).toArray(new ItemStack[4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInUse() {
|
public void setInUse() {
|
||||||
|
|||||||
Reference in New Issue
Block a user