Thread: How to update

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 How to update 
    Registered Member
    Join Date
    Feb 2011
    Age
    25
    Posts
    111
    Thanks given
    9
    Thanks received
    3
    Rep Power
    1
    Well, i would like to know if there was an easier way to update my server without actually shutting down the files and everything temporarily. While i code.

    So what im asking is if i could code and update the server without shutting down my server while i code.

    And i would like to know if there's the command for me to save everyone's character file at once. Such as :aveall
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Aug 2008
    Age
    28
    Posts
    832
    Thanks given
    53
    Thanks received
    62
    Rep Power
    0
    Easier way would be to do the updates, compile, run the server source, and close the original one.

    To save all, just add a player save function in the shutdown hook of your server.
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Feb 2011
    Age
    25
    Posts
    111
    Thanks given
    9
    Thanks received
    3
    Rep Power
    1
    Quote Originally Posted by Trilla View Post
    Easier way would be to do the updates, compile, run the server source, and close the original one.

    To save all, just add a player save function in the shutdown hook of your server.
    How would i add the save function? Sorry, i am new to coding. And wouldnt if i did that the char files be effected? I edit the source on my computer and send the files to the vps and then run it from there.
    Reply With Quote  
     

  5. #4  
    Banned
    Join Date
    Aug 2008
    Age
    28
    Posts
    832
    Thanks given
    53
    Thanks received
    62
    Rep Power
    0
    For the shutdown hook saving, add this to your PlayerHandler.java:
    Code:
    	public static PlayerSave save;	
    	static {
    		Runtime.getRuntime().addShutdownHook(new Thread(){
    			public void run() {
    				System.out.println("Saving players...");
    				synchronized(this) {
    					for(int i = 0; i < Config.MAX_PLAYERS; i++)
    					if(players[i] != null)
    					save.saveGame((Client)players[i]);
    				}
    			}
    		});
    	}
    The character files wont be affected.
    Reply With Quote  
     

  6. Thankful user:


  7. #5  
    Registered Member
    Join Date
    Feb 2011
    Age
    25
    Posts
    111
    Thanks given
    9
    Thanks received
    3
    Rep Power
    1
    Thank you.
    Reply With Quote  
     

  8. #6  
    Banned
    Join Date
    Aug 2008
    Age
    28
    Posts
    832
    Thanks given
    53
    Thanks received
    62
    Rep Power
    0
    Your welcome
    Reply With Quote  
     

  9. Thankful user:


  10. #7  
    Registered Member
    Join Date
    Feb 2011
    Age
    25
    Posts
    111
    Thanks given
    9
    Thanks received
    3
    Rep Power
    1
    Also, my server doesnt add a "puremaster" to my char files when created, i tried to add one to playersave, but nothing happened. Could you help me?
    Reply With Quote  
     

  11. #8  
    ZRPS
    Guest
    you can use JRebel, it's a program that updates the server without restarting it.
    Reply With Quote  
     

  12. #9  
    Banned
    Join Date
    Aug 2008
    Age
    28
    Posts
    832
    Thanks given
    53
    Thanks received
    62
    Rep Power
    0
    Have you added the integer to Player.java? I think it would be:
    Code:
    public int puremaster;

    Quote Originally Posted by ZRPS View Post
    you can use JRebel, it's a program that updates the server without restarting it.
    Thanks. I used that awhile ago before I reformatted my computer and I forgot what it was called . Time to get it again!
    Reply With Quote  
     

  13. #10  
    Registered Member
    Join Date
    Feb 2011
    Age
    25
    Posts
    111
    Thanks given
    9
    Thanks received
    3
    Rep Power
    1
    My player.java has
    public int
    safeTimer = 0,
    KC,
    DC,
    recoil = 0,
    ag1,
    puremaster,
    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. update key extractor/538 update keys
    By Simon in forum Requests
    Replies: 2
    Last Post: 01-16-2011, 04:06 PM
  2. Replies: 3
    Last Post: 08-09-2010, 06:12 PM
  3. ::update system update error z525
    By lt gangster in forum Help
    Replies: 3
    Last Post: 08-09-2010, 04:02 AM
  4. Next weeks update. (weekly update)
    By Adam432423 in forum Media
    Replies: 13
    Last Post: 07-22-2010, 04:18 PM
  5. update key loading/update server
    By Simon in forum Requests
    Replies: 4
    Last Post: 01-11-2010, 06:32 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
  •