Thread: OS Royale Ban Help

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 OS Royale Ban Help 
    Registered Member
    Join Date
    Mar 2012
    Posts
    710
    Thanks given
    19
    Thanks received
    5
    Rep Power
    37
    Solved.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Feb 2015
    Posts
    15
    Thanks given
    0
    Thanks received
    0
    Rep Power
    10
    You're checking if the player is muted?

    "if (player.punishment.isMuted()) {"
    Reply With Quote  
     

  3. #3  
    Software Developer

    Tyrant's Avatar
    Join Date
    Jul 2013
    Age
    24
    Posts
    1,562
    Thanks given
    678
    Thanks received
    423
    Rep Power
    1060
    Try seeing where world is currently full check appends and then do it there (the evaluate part)
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Mar 2012
    Posts
    710
    Thanks given
    19
    Thanks received
    5
    Rep Power
    37
    Quote Originally Posted by Savisaar View Post
    You're checking if the player is muted?

    "if (player.punishment.isMuted()) {"
    I changed it to banned. Sorry, but same issue.

    Quote Originally Posted by Tyrant View Post
    Try seeing where world is currently full check appends and then do it there (the evaluate part)
    In this class? The main problem is that you cannot use player class here. I don't know why.
    Reply With Quote  
     

  5. #5  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    What is your issue current? That you can still log in even though you have ban time?
    Cause if it is about ban time, you'll need to make it send a return code about being banned.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Mar 2012
    Posts
    710
    Thanks given
    19
    Thanks received
    5
    Rep Power
    37
    Quote Originally Posted by arch337 View Post
    What is your issue current? That you can still log in even though you have ban time?
    Cause if it is about ban time, you'll need to make it send a return code about being banned.
    I updated the thread. Please take a look now.
    Reply With Quote  
     

  7. #7  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by i am here View Post
    I updated the thread. Please take a look now.
    try to debug: "player.punishment.isBanned()" and see that it is set to true when attempt to login.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Mar 2012
    Posts
    710
    Thanks given
    19
    Thanks received
    5
    Rep Power
    37
    Quote Originally Posted by arch337 View Post
    try to debug: "player.punishment.isBanned()" and see that it is set to true when attempt to login.
    It does print in the file that the user is banned. If the values are -1, then player is not banned.

    The below is in my player file.

    Code:
      "ban-start": 1523060337679,
      "ban-duration": 86400000,
    Also, the code is there. The isBanned method is as follows.

    Code:
        public boolean isBanned() {
            return banStart > 0 && System.currentTimeMillis() - banStart < banDuration;
        }

    Also, I tried to see if it would let me talk if I put it in ChatMessagePacketListener class, and it doesn't. So it works for sure.

    Code:
    		if (player.punishment.isBanned()) {
    			player.send(new SendMessage("You are currently banned and can not talk!"));
    			return;
    		}
    Reply With Quote  
     

  9. #9  
    Registered Member
    Remi's Avatar
    Join Date
    Jan 2015
    Posts
    628
    Thanks given
    572
    Thanks received
    212
    Rep Power
    574
    Code:
    		if (player.punishment.isBanned()) {
    			player.send(new SendMessage("You are currently banned and can not talk!"));
    			return;
    		}
    [/QUOTE]

    If the player is banned how can they talk, change it back to if (player.punishment.isMuted()) {
    Where the fuck is my cigarettes, I need my cancer. [C]44..
    Reply With Quote  
     

  10. #10  
    Banned OS Royale Ban Help Market Banned


    Join Date
    Feb 2018
    Posts
    824
    Thanks given
    9
    Thanks received
    236
    Rep Power
    0
    Code:
    } else if(parts[0].equals("ban")) {
    			String player2 = command.substring(parts[0].length() + 1);
    			Player plr = World.getPlayerByName(player2);
    			if(!PlayerSaving.playerExists(player2) && plr == null) {
    				player.getPacketSender().sendMessage("Player "+player2+" is not online.");
    				return;
    			}
    			if(PlayerPunishment.banned(player2)) {
    				player.getPacketSender().sendMessage("Player "+player2+" already has an active ban.");
    				if(plr != null) {
    					plr.logout();
    				}
    				return;
    			}
    			PlayerPunishment.ban(player2);
    			player.getPacketSender().sendMessage("Player "+player2+" was successfully banned. Command logs written.");
    			if(plr != null) {
    				plr.logout();
    			}
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. Ban help 525
    By Ramsin in forum Help
    Replies: 1
    Last Post: 07-12-2009, 10:54 PM
  2. ip banned help.
    By diamond hits in forum Forum Related Help
    Replies: 1
    Last Post: 04-26-2009, 11:01 PM
  3. royale client help model adding
    By Simon in forum Help
    Replies: 0
    Last Post: 02-03-2009, 10:35 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •