From c87e1b3d6479c1a14bdc2de62196e561d81c21af Mon Sep 17 00:00:00 2001 From: Seth <13510767+ZeroEpoch1969@users.noreply.github.com> Date: Thu, 9 Jul 2020 15:18:29 -0700 Subject: [PATCH] Read description lol - Re-added premium - Made the clown fish a shop item - Thank fuck I caught this DB bug with setting null values --- .../totalfreedommod/admin/AdminList.java | 2 +- .../command/Command_clownfish.java | 29 +++++++ .../command/Command_donator.java | 80 +++++++++++++++++++ .../totalfreedommod/command/Command_tag.java | 5 +- .../totalfreedommod/config/ConfigEntry.java | 6 ++ .../totalfreedommod/fun/ItemFun.java | 65 ++++++++++++++- .../totalfreedommod/player/PlayerData.java | 8 ++ .../totalfreedommod/player/PlayerList.java | 2 +- .../totalfreedommod/rank/Rank.java | 2 +- .../totalfreedommod/rank/RankManager.java | 10 ++- .../totalfreedommod/rank/Title.java | 3 +- .../totalfreedommod/shop/Shop.java | 9 +++ .../totalfreedommod/shop/ShopItem.java | 7 +- .../totalfreedommod/sql/SQLite.java | 24 +++--- src/main/resources/config.yml | 14 ++-- 15 files changed, 239 insertions(+), 27 deletions(-) create mode 100644 src/main/java/me/totalfreedom/totalfreedommod/command/Command_clownfish.java create mode 100644 src/main/java/me/totalfreedom/totalfreedommod/command/Command_donator.java diff --git a/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java b/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java index e77ea19c..ee55af72 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/admin/AdminList.java @@ -324,7 +324,7 @@ public class AdminList extends FreedomService for (Map.Entry entry : admin.toSQLStorable().entrySet()) { Object storedValue = plugin.sql.getValue(currentSave, entry.getKey(), entry.getValue()); - if (storedValue != null && !storedValue.equals(entry.getValue()) || storedValue == null && entry.getValue() != null) + if (storedValue != null && !storedValue.equals(entry.getValue()) || storedValue == null && entry.getValue() != null || entry.getValue() == null) { plugin.sql.setAdminValue(admin, entry.getKey(), entry.getValue()); } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clownfish.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clownfish.java new file mode 100644 index 00000000..11338c59 --- /dev/null +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_clownfish.java @@ -0,0 +1,29 @@ +package me.totalfreedom.totalfreedommod.command; + +import me.totalfreedom.totalfreedommod.rank.Rank; +import me.totalfreedom.totalfreedommod.shop.ShopItem; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME) +@CommandParameters(description = "Obtain a clown fish", usage = "/") +public class Command_clownfish extends FreedomCommand +{ + + @Override + public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) + { + if (plugin.pl.getData(playerSender).hasItem(ShopItem.CLOWN_FISH)) + { + playerSender.getInventory().addItem(plugin.sh.getClownFish()); + msg("You have been given a Clown Fish", ChatColor.GREEN); + } + else + { + msg("You do not own a Clown Fish! Purchase one from the shop.", ChatColor.RED); + } + return true; + } +} diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_donator.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_donator.java new file mode 100644 index 00000000..8e6dacf1 --- /dev/null +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_donator.java @@ -0,0 +1,80 @@ +package me.totalfreedom.totalfreedommod.command; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import me.totalfreedom.totalfreedommod.config.ConfigEntry; +import me.totalfreedom.totalfreedommod.player.PlayerData; +import me.totalfreedom.totalfreedommod.rank.Rank; +import me.totalfreedom.totalfreedommod.util.FLog; +import me.totalfreedom.totalfreedommod.util.FUtil; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE) +@CommandParameters(description = "Adds or removes donators", usage = "/ [forum_user]") +public class Command_donator extends FreedomCommand +{ + + @Override + public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) + { + if (!FUtil.isFromHostConsole(sender.getName()) && !ConfigEntry.SERVER_OWNERS.getStringList().contains(sender.getName())) + { + return noPerms(); + } + + Boolean mode = args[0].equals("add"); + String name = args[1]; + String ip = args[2]; + String pkg = args[3]; + String forum_id = null; + + if (args.length > 4) + { + forum_id = args[4]; + } + + PlayerData player = plugin.pl.getData(name); + + if (player == null) + { + player = plugin.pl.getDataByIp(ip); + } + + if (player != null) + { + player.setDonator(mode); + plugin.pl.save(player); + } + + if (forum_id != null && !forum_id.equals("0")) + { + String baseurl = ConfigEntry.DONATION_PROBOARDS_URL.getString(); + String group_id = ConfigEntry.DONATION_GROUP_ID.getString(); + String session_id = ConfigEntry.DONATION_SESSION_ID.getString(); + String csrf_token = ConfigEntry.DONATION_CSRF_TOKEN.getString(); + if (baseurl == null || group_id == null || session_id == null || csrf_token == null) + { + return true; + } + String url = baseurl + "/user/group_members/" + (mode ? "adding" : "remove"); + List headers = Arrays.asList("Cookie:session_id=" + session_id, "X-Requested-With:XMLHttpRequest"); + String payload = "group_id=" + group_id + "&user_ids[]=" + forum_id + "&csrf_token=" + csrf_token; + + try + { + String result = FUtil.postRequestToEndpoint(url, "POST", headers, payload); + msg(result); + } + catch (IOException e) + { + FLog.severe(e.getMessage()); + e.printStackTrace(); + } + } + + return true; + } +} \ No newline at end of file diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_tag.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_tag.java index 2abcd989..aac55cb7 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_tag.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_tag.java @@ -21,11 +21,12 @@ public class Command_tag extends FreedomCommand public static final List FORBIDDEN_WORDS = Arrays.asList( "admin", "owner", "moderator", "developer", "console", "dev", "staff", "mod", "sra", "tca", "sta", "sa"); - public boolean save = false; - @Override public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { + + boolean save = false; + if (args.length < 1) { return false; diff --git a/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java b/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java index 371be94a..637c8139 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/config/ConfigEntry.java @@ -83,6 +83,11 @@ public enum ConfigEntry DISCORD_EXECUTIVE_ROLE_ID(String.class, "discord.executive_role_id"), DISCORD_SERVER_OWNER_ROLE_ID(String.class, "discord.server_owner_role_id"), // + DONATION_PROBOARDS_URL(String.class, "donation.proboards_url"), + DONATION_GROUP_ID(String.class, "donation.donator_group_id"), + DONATION_SESSION_ID(String.class, "donation.session_id"), + DONATION_CSRF_TOKEN(String.class, "donation.csrf_token"), + // SHOP_ENABLED(Boolean.class, "shop.enabled"), SHOP_TITLE(String.class, "shop.title"), SHOP_PREFIX(String.class, "shop.prefix"), @@ -97,6 +102,7 @@ public enum ConfigEntry SHOP_PRICES_FIRE_BALL(Integer.class, "shop.prices.fire_ball"), SHOP_PRICES_RIDEABLE_PEARL(Integer.class, "shop.prices.rideable_pearl"), SHOP_PRICES_STACKING_POTATO(Integer.class, "shop.prices.stacking_potato"), + SHOP_PRICES_CLOWN_FISH(Integer.class, "shop.prices.clown_fish"), // ADMINLIST_CLEAN_THESHOLD_HOURS(Integer.class, "adminlist.clean_threshold_hours"), ADMINLIST_CONSOLE_IS_SENIOR(Boolean.class, "adminlist.console_is_senior"), diff --git a/src/main/java/me/totalfreedom/totalfreedommod/fun/ItemFun.java b/src/main/java/me/totalfreedom/totalfreedommod/fun/ItemFun.java index 2cebf19a..b1c608bd 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/fun/ItemFun.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/fun/ItemFun.java @@ -11,6 +11,8 @@ import me.totalfreedom.totalfreedommod.config.ConfigEntry; import me.totalfreedom.totalfreedommod.player.FPlayer; import me.totalfreedom.totalfreedommod.player.PlayerData; import me.totalfreedom.totalfreedommod.shop.ShopItem; +import me.totalfreedom.totalfreedommod.util.FLog; +import me.totalfreedom.totalfreedommod.util.FUtil; import org.bukkit.ChatColor; import org.bukkit.Color; import org.bukkit.FireworkEffect; @@ -232,7 +234,7 @@ public class ItemFun extends FreedomService if (onCooldown(player, ShopItem.FIRE_BALL)) { - player.sendMessage(ChatColor.RED + "You're are currently on a cooldown for 5 seconds."); + player.sendMessage(ChatColor.RED + "You're are currently on a cool-down for 5 seconds."); break; } @@ -243,6 +245,67 @@ public class ItemFun extends FreedomService cooldown(player, ShopItem.FIRE_BALL, 5); break; } + case TROPICAL_FISH: + { + final int RADIUS_HIT = 5; + final int STRENGTH = 4; + + if (!plugin.sh.isRealItem(plugin.pl.getData(player), ShopItem.CLOWN_FISH, player.getInventory().getItemInMainHand(), plugin.sh.getClownFish())) + { + break; + } + + if (onCooldown(player, ShopItem.CLOWN_FISH)) + { + player.sendMessage(ChatColor.RED + "You're are currently on a cool-down for 30 seconds."); + break; + } + + event.setCancelled(true); + boolean didHit = false; + + final Location playerLoc = player.getLocation(); + final Vector playerLocVec = playerLoc.toVector(); + + final List players = player.getWorld().getPlayers(); + for (final Player target : players) + { + if (target == player) + { + continue; + } + + final Location targetPos = target.getLocation(); + final Vector targetPosVec = targetPos.toVector(); + + try + { + if (targetPosVec.distanceSquared(playerLocVec) < (RADIUS_HIT * RADIUS_HIT)) + { + FUtil.setFlying(player, false); + target.setVelocity(targetPosVec.subtract(playerLocVec).normalize().multiply(STRENGTH)); + didHit = true; + } + } + catch (IllegalArgumentException ex) + { + } + } + + if (didHit) + { + final Sound[] sounds = Sound.values(); + for (Sound sound : sounds) + { + if (sound.toString().contains("HIT")) + { + playerLoc.getWorld().playSound(randomOffset(playerLoc, 5.0), sound, 20f, randomDoubleRange(0.5, 2.0).floatValue()); + } + } + cooldown(player, ShopItem.CLOWN_FISH, 30); + } + break; + } } } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/player/PlayerData.java b/src/main/java/me/totalfreedom/totalfreedommod/player/PlayerData.java index 485b4363..30b44617 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/player/PlayerData.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/player/PlayerData.java @@ -32,6 +32,8 @@ public class PlayerData private String discordID = null; private final List backupCodes = Lists.newArrayList(); @Setter + private boolean donator = false; + @Setter private Boolean masterBuilder = false; @Setter private Boolean verification = false; @@ -207,6 +209,11 @@ public class PlayerData return verification; } + public boolean isDonator() + { + return donator; + } + public boolean isMasterBuilder() { return masterBuilder; @@ -222,6 +229,7 @@ public class PlayerData put("tag", tag); put("discord_id", discordID); put("backup_codes", FUtil.listToString(backupCodes)); + put("donator", masterBuilder); put("master_builder", masterBuilder); put("verification", verification); put("ride_mode", rideMode); diff --git a/src/main/java/me/totalfreedom/totalfreedommod/player/PlayerList.java b/src/main/java/me/totalfreedom/totalfreedommod/player/PlayerList.java index 7078a5f7..37ab2715 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/player/PlayerList.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/player/PlayerList.java @@ -225,7 +225,7 @@ public class PlayerList extends FreedomService for (Map.Entry entry : player.toSQLStorable().entrySet()) { Object storedValue = plugin.sql.getValue(currentSave, entry.getKey(), entry.getValue()); - if (storedValue != null && !storedValue.equals(entry.getValue()) || storedValue == null && entry.getValue() != null) + if (storedValue != null && !storedValue.equals(entry.getValue()) || storedValue == null && entry.getValue() != null || entry.getValue() == null) { plugin.sql.setPlayerValue(player, entry.getKey(), entry.getValue()); } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/rank/Rank.java b/src/main/java/me/totalfreedom/totalfreedommod/rank/Rank.java index 7a5b4386..7d6d8712 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/rank/Rank.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/rank/Rank.java @@ -54,7 +54,7 @@ public enum Rank implements Displayable @Override public String getColoredLoginMessage() { - return determiner + " " + color + ChatColor.ITALIC + name; + return determiner + " " + color + name; } @Override diff --git a/src/main/java/me/totalfreedom/totalfreedommod/rank/RankManager.java b/src/main/java/me/totalfreedom/totalfreedommod/rank/RankManager.java index 14fa0cf6..6f99a39d 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/rank/RankManager.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/rank/RankManager.java @@ -77,6 +77,12 @@ public class RankManager extends FreedomService return Title.MASTER_BUILDER; } + PlayerData playerData = plugin.pl.getData(player); + if (!plugin.al.isAdmin(player) && playerData.isDonator()) + { + return Title.DONATOR; + } + return getRank(player); } @@ -173,7 +179,7 @@ public class RankManager extends FreedomService FPlayer fPlayer = plugin.pl.getPlayer(player); PlayerData data = plugin.pl.getData(player); Displayable display = getDisplay(player); - if (plugin.al.isAdmin(player) || data.isMasterBuilder() || FUtil.isDeveloper(player.getName())) + if (plugin.al.isAdmin(player) || data.isMasterBuilder() || data.isDonator() || FUtil.isDeveloper(player.getName())) { String displayName = display.getColor() + player.getName(); player.setPlayerListName(displayName); @@ -241,7 +247,7 @@ public class RankManager extends FreedomService } // Set display - if (isAdmin || FUtil.DEVELOPERS.contains(player.getName()) || plugin.pl.getData(player).isMasterBuilder()) + if (isAdmin || FUtil.DEVELOPERS.contains(player.getName()) || plugin.pl.getData(player).isMasterBuilder() || plugin.pl.getData(player).isDonator()) { final Displayable display = getDisplay(player); diff --git a/src/main/java/me/totalfreedom/totalfreedommod/rank/Title.java b/src/main/java/me/totalfreedom/totalfreedommod/rank/Title.java index fc8ca78c..2eb2d2e4 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/rank/Title.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/rank/Title.java @@ -6,6 +6,7 @@ import net.md_5.bungee.api.ChatColor; public enum Title implements Displayable { + DONATOR("a", "Premium Member", ChatColor.of("#ff5600"), org.bukkit.ChatColor.LIGHT_PURPLE, "Premium", true), MASTER_BUILDER("a", "Master Builder", ChatColor.DARK_AQUA, org.bukkit.ChatColor.DARK_AQUA, "MB", true), VERIFIED_ADMIN("a", "Verified Admin", ChatColor.LIGHT_PURPLE, org.bukkit.ChatColor.LIGHT_PURPLE, "VA", false), ASSISTANT_EXECUTIVE("an", "Assistant Executive", ChatColor.RED, org.bukkit.ChatColor.RED, "Asst Exec", true), @@ -56,7 +57,7 @@ public enum Title implements Displayable @Override public String getColoredLoginMessage() { - return determiner + " " + color + ChatColor.ITALIC + name; + return determiner + " " + color + name; } } diff --git a/src/main/java/me/totalfreedom/totalfreedommod/shop/Shop.java b/src/main/java/me/totalfreedom/totalfreedommod/shop/Shop.java index 1bc2d62b..17581ab6 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/shop/Shop.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/shop/Shop.java @@ -237,6 +237,15 @@ public class Shop extends FreedomService return itemStack; } + public ItemStack getClownFish() + { + ItemStack itemStack = new ItemStack(Material.TROPICAL_FISH); + ItemMeta itemMeta = itemStack.getItemMeta(); + itemMeta.setDisplayName(ChatColor.GOLD + "Clown Fish"); + itemMeta.setLore(Arrays.asList(ChatColor.AQUA + ":clown:")); + itemStack.setItemMeta(itemMeta); + return itemStack; + } public boolean canAfford(int price, int coins) { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/shop/ShopItem.java b/src/main/java/me/totalfreedom/totalfreedommod/shop/ShopItem.java index 96531050..6eac77c6 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/shop/ShopItem.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/shop/ShopItem.java @@ -11,17 +11,18 @@ public enum ShopItem LIGHTNING_ROD("Lightning Rod", Material.BLAZE_ROD, 12, ConfigEntry.SHOP_PRICES_LIGHTNING_ROD, ChatColor.LIGHT_PURPLE, "lightningRod", "/lightningrod"), FIRE_BALL("Fire Ball", Material.FIRE_CHARGE, 14, ConfigEntry.SHOP_PRICES_FIRE_BALL, ChatColor.RED, "fireBall", "/fireball"), RIDEABLE_PEARL("Rideable Ender Pearl", Material.ENDER_PEARL, 16, ConfigEntry.SHOP_PRICES_RIDEABLE_PEARL, ChatColor.DARK_PURPLE, "rideablePearl", "/rideablepearl"), - STACKING_POTATO("Stacking Potato", Material.POTATO, 22, ConfigEntry.SHOP_PRICES_STACKING_POTATO, ChatColor.YELLOW, "stackingPotato", "/stackingpotato"); + STACKING_POTATO("Stacking Potato", Material.POTATO, 20, ConfigEntry.SHOP_PRICES_STACKING_POTATO, ChatColor.YELLOW, "stackingPotato", "/stackingpotato"), + CLOWN_FISH("Clown Fish", Material.TROPICAL_FISH, 24, ConfigEntry.SHOP_PRICES_CLOWN_FISH, ChatColor.GOLD, "clownFish", "/clownfish"); /* Shop GUI Layout: Dimensions: 9x4 = 36 - Key: g = Grappling Hook, l = Lightning Rod, f = Fire Ball, r = Rideable Ender Pearl, S = Stacking Potato $ = Coins} + Key: g = Grappling Hook, l = Lightning Rod, f = Fire Ball, r = Rideable Ender Pearl, s = Stacking Potato, c = Clown Fish, $ = Coins} --------- -g-l-f-r- - ----s---- + --s---c-- --------$ */ diff --git a/src/main/java/me/totalfreedom/totalfreedommod/sql/SQLite.java b/src/main/java/me/totalfreedom/totalfreedommod/sql/SQLite.java index b5556b99..aff96c1a 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/sql/SQLite.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/sql/SQLite.java @@ -95,7 +95,7 @@ public class SQLite extends FreedomService { try { - connection.createStatement().execute("CREATE TABLE `players` (`username` VARCHAR NOT NULL, `ips` VARCHAR NOT NULL, `notes` VARCHAR, `tag` VARCHAR, `discord_id` VARCHAR, `backup_codes` VARCHAR, `master_builder` BOOLEAN NOT NULL,`verification` BOOLEAN NOT NULL, `ride_mode` VARCHAR NOT NULL, `coins` INT NOT NULL, `items` VARCHAR, `total_votes` INT NOT NULL);"); + connection.createStatement().execute("CREATE TABLE `players` (`username` VARCHAR NOT NULL, `ips` VARCHAR NOT NULL, `notes` VARCHAR, `tag` VARCHAR, `discord_id` VARCHAR, `backup_codes` VARCHAR, `donator` BOOLEAN NOT NULL, `master_builder` BOOLEAN NOT NULL,`verification` BOOLEAN NOT NULL, `ride_mode` VARCHAR NOT NULL, `coins` INT NOT NULL, `items` VARCHAR, `total_votes` INT NOT NULL);"); } catch (SQLException e) { @@ -153,7 +153,6 @@ public class SQLite extends FreedomService { Object[] data = {key, player.getName()}; PreparedStatement statement = connection.prepareStatement(MessageFormat.format("UPDATE players SET {0}=? WHERE username=''{1}''", data)); - FLog.info(statement.toString()); statement = setUnknownType(statement, 1, value); statement.executeUpdate(); @@ -196,7 +195,11 @@ public class SQLite extends FreedomService public PreparedStatement setUnknownType(PreparedStatement statement, int index, Object value) throws SQLException { - if (value.getClass().equals(String.class)) + if (value == null) + { + statement.setString(index, null); + } + else if (value.getClass().equals(String.class)) { String v = (String)value; statement.setString(index, v); @@ -269,19 +272,20 @@ public class SQLite extends FreedomService { try { - PreparedStatement statement = connection.prepareStatement("INSERT INTO players VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); + PreparedStatement statement = connection.prepareStatement("INSERT INTO players VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); statement.setString(1, player.getName()); statement.setString(2, FUtil.listToString(player.getIps())); statement.setString(3, FUtil.listToString(player.getNotes())); statement.setString(4, player.getTag()); statement.setString(5, player.getDiscordID()); statement.setString(6, FUtil.listToString(player.getBackupCodes())); - statement.setBoolean(7, player.isMasterBuilder()); - statement.setBoolean(8, player.hasVerification()); - statement.setString(9, player.getRideMode()); - statement.setInt(10, player.getCoins()); - statement.setString(11, FUtil.listToString(player.getItems())); - statement.setInt(12, player.getTotalVotes()); + statement.setBoolean(7, player.isDonator()); + statement.setBoolean(8, player.isMasterBuilder()); + statement.setBoolean(9, player.hasVerification()); + statement.setString(10, player.getRideMode()); + statement.setInt(11, player.getCoins()); + statement.setString(12, FUtil.listToString(player.getItems())); + statement.setInt(13, player.getTotalVotes()); statement.executeUpdate(); } catch (SQLException e) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index b16895d2..8e019399 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -123,6 +123,7 @@ shop: fire_ball: 500 rideable_pearl: 700 stacking_potato: 300 + clown_fish: 1500 # Admin list adminlist: @@ -159,6 +160,12 @@ social_links: Website: 'https://totalfreedom.me/' Discord: 'https://discordapp.com/invite/XXjmAmV/' +donation: + proboards_url: '' + donator_group_id: '' + session_id: '' + csrf_token: '' + # Blocking certain events allow: fire_place: false @@ -362,7 +369,6 @@ announcer: announcements: - 'Be sure to visit our forums at &6http://totalfreedom.boards.net/' - - 'You can always review the server rules here: &6http://totalfreedom.me/' - 'If you are not OP, be sure to ask!' - 'Somebody breaking the rules? Report it! /report ' - 'Griefing is not allowed!' @@ -370,18 +376,16 @@ announcer: - 'Interested in becoming admin? Type "/ai" for more information!' - 'You may view all online administrators via "/list -a"' - 'Save your buildings via WorldEdit! http://totalfreedom.me for more information!' - - 'Famous players, such as Notch, are always fake! We are an offline/cracked server!' - 'You may contact TotalFreedom support on Twitter! https://tiny.re/tfsupport' - 'You may download TotalFreedomMod here: https://tiny.re/tfm+' - - 'Catholic_Mario is the owner of TotalFreedom.' - - 'MarkByron is the founder of TotalFreedom.' + - 'scripthead is the owner of TotalFreedom.' + - 'markbyron is the founder of TotalFreedom.' - 'Server lagging? Check the lag via "/tps"' - 'You are allowed to record and stream videos on TotalFreedom.' - 'Player vs player while in creative or god mode is forbidden!' - 'Spawn killing is forbidden!' - 'Invisible potions are allowed!' - 'Serial griefing and trolling will result in a permanent ban!' - - 'TotalFreedom does not accept any form of donations!' - 'Racism, nazism, and sexism are strictly forbidden!' - 'Join our Discord server! Link: https://discordapp.com/invite/XXjmAmV/'