I'm trying to run my plugin on my server, but when it gets enabled, an error occurs. Here's the stacktrace (bottom to top): As for that part where it specifies line 39 in my code (lines 31-56): Code: @Override public void onEnable(){ String enability = "enabled"; ScoreboardManager sbManager = Bukkit.getScoreboardManager(); Scoreboard sBoard = sbManager.getNewScoreboard(); Inventory wrGadget2Inv = Bukkit.createInventory(null, 9, ChatColor.GREEN + "Choose a gadget!"); Inventory wrGadget1Inv = Bukkit.createInventory(null, 9, ChatColor.GREEN + "Choose a gadget!"); Inventory wrPrimaryInv = Bukkit.createInventory(null, 9, ChatColor.GREEN + "Choose a primary weapon!"); Inventory wrCustomInv = Bukkit.createInventory(null, 9, ChatColor.GREEN + "Choose which item to customize!"); Inventory customizeInv = Bukkit.createInventory(null, 9, ChatColor.GREEN + "Choose a class to customize!"); Inventory AGclassInv = Bukkit.createInventory(null, 9, ChatColor.GREEN + "Choose a Class!"); Team team1 = sBoard.registerNewTeam("Red Team"); Team team2 = sBoard.registerNewTeam("Yellow Team"); onInventoryClick(null, team1, team2, "enabled", wrGadget2Inv, wrGadget1Inv, wrPrimaryInv, wrCustomInv, customizeInv, AGclassInv); onCommand(null, null, null, "enabled", null); onPlayerQuit(null, team1, team2); int playerCount; playerCount = Bukkit.getOnlinePlayers().length; if(enability == "enabled"){ if(playerCount == 6){ thing1.arenaStart(null, team1, team2); }else if(playerCount <= 5){ thing1.arenaWait(team1, team2); } } }
The problem is that you have an inventory title that has more than 32 characters and this throws an exception Code: 17.06 10:49:45 [Server] INFO java.lang.IllegalArgumentException: Title cannot be longer than 32 characters
Well here is the error Code: Title cannot be longer than 32 characters You are try to set a title from the inventory longer than 32 characters. Remember 1 color needs 2 characters.
I counted this one: Code:java Inventory wrCustomInv = Bukkit.createInventory(null, 9, ChatColor.GREEN + "Choose which item to customize!"); Looks right around 32 charachters. I would try and make it shorter.