Maybe try going into the commands and changing the player rights for "item" or if that doesn work probably in config.java is spawnserver = true changes to false
|
I have xerascape source. Currently everyone can spawn, I don't know why. But how can i make normal players/moderators not able to spawn items?
Maybe try going into the commands and changing the player rights for "item" or if that doesn work probably in config.java is spawnserver = true changes to false
Customize the spawn command, as in, add an extra necessary condition
Something like
if ((playerCommand....etc) && (playerRights >= 2)) {
................................
}
in your coomands.java file search ("item"). If it says "if(playerCommand.startsWith("item") && c.playerRights == 0) {" simply change the 0 to a 2, like this "if(playerCommand.startsWith("item") && c.playerRights == 2) {" and that will allow admins and up to spawn. If its already set on 2 then go to your config.java and look got like playerspawn or server spawn, if it says = true; just change "true" to false. Hope I could help
Maybe a bit late, but here you go
Code:if (playerCommand.startsWith("item")) && (c.playerRights >= 2)) { try { String[] args = playerCommand.split(" "); if (args.length == 3) { int newItemID = Integer.parseInt(args[1]); int newItemAmount = Integer.parseInt(args[2]); if ((newItemID <= 25000) && (newItemID >= 0)) { c.getItems().addItem(newItemID, newItemAmount); System.out.println("Spawned: " + newItemID + " by: " + c.playerName); } else { c.sendMessage("No such item."); } } else { c.sendMessage("Use as ::item 995 200"); } } catch (Exception e) { } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |