Message to Mods and Admins Void!
OK, i've seen a few servers that dont have anything like this so i'm releasing mine!
Purpose: To add a working message to mods void!
Difficulty: 1/10 Very easy!
Server Base: I used Pimpscape, but should work on all!
Class's modified: Client!
Credits: All to me!!
Think i leeched? i can assure you i didn't
1: Search for:
Code:
public class client extends Player implements Runnable {
It should be very close to the top
2: Paste this directly underneath it
Code:
public void messagetomods(String modmess){
for (Player p : server.playerHandler.players) //initilizes question
{
if(p != null) //is player not a null?
{
client person = (client)p; //referal substring
if((person.playerName != null || person.playerName != "null")) //makes the process do the same for all users
{
if (person.playerRights >= 1)// makes the process do only for mods
{
person.sendMessage(modmess); //sends message
}
}
}
}
}
3: Pat yourself on the back, YOUR DONE!
How to Use: Put this in any cases, commands or any kind of process!
Code:
messagetomods("HI MODS MESSAGE HERE");