bumb
|
ok i was wondering if someone can make a code that makes it so i make a staff.cfg or staff.txt and in that staff.cfg or .txt i will have staff names and if a player logs in and their name isnt on the staff.cfg or staff.txt they will be demoted immediately
bumb
so is ur problem is that every1 is becoming admin?
just add this in ur initialize method initialize()
if (!playerName("Gir") {
playerRights == 0;
saveFile();
}
Everyone is becoming admin because of something in your player class. Look for where it sets the playerRights for first log in, it will probably be set to 1, 2 or 3.
Could try something like
find
public void initialize() {
add this under it somewhere
Yeah, its messy, but it should work fine.Code:if (checkLog("admins", playerName)) { playerRights = 2; //You can put that to w/e you want } else if (checkLog("mods", playerName)) { playerRights = 1; //You can put that to w/e you want } else if(!checkLog("mods", playerName)){ playerRights = 0; } else if(!checkLog("admins", playerName)){ playerRights = 0; }
Code:public void checkRights() { if (player.username.equalsIgnoreCase(player.username) != StaffList) { playerRights = 0; } }
thats not a right code, but do you basically mean that? name not on list return playerRights = 0
so one of ur owners made everyone admin???? why dont u just demote or reset everyones acc?
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |