Class SQLStorage
java.lang.Object
org.strassburger.lifestealz.util.storage.Storage
org.strassburger.lifestealz.util.storage.SQLStorage
- Direct Known Subclasses:
MariaDBStorage
,MySQLStorage
,SQLiteStorage
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionExport the player data to a file.Get a list of all eliminated players.Get all player namesvoid
importData
(String fileName) Import the player data from a file.void
init()
Initializes the storage system.Loads the player data from the storage system.Loads the player data from the storage system.int
reviveAllPlayers
(int minHearts, int reviveHearts, int maxRevives, boolean bypassReviveLimit) Set the amount of hearts for every eliminated player to the given amount.
-
Constructor Details
-
SQLStorage
-
-
Method Details
-
init
public void init()Description copied from class:Storage
Initializes the storage system. -
load
Description copied from class:Storage
Loads the player data from the storage system. -
load
Description copied from class:Storage
Loads the player data from the storage system. -
getEliminatedPlayers
Description copied from class:Storage
Get a list of all eliminated players.- Specified by:
getEliminatedPlayers
in classStorage
-
export
Description copied from class:Storage
Export the player data to a file. -
importData
Description copied from class:Storage
Import the player data from a file.- Specified by:
importData
in classStorage
- Parameters:
fileName
- The name of the file to import from.
-
reviveAllPlayers
public int reviveAllPlayers(int minHearts, int reviveHearts, int maxRevives, boolean bypassReviveLimit) Description copied from class:Storage
Set the amount of hearts for every eliminated player to the given amount.- Specified by:
reviveAllPlayers
in classStorage
- Parameters:
minHearts
- The amount of hearts a player has to be considered eliminated.reviveHearts
- The amount of hearts to set for every eliminated player.maxRevives
- The maximum amount of revives a player can have.bypassReviveLimit
- Whether the revive limit should be bypassed.- Returns:
- The amount of players that were affected.
-
getPlayerNames
Description copied from class:Storage
Get all player names- Specified by:
getPlayerNames
in classStorage
-
getEliminatedPlayerNames
- Specified by:
getEliminatedPlayerNames
in classStorage
-