Purpose: How to add in user title's when using ::yell
Difficulty: 1/10 - Very simple even for a nub (c)
Assumed Knowledge: How to copy and paste
Server Base: Project [Beta]
Classes Modified: Client.java
Procedure
Step 1: Add this into client.java anywhere:
So now when you use ::yell , it should look like this:Code:String playerTitle = "";
if(playerRights == 3)
playerTitle = "[OWNER]";
if(playerRights == 2)
playerTitle = "[ADMINISTRATOR]";
if(playerRights == 1)
playerTitle = "[MODERATOR]";
if(playerName.equals("PLAYERNAME HERE"))
playerTitle = "[PLAYER TITLE HERE]";
PlayerHandler.messageToAll = playerTitle+""+playerName+": "+command.substring(5);
}
}
Player right examples:
[OWNER]Dune: hello
[ADMINISTRATOR]Dune: hello
[MODERATOR]Dune: hello
Playername examples:
[DONATOR]Dune: hello
[VETERAN]Dune: hello
Credits: Dune 99% , 1% Morsolo - Cause he said he posted a tut very similar a year an a half ago..
Simple, but effective ;)
~Dune
