示例#1
0
  public void openKitMenu(ArcadePlayer player) {
    Player rawPlayer = player.getPlayer();
    Inventory inv =
        Bukkit.createInventory(
            null, ArcadeHandler.getInstance().getCurrentGame().getKits().size(), "Pick your kits!");

    for (Kit kit : ArcadeHandler.getInstance().getCurrentGame().getKits()) {
      inv.addItem(
          new ItemBuilder(
                  kit.getDisplayItem().getType(), 1, kit.getName(), (short) 0, kit.getDesc())
              .build());
    }
    rawPlayer.openInventory(inv);
  }
示例#2
0
 public Kit getKit(ArcadePlayer player) {
   if (playerKits.get(player) != null) {
     return playerKits.get(player);
   } else {
     return ArcadeHandler.getInstance().getCurrentGame().getKits().get(0);
   }
 }