Thread: Ruse player panel not updating

Results 1 to 5 of 5
  1. #1 Ruse player panel not updating 
    Registered Member Sam0553's Avatar
    Join Date
    Sep 2018
    Posts
    7
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    On my quest tab player panel the server time and player count is not updating anyone can help? It only shows the correct time when i re-log

    playerpanel.java
    Code:
    public class PlayerPanel {
          public static void refreshPanel(Player player) {
    
                int counter = 39159;
                player.getPacketSender().sendString(counter++, "@or2@Time: @gre@"+Misc.getCurrentServerTime()+" GMT");
                player.getPacketSender().sendString(counter++, "@or2@Players: @gre@"+World.getPlayers().size());
    Reply With Quote  
     

  2. #2  
    Software Developer

    Tyrant's Avatar
    Join Date
    Jul 2013
    Age
    24
    Posts
    1,562
    Thanks given
    678
    Thanks received
    423
    Rep Power
    1060
    perhaps the function is never being called.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Banned
    Join Date
    Mar 2018
    Posts
    43
    Thanks given
    16
    Thanks received
    1
    Rep Power
    0
    When will people learn that ruse is ass
    Reply With Quote  
     

  5. #4  
    nice


    Join Date
    Jul 2014
    Posts
    740
    Thanks given
    382
    Thanks received
    562
    Rep Power
    4239
    Quote Originally Posted by harley_rae_ann View Post
    When will people learn that ruse is ass
    has nothing to do with 'ruse'
    Reply With Quote  
     

  6. #5  
    Extreme Donator


    Join Date
    Aug 2016
    Posts
    597
    Thanks given
    109
    Thanks received
    96
    Rep Power
    254
    You have to place the refreshPanel somewhere that is automatically updated by the server if you want it to update pretty consistently. Or you can just place that one sendString method if you want it to be a less intensive load if your player panel is pretty big. In World.java you should already have methods that do this, but the id's are most likely wrong or they're just commented out like mine are

    Code:
    public static void updateServerTime() {
    	//players.forEach(p -> p.getPacketSender().sendString(39161, "@cya@Server time: @cya@[ @whi@" + Misc.getCurrentServerTime() + "@cya@ ]"));
    }
    
    public static void updatePlayersOnline() {
    	//players.forEach(p -> p.getPacketSender().sendString(39160, "@cya@Players online:   @cya@[ @whi@" + (int) (players.size() * 1.0) + "@cya@ ]"));
    	players.forEach(p -> p.getPacketSender().sendString(57003, "Players:  @gre@" + (int) (World.getPlayers().size() * 1.0) + ""));
    }
    You should check to see if you have those methods already, but if not, then you can place it in PlayerProcess, ServerTimeUpdateTask, or anywhere thats updated periodically pretty much
    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. Replies: 1
    Last Post: 09-09-2018, 09:28 AM
  2. Replies: 12
    Last Post: 07-01-2016, 08:50 PM
  3. Players online not updating
    By Cryptic7th in forum Help
    Replies: 11
    Last Post: 07-17-2013, 06:51 AM
  4. Players online not updating?
    By Aim High in forum Help
    Replies: 2
    Last Post: 11-01-2012, 07:16 PM
  5. [PI] players online not updating
    By haydar25 in forum Help
    Replies: 14
    Last Post: 07-07-2012, 03:43 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
  •