so i didnt like the idea of keep having to add
Code:
if (username.equalsIgnoreCase("Your Name Here"))
{
rights = 2;
}
too make staff so i developed and easier way to handle the staff and here it is
go into player
src/com/rs/game/player/player.java
find this
Code:
public void init(Session session, String username, int displayMode,
int screenWidth, int screenHeight) {
and in that void got to the bottem and underneath this
Code:
if (Settings.DEBUG)
Logger.log(this, "Initiated Player: " + username + ", pass: "
+ password);
add this
Code:
for(String s : Settings.ADMINS) {
final String[] ADMINS = {"james", "jimmy", "roger"}; {
setRights(3);
}
}
for(String s : Settings.MODS) {
final String[] MODS = {"beanhead", "ben", "tupac"}; {
setRights(2);
}
}
now that parts done
goto
src/com/rs/settings.java
and add this
Code:
public static final String[] ADMINS = {"james", "jerry", "roger"};
public static final String[] MODS = {"ben", "beanhead", "tupac"};
you can add anywhere but i added under this
Code:
public static String[] STAFF_ITEMS = { };
well there you go remember to change names
EDIT:
this will be demoting NOTE its not the best way but meh it works so there
Code:
for(String s : Settings.DEMOTE) {
final String[] DEMOTE = {""}; {
setRights(0);
}
}
Code:
public static final String[] DEMOTE = {""};
To make this work remove the player from there staff position add them to the demote list and then compile and then when they login they will be normal player you can then keep or remove them from that list