|
Okay, so basically i've made my own way of setting your player rights from settings.java
EG:
However, in players.java it has it's own way as well by isOwner, isAdmin (ETC, you get the picture). How may i make it so i don't have to do the effort of changing every single isOwner parts, and just customizing the isOwner variable itself..Code:public static final String IS_OWNER = "Qwerty"; public static final String IS_HEAD_MOD = ""; public static final String IS_MOD1 = ""; public static final String IS_MOD2 = ""; public static final String IS_MOD3 = ""; public static final String IS_HEAD_ADMIN = ""; public static final String IS_ADMIN1 = ""; public static final String IS_ADMIN2 = ""; public static final String IS_PLAYER_SUPPORT = "";
The problem with this is that setRights does not work in this situation (I know it's because it has no variable), but how can i make it so setRights works? there is a setRights variable in players.java
]
this is the setRights thing
I also commented out thisCode:public void setRights(int rights) { this.rights = rights; }
this is because i'm now going to use this for setting the rightsCode:/*if (isOwner() && !isAdmin()) { setRights(2);//SETS THE ACCOUNT TO OWNER PERMISSIONS }*/
when it works of courseCode:public boolean isOwner() { if (getUsername().equalsIgnoreCase(Settings.IS_OWNER)) { setRights = 2; } return false; }
hmm.. testing them now, and yes I do know there's a difference
EDIT: seems like no errors, perhaps works... but i don't know, considering this server base is garbage lol, it crashes every time you try to login, or even if you're in game.. definitely need a new 718/742 base that isn't so bad
Ahahaha, I never learnt java, i'm taking a programming course right now, but i've never learnt this in my life, working on C#, Visual Basic, HTML, CSS and JavaScript... never Java, sorry if I'm annoying if I post in the help section for help, I don't care if you want to go against me and say i'm bad, because it's true, I don't know java, I want to learn, lmao
EDIT: And also the base i'm using is a bit.. eh, I wasn't lying about that, it has a lot of problems.. It crashes during logging in, black screens happen often.. all sorts
The other base I was using which was 718/830 (Valkyr) was so much better, but I wanted to use a nice 718/742 base
:: A lot of people on here help you well, and it does help you learn too.. not sure why it wouldn't
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |