Thread: PvP Spawn command

Results 1 to 2 of 2
  1. #1 PvP Spawn command 
    Donator
    Historical's Avatar
    Join Date
    Jan 2012
    Posts
    334
    Thanks given
    89
    Thanks received
    17
    Rep Power
    18
    Well i'm making a pvp server but i need the item command where everyone can pickup & also there is restricted items. Yes it was released i just can't seem to find it
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Jan 2012
    Posts
    388
    Thanks given
    28
    Thanks received
    24
    Rep Power
    0
    Code:
    if (playerCommand.startsWith("item")) {
    				if (c.inWild())
    					return;
    				try {
    				String[] args = playerCommand.split(" ");
    				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);
    						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) {
    			}
    This is the item command and you can add the restricted items on your own.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 17
    Last Post: 01-01-2011, 02:19 AM
  2. Replies: 107
    Last Post: 12-27-2010, 05:42 AM
  3. Replies: 7
    Last Post: 11-09-2010, 12:54 AM
  4. Replies: 13
    Last Post: 11-08-2010, 09:29 PM
  5. Replies: 6
    Last Post: 11-06-2010, 01:04 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •