-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made quick implementation of a cooldown
- Loading branch information
Showing
8 changed files
with
101 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package at.alex.falexhomes.utils; | ||
|
||
|
||
public class PlayerTime { | ||
private String playerUUID; | ||
private int gameTime; | ||
|
||
public PlayerTime(String playerName, int gameTime) { | ||
this.playerUUID = playerName; | ||
this.gameTime = gameTime; | ||
} | ||
|
||
public String getPlayerUUID() { | ||
return playerUUID; | ||
} | ||
|
||
public int getTime() { | ||
return gameTime; | ||
} | ||
|
||
public void setPlayerUUID(String playerName) { | ||
this.playerUUID = playerName; | ||
} | ||
|
||
public void setTime(int gameTime) { | ||
this.gameTime = gameTime; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package at.alex.falexhomes.utils; | ||
|
||
import java.util.Date; | ||
|
||
public class TimeUtils { | ||
public static int getCurrentTime() { | ||
// Ab 2038 gibt es ein problem | ||
Date date = new Date(); | ||
Long longTime = new Long(date.getTime()/1000); | ||
return longTime.intValue(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters