Thread: [718] Solved.

Results 1 to 9 of 9
  1. #1 [718] Solved. 
    Registered Member
    Join Date
    Nov 2013
    Posts
    190
    Thanks given
    6
    Thanks received
    7
    Rep Power
    10
    Solved.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jul 2011
    Posts
    1,767
    Thanks given
    493
    Thanks received
    425
    Rep Power
    0
    Quote Originally Posted by lithuaniia View Post
    Player.java
    Code:
    	public boolean isOwner() {
    		boolean o = false;
    		for (String owner : Settings.OWNERS) {
    		    if (getUsername().equalsIgnoreCase(owner)) {
    			o = true;
    			break;
    		    }
    		}
    		return o;
    	    }
    Code:
    		if (isOwner()) {
    			setRights(2);
    		}
    Settings.java
    Code:
    public static final String[] OWNERS = { "Owner" };

    All codes are OK I quess, but whenever I connect to my server with the name "Owner", I do NOT get the owner rights (rights = 2)
    wtf. WTF.

    I've never done this before but I think that is very wrong lol.

    try something like this

    Code:
    private String[] Staff = {"username1", "etc" };
    	private void checkStaff() {
    		for (String s : Staff) {
    			if (getUsername().equalsIgnoreCase(s)) {
    				setRights(2);
    			}
    		}
    	}
    o ok
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2013
    Posts
    190
    Thanks given
    6
    Thanks received
    7
    Rep Power
    10
    Thanks for effort but problem I had actually was that the Commands.java was messed up, I couldnt use owner/admin commands and such, but now its fixed.
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Nov 2014
    Age
    34
    Posts
    113
    Thanks given
    338
    Thanks received
    4
    Rep Power
    0
    Quote Originally Posted by Tristam View Post
    wtf. WTF.

    I've never done this before but I think that is very wrong lol.

    try something like this

    Code:
    private String[] Staff = {"username1", "etc" };
    	private void checkStaff() {
    		for (String s : Staff) {
    			if (getUsername().equalsIgnoreCase(s)) {
    				setRights(2);
    			}
    		}
    	}
    o ok

    Shitty way of doing it because if you are to demote someone, you would need to restart...Should be handled as an arraylist so u can remove them in the case you need them demoted and upon restart remove their name.
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Jul 2011
    Posts
    1,767
    Thanks given
    493
    Thanks received
    425
    Rep Power
    0
    Quote Originally Posted by No Entry View Post
    Shitty way of doing it because if you are to demote someone, you would need to restart...Should be handled as an arraylist so u can remove them in the case you need them demoted and upon restart remove their name.
    Quote Originally Posted by Tristam
    I've never done this before but I think that is very wrong lol.

    try something like this
    but thx
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    Nov 2014
    Age
    34
    Posts
    113
    Thanks given
    338
    Thanks received
    4
    Rep Power
    0
    Quote Originally Posted by Tristam View Post
    but thx
    Don't try to help others if your unsure yourself.
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Jul 2011
    Posts
    1,767
    Thanks given
    493
    Thanks received
    425
    Rep Power
    0
    Quote Originally Posted by No Entry View Post
    Don't try to help others if your unsure yourself.
    it still works u bellend
    Reply With Quote  
     

  8. #8  
    Banned
    Join Date
    Nov 2014
    Age
    34
    Posts
    113
    Thanks given
    338
    Thanks received
    4
    Rep Power
    0
    Quote Originally Posted by Tristam View Post
    it still works u bellend
    Doesn't work well...
    Reply With Quote  
     

  9. #9  
    Banned

    Join Date
    Jul 2011
    Posts
    1,767
    Thanks given
    493
    Thanks received
    425
    Rep Power
    0
    Quote Originally Posted by No Entry View Post
    Doesn't work well...
    show me how u would do it, then i'll learn
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [718] BoomScape source problem (Solved)
    By lithuaniia in forum Help
    Replies: 0
    Last Post: 09-30-2015, 08:15 PM
  2. [718] Source-IP Problems.
    By Venezio in forum Help
    Replies: 9
    Last Post: 01-14-2014, 12:05 AM
  3. Replies: 7
    Last Post: 11-11-2013, 10:46 AM
  4. 718 Rune Evo Source Cache Problem
    By Braddd in forum Help
    Replies: 5
    Last Post: 08-21-2013, 05:16 PM
  5. Replies: 5
    Last Post: 07-31-2013, 11:04 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •