Jump to content
  • 0
Sign in to follow this  
dawson1

Need help Adding Save button [pi] 317

Question

hey guys, dose any one know how i can add a save game button into my server? im on a 317 pi but whenever i do an update or sumtin they always get rolled back unless they log out? so if u can tell me how or if u know a guide please post below thanks allot!

And how do i get that server message that pops up that says "server update in : 5:00" then go's down to zero and when it hits zero it dose the update? thanks allot again [email protected]

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
[CODE]

if (playerCommand.startsWith("update") && c.playerName.equalsIgnoreCase("PUTYOURUSERNAMEHERE")) {
String[] args = playerCommand.split(" ");
int a = Integer.parseInt(args[1]);
PlayerHandler.updateSeconds = a;
PlayerHandler.updateAnnounced = false;
PlayerHandler.updateRunning = true;
PlayerHandler.updateStartTime = System.currentTimeMillis();
}

[/CODE]

Copy and paste that into your commands.java (Make sure to change your name).
Then compile, Run.

On the server do ::update 60 and the count down will start at 60 seconds. When it gets to 60 all the player accounts will be saved and they will be kicked from the server. Make sure you wait a few seconds for the accounts to save before closing the server.


Hit the thanks button if I helped you :)

Share this post


Link to post
Share on other sites
  • 0
thanks alot maN

Share this post


Link to post
Share on other sites
Sign in to follow this  

×