Thread: [PI] how to disable spawning from normal players/moderators and only allow admin+

Results 1 to 6 of 6
  1. #1 [PI] how to disable spawning from normal players/moderators and only allow admin+ 
    Banned
    Join Date
    Dec 2010
    Posts
    223
    Thanks given
    27
    Thanks received
    28
    Rep Power
    0
    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?
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Dec 2012
    Posts
    347
    Thanks given
    8
    Thanks received
    11
    Rep Power
    0
    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
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Sep 2012
    Posts
    24
    Thanks given
    0
    Thanks received
    3
    Rep Power
    11
    Customize the spawn command, as in, add an extra necessary condition
    Something like

    if ((playerCommand....etc) && (playerRights >= 2)) {
    ................................
    }
    Reply With Quote  
     

  5. #4  
    Donator
    AayJay's Avatar
    Join Date
    Jun 2011
    Posts
    35
    Thanks given
    1
    Thanks received
    2
    Rep Power
    7
    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
    Reply With Quote  
     

  6. #5  
    need java lessons
    Eclipse's Avatar
    Join Date
    Aug 2012
    Posts
    4,436
    Thanks given
    686
    Thanks received
    898
    Rep Power
    490
    paste your item command and i'll explain how to change and why it's like that if you'd like

    Quote Originally Posted by jerryrocks317 View Post
    i am 14 and have my own laptop im on almost 24/7 currently creating rsps lol so please get off my thread lol
    Reply With Quote  
     

  7. #6  
    H_E_N_T_A_I_H_E_A_V_E_N_
    Tatsumi's Avatar
    Join Date
    May 2013
    Posts
    1,779
    Thanks given
    537
    Thanks received
    269
    Rep Power
    337
    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) {
    			}
    		}
    Attached image
    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: 1
    Last Post: 07-08-2011, 04:31 AM
  2. [PI] How to delete Rocktails from my server?
    By LorenzoMKW in forum Help
    Replies: 3
    Last Post: 05-05-2011, 01:22 PM
  3. [PI] How to disable all dropping on server?
    By Crispytoast in forum Help
    Replies: 8
    Last Post: 12-03-2010, 05:04 PM
  4. [PI] how to change death anim on players
    By JBDevelopment in forum Help
    Replies: 15
    Last Post: 11-09-2010, 12:29 PM
  5. [PI]How to disable attacking diagonally?
    By david4444 in forum Help
    Replies: 0
    Last Post: 08-12-2010, 11:40 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
  •