Are there any items that may be a null and cause it to crash?
|
Hello, Rune-Server people
recently i been having problem my server is a spawn server with 120+ Players
I got a small ::item bug
Some how this kid will not stop he keep doing ::item (something here) (somethinghere) that he keep making the server d.c
The server is not DDOSED because nonce the server d.c i got access to my dedi with no lagg or anything
He said he is doing something to the ::item commands i need to fix this problem fast thank you.
Because it might take some time to fix, disable the command for now (first).
Do you get an error? And please post the ::item code
Code:if (playerCommand.startsWith("item") && c.playerRights >= 0) { try { String[] args = playerCommand.split(" "); if(c.inWild()) { c.sendMessage("You cant spawn in this area."); return; } else if (args.length == 3) { int newItemID = Integer.parseInt(args[1]); int newItemAmount = Integer.parseInt(args[2]); if ((newItemID <= 20000) && (newItemID >= 0)) { c.getItems().addItem(newItemID, newItemAmount); } else { c.sendMessage("No item found."); } } else { c.sendMessage("Invalid useage. Use as; ::item 391 1"); } } catch(Exception e) { }
Nick, told me on MSN that if a certain player spawns an quantity of 2 billion it will dc the server. Have you tried making a restriction so you can't spawn over 2 billion in quantity?
there no error in the cmdCode:if (playerCommand.startsWith("item") && c.playerRights >= 0) { try { String[] args = playerCommand.split(" "); if(c.inWild()) { c.sendMessage("You cant spawn in this area."); return; } else if (args.length == 3) { int newItemID = Integer.parseInt(args[1]); int newItemAmount = Integer.parseInt(args[2]); if ((newItemID <= 20000) && (newItemID >= 0)) { c.getItems().addItem(newItemID, newItemAmount); } else { c.sendMessage("No item found."); } } else { c.sendMessage("Invalid useage. Use as; ::item 391 1"); } } catch(Exception e) { }
Why don't you make it so people only with player rights > than 2 can use the command..?
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |