Thread: Update

Results 1 to 8 of 8
  1. #1 Update 
    Donator
    Malmo's Avatar
    Join Date
    Sep 2013
    Age
    30
    Posts
    24
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    When I use the update command, the timer appears but it doesn't countdown. It just simply stays at "System update in: X:XX"

    Command that I'm using:

    Code:
    if(client.getPrivileges() == 3) {
    		PlayerManager.updateSeconds = (Integer.parseInt(command.substring(7)));
    		PlayerManager.updateAnnounced = false;
    		PlayerManager.updateRunning = true;
    		PlayerManager.updateStartTime = System.currentTimeMillis();
    		GameEngine.getGlobalActions().sendMessage("System updating...");
    	}
    Source: Project No-Doze by Killamess (Shard based)

    Anyone any idea on why this is happening and how to fix it?
    Reply With Quote  
     

  2. #2  
    MasterPkz

    Join Date
    Dec 2013
    Posts
    63
    Thanks given
    4
    Thanks received
    7
    Rep Power
    19
    Code:
    if (playerCommand.startsWith("update")) {
    				c.sendMessage("@red@The server is being restarted in order for updates to occur");
    				String[] args = playerCommand.split(" ");
    				int a = Integer.parseInt(args[1]);
    				PlayerHandler.updateSeconds = a;
    				PlayerHandler.updateAnnounced = false;
    				PlayerHandler.updateRunning = true;
    				PlayerHandler.updateStartTime = System.currentTimeMillis();
    			}
    Is what I use for mine.
    Reply With Quote  
     

  3. #3  
    Donator
    Malmo's Avatar
    Join Date
    Sep 2013
    Age
    30
    Posts
    24
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Quote Originally Posted by iNick View Post
    Code:
    if (playerCommand.startsWith("update")) {
    				c.sendMessage("@red@The server is being restarted in order for updates to occur");
    				String[] args = playerCommand.split(" ");
    				int a = Integer.parseInt(args[1]);
    				PlayerHandler.updateSeconds = a;
    				PlayerHandler.updateAnnounced = false;
    				PlayerHandler.updateRunning = true;
    				PlayerHandler.updateStartTime = System.currentTimeMillis();
    			}
    Is what I use for mine.
    Thanks for the reply, but it does the same thing. I don't think it's a problem with the command itself, I just posted it in case anybody needed to know it.
    Reply With Quote  
     

  4. #4  
    Donator
    Malmo's Avatar
    Join Date
    Sep 2013
    Age
    30
    Posts
    24
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Bump.
    Reply With Quote  
     

  5. #5  
    Donator
    Malmo's Avatar
    Join Date
    Sep 2013
    Age
    30
    Posts
    24
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Bump.
    Reply With Quote  
     

  6. #6  
    Donator
    Malmo's Avatar
    Join Date
    Sep 2013
    Age
    30
    Posts
    24
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Bump.
    Reply With Quote  
     

  7. #7  
    Donator
    Malmo's Avatar
    Join Date
    Sep 2013
    Age
    30
    Posts
    24
    Thanks given
    0
    Thanks received
    0
    Rep Power
    11
    Bump.
    Reply With Quote  
     

  8. #8  
    Typical Swede


    Join Date
    Jul 2008
    Posts
    1,162
    Thanks given
    204
    Thanks received
    154
    Rep Power
    217
    PlayerHandler or in your case PlayerManager
    Check
    Code:
          if(updateRunning && System.currentTimeMillis() - updateStartTime > (long)(updateSeconds * 1000)) {
             this.kickAllPlayers = true;
          }

    'Strange things did happen here no stranger would it be'
    ______________________________________________
    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. Lonelyisle update
    By SandyBridge in forum Downloads
    Replies: 6
    Last Post: 12-10-2007, 05:32 PM
  2. Marius MegaPack v1.1 (Updated)
    By Chimeric in forum Tools
    Replies: 19
    Last Post: 08-01-2007, 02:34 AM
  3. SOTM III Update
    By Bullet in forum General
    Replies: 2
    Last Post: 03-28-2007, 06:20 PM
  4. Replies: 0
    Last Post: 12-26-2006, 06:36 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
  •