Class SQLStorage
java.lang.Object
com.zetaplugins.lifestealz.storage.Storage
com.zetaplugins.lifestealz.storage.SQLStorage
- Direct Known Subclasses:
MySQLSyntaxStorage,SQLiteStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear all player data from the storage system.Export the player data to a file.abstract ConnectionPoolGet a list of all eliminated players.protected abstract StringGet all player namesvoidimportData(String fileName) Import the player data from a file.voidinit()Initializes the storage system.Loads the player data from the storage system.Loads the player data from the storage system.intreviveAllPlayers(int minHearts, int reviveHearts, int maxRevives, boolean bypassReviveLimit) Set the amount of hearts for every eliminated player to the given amount.voidsave(PlayerData playerData) Saves the player data to the storage system.Methods inherited from class com.zetaplugins.lifestealz.storage.Storage
getPlugin, migrateDatabase
-
Constructor Details
-
SQLStorage
-
-
Method Details
-
init
public void init()Description copied from class:StorageInitializes the storage system. -
getConnectionPool
-
getConnection
- Throws:
SQLException
-
load
Description copied from class:StorageLoads the player data from the storage system. -
save
Description copied from class:StorageSaves the player data to the storage system. -
load
Description copied from class:StorageLoads the player data from the storage system. -
getEliminatedPlayers
Description copied from class:StorageGet a list of all eliminated players.- Specified by:
getEliminatedPlayersin classStorage
-
export
Description copied from class:StorageExport the player data to a file. -
getInserOrReplaceStatement
-
importData
Description copied from class:StorageImport the player data from a file.- Specified by:
importDatain 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:StorageSet the amount of hearts for every eliminated player to the given amount.- Specified by:
reviveAllPlayersin 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:StorageGet all player names- Specified by:
getPlayerNamesin classStorage
-
getEliminatedPlayerNames
- Specified by:
getEliminatedPlayerNamesin classStorage
-
clearDatabase
public void clearDatabase()Description copied from class:StorageClear all player data from the storage system.- Specified by:
clearDatabasein classStorage
-