Boost Plugin
OK the plugin has been upgraded, you now have 4 types of boosts Health, Thirst, Hunger and Stamina, each boost has its own effect and sound, the sound files can be swapped out for your own, just use the same type of file with the same name, the sound files can be found in the assets folder
Admins now have the option to adjust the settings, Open the Settings menu by typing ( /boost ) in the chat
interval = how long before the next boost by minutes
Amount = how much boost they get, 100 would be back to full but 50 would remove 50% so you would always want to make it 100 or more, more will give the player a longer time before the boost runs out, but once it runs out it should reset back to the game default of 100, till you get the next boost, so it is possible to do the boost over 100%
Admins use the command reloadplugins under the command console to enable any new changes, or the new settings wont take effect till the next reboot
Version 2.1
- Null bug fix
Short demo version^^
Long demo version
database.execute("CREATE TABLE IF NOT EXISTS `Boosts` (`ID` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `BoostType` VARCHAR(64), `BoostTimeInterval` INTEGER, `BoostAmount` INTEGER);");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Healing'")) {
database.executeUpdate("INSERT INTO `Boosts` (BoostType, BoostTimeInterval, BoostAmount) VALUES ('Healing','3600','100');");
database.executeUpdate("INSERT INTO `Boosts` (BoostType, BoostTimeInterval, BoostAmount) VALUES ('Thirst','2700','100');");
database.executeUpdate("INSERT INTO `Boosts` (BoostType, BoostTimeInterval, BoostAmount) VALUES ('Hunger','2100','100');");
database.executeUpdate("INSERT INTO `Boosts` (BoostType, BoostTimeInterval, BoostAmount) VALUES ('Stamina','1800','100');");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Healing'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Thirst'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Hunger'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Stamina'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Healing'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Thirst'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Hunger'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Stamina'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Healing'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Healing'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Thirst'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Hunger'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Stamina'")) {
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Healing'")) {
database.executeUpdate("UPDATE Boosts SET BoostTimeInterval = '" + HealingBoostInterval + "' WHERE BoostType = 'Healing'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Thirst'")) {
database.executeUpdate("UPDATE Boosts SET BoostTimeInterval = '" + ThirstTimeInterval + "' WHERE BoostType = 'Thirst'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Hunger'")) {
database.executeUpdate("UPDATE Boosts SET BoostTimeInterval = '" + HungerTimeInterval + "' WHERE BoostType = 'Hunger'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Stamina'")) {
database.executeUpdate("UPDATE Boosts SET BoostTimeInterval = '" + StaminaTimeInterval + "' WHERE BoostType = 'Stamina'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Healing'")) {
database.executeUpdate("UPDATE Boosts SET BoostTimeInterval = '" + HealingTimeInterval + "' WHERE BoostType = 'Healing'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Thirst'")) {
database.executeUpdate("UPDATE Boosts SET BoostTimeInterval = '" + ThirstTimeInterval + "' WHERE BoostType = 'Thirst'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Hunger'")) {
database.executeUpdate("UPDATE Boosts SET BoostTimeInterval = '" + HungerTimeInterval + "' WHERE BoostType = 'Hunger'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Stamina'")) {
database.executeUpdate("UPDATE Boosts SET BoostTimeInterval = '" + StaminaTimeInterval + "' WHERE BoostType = 'Stamina'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Healing'")) {
database.executeUpdate("UPDATE Boosts SET BoostAmount = '" + HealingBoostAmount + "' WHERE BoostType = 'Healing'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Thirst'")) {
database.executeUpdate("UPDATE Boosts SET BoostAmount = '" + ThirstBoostAmount + "' WHERE BoostType = 'Thirst'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Hunger'")) {
database.executeUpdate("UPDATE Boosts SET BoostAmount = '" + HungerBoostAmount + "' WHERE BoostType = 'Hunger'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Stamina'")) {
database.executeUpdate("UPDATE Boosts SET BoostAmount = '" + StaminaBoostAmount + "' WHERE BoostType = 'Stamina'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Healing'")) {
database.executeUpdate("UPDATE Boosts SET BoostAmount = '" + HealingBoostAmount + "' WHERE BoostType = 'Healing'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Thirst'")) {
database.executeUpdate("UPDATE Boosts SET BoostAmount = '" + ThirstBoostAmount + "' WHERE BoostType = 'Thirst'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Hunger'")) {
database.executeUpdate("UPDATE Boosts SET BoostAmount = '" + HungerBoostAmount + "' WHERE BoostType = 'Hunger'");
try ( ResultSet result = database.executeQuery("SELECT * FROM `Boosts` WHERE `BoostType` = 'Stamina'")) {