Part A
Members only Yell and making yell Display If player is member.
Making Yell members only:
Open up client.java and find
Code:
if (command.startsWith("yell")
Replace the whole command with this to make yelling members only:
Code:
if (command.startsWith("yell") && playerIsMember == 1) {
PlayerHandler.messageToAll = (""+playerName+": "+command.substring(5)+":chalreq:");
}
if (command.startsWith("yell") && playerIsMember == 0) {
sendMessage("You need to be a member to use this feature.");
}
If you want to make it display the players membership status in the yell you would simply change the yell command to this:
Code:
if (command.startsWith("yell") && playerIsMember == 1) {
PlayerHandler.messageToAll = ("Member "+playerName+": "+command.substring(5)+":chalreq:");
}
else if (command.startsWith("yell") && playerIsMember == 0) {
PlayerHandler.messageToAll = ("Free Player "+playerName+": "+command.substring(5)+":chalreq:");
}
Part B
Making Members/Non-Members worlds
In client.java in the world you want to be members only, find:
Code:
public int readSave() {
Next, somewhere in that void add this:
Code:
if(playerIsMember == 0) {
returnCode = 12; //cannot log into a members world
disconnected = true;
}