diff --git a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/motd/MotdManager.java b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/motd/MotdManager.java index 324da4b52..1f5bc2b09 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/motd/MotdManager.java +++ b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/motd/MotdManager.java @@ -56,12 +56,12 @@ public class MotdManager implements Listener, Runnable //String motdLine = "§f§l◄ §c§lMaintenance§f§l ►"; //String motdLine = "§f§l◄ §a§lCarl the Creeper§f§l ►"; // String motdLine = " §2§l§n M O N S T E R M A Z E B E T A §f"; - String motdLine = " §f❄ §2§lMerry Christmas §f❄ §2§lElf Presents §f❄"; + String motdLine = " §f> §4§lCLANS BETA §f- §c§lOpen to Everyone §f<"; // String motdLine = " §f❄ §2§lServer Maintenance §f❄ §2§lBe Back Soon §f❄"; //String motdLine = " §d§lRank Sale §a§l40% Off"); //String motdLine = " §f§l◄§c§lMAINTENANCE§f§l►"); - updateMainMotd(" §c§m §f§m §c§m §f§m §2§l§m[ §r §c§lMineplex§r §f§lGames§r §2§l§m ]§f§m §c§m §f§m §c§m §r", motdLine); + updateMainMotd(" §f§m §8§l§m[ §r §9§lMineplex§r §f§lGames§r §8§l§m ]§f§m §r", motdLine); System.out.println("Updated Bungee MOTD"); } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/incognito/repository/IncognitoRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/incognito/repository/IncognitoRepository.java index 21f03b062..b27472430 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/incognito/repository/IncognitoRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/incognito/repository/IncognitoRepository.java @@ -18,7 +18,7 @@ public class IncognitoRepository extends MinecraftRepository public void setStatus(int accountId, boolean status) { - if (executeUpdate(UPDATE_STATUS, new ColumnInt("accountId", accountId)) <= 0) + if (executeUpdate(UPDATE_STATUS, new ColumnInt("status", status ? 1 : 0), new ColumnInt("accountId", accountId)) <= 0) executeInsert(INSERT_STATUS, null, new ColumnInt("accountId", accountId), new ColumnInt("status", status ? 1 : 0)); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/resourcepack/ResourcePackManager.java b/Plugins/Mineplex.Core/src/mineplex/core/resourcepack/ResourcePackManager.java index 0cc20fd4f..2ba415206 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/resourcepack/ResourcePackManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/resourcepack/ResourcePackManager.java @@ -60,13 +60,11 @@ public class ResourcePackManager extends MiniPlugin implements CommandCallback if (entry.getLeft() == version || entry.getLeft() == MinecraftVersion.ALL) { player.setResourcePack(entry.getRight()); - player.sendMessage("A: " + entry.getRight()); return; } } player.setResourcePack(_resourcePackUrls[0].getRight()); - player.sendMessage("B: " + _resourcePackUrls[0].getRight()); } @EventHandler diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java index 3648885b9..f8dbbe9cb 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java @@ -83,7 +83,7 @@ public class Outpost implements Listener private Location _core; private LinkedHashMap _blocks; - private LinkedHashMap _buildQueue; + private LinkedHashMap _buildQueue = new LinkedHashMap<>(); protected OutpostType _type; private OutpostState _state; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java index ea9bb2cad..45510438c 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/weapon/Cannon.java @@ -77,11 +77,11 @@ public class Cannon extends SiegeWeapon return false; } - if (!_ownerClan.isMember(player)) - { - UtilPlayer.message(player, F.main("Clans", "This cannon is not owned by your Clan.")); - return false; - } +// if (!_ownerClan.isMember(player)) +// { +// UtilPlayer.message(player, F.main("Clans", "This cannon is not owned by your Clan.")); +// return false; +// } if(_clans.hasTimer(player)) { @@ -107,11 +107,11 @@ public class Cannon extends SiegeWeapon enableInventory(UtilServer.getServer().createInventory(null, InventoryType.DISPENSER, C.cDAquaB + _name), new AccessRule(AccessType.RCLICK_BB, player -> player.equals(getRider()))); setRideable(new AccessRule(AccessType.RCLICK_BB, player -> { - if (!_ownerClan.isMember(player)) - { - UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan.")); - return false; - } +// if (!_ownerClan.isMember(player)) +// { +// UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan.")); +// return false; +// } if (getRider() != null && !getRider().equals(player)) { @@ -161,11 +161,11 @@ public class Cannon extends SiegeWeapon return false; } - if (!_ownerClan.isMember(player)) - { - UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan.")); - return false; - } +// if (!_ownerClan.isMember(player)) +// { +// UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan.")); +// return false; +// } if (_clans.hasTimer(player)) { @@ -191,11 +191,11 @@ public class Cannon extends SiegeWeapon enableInventory(UtilServer.getServer().createInventory(null, InventoryType.DISPENSER, C.cDAquaB + _name), new AccessRule(AccessType.RCLICK_BB, player -> player.equals(getRider()))); setRideable(new AccessRule(AccessType.RCLICK_BB, player -> { - if (!_ownerClan.isMember(player)) - { - UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan.")); - return false; - } +// if (!_ownerClan.isMember(player)) +// { +// UtilPlayer.message(player, F.main("Clans", "This Cannon is not owned by your Clan.")); +// return false; +// } if (getRider() != null && !getRider().equals(player)) { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/tntGenerator/TntGeneratorManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/tntGenerator/TntGeneratorManager.java index 22a370533..cf57f77d1 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/tntGenerator/TntGeneratorManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/tntGenerator/TntGeneratorManager.java @@ -12,7 +12,7 @@ import mineplex.game.clans.clans.ClansManager; public class TntGeneratorManager extends MiniPlugin { - public static final int SECONDS_PER_TNT = 30;//60 * 60 * 10; // 10 Hours + public static final int SECONDS_PER_TNT = 60 * 60 * 12; // 12 Hours public static final int MAX_GENERATOR_STOCK = 3; private ClansManager _clansManager; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/GearManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/GearManager.java index aa7bbf777..071aebc74 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/GearManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/GearManager.java @@ -364,6 +364,8 @@ public class GearManager extends MiniPlugin implements IPacketHandler, Runnable attribute = sampleAttribute; // Select valid attribute to // add } + + attempts++; } container.addAttribute(attribute); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/objective/OrderedObjective.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/objective/OrderedObjective.java index 91302df37..450d3b167 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/objective/OrderedObjective.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/objective/OrderedObjective.java @@ -46,7 +46,7 @@ public abstract class OrderedObjective extends Objectiv OrderedObjectiveData data = getData(player); assert index == data.getIndex(); - if (data.getIndex() + 1 >= _goals.size()) + if (data == null || data.getIndex() + 1 >= _goals.size()) { finish(player); } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/fields/SellDiamondsGoal.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/fields/SellDiamondsGoal.java index 5bd44748f..e1dd69eee 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/fields/SellDiamondsGoal.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/fields/SellDiamondsGoal.java @@ -57,10 +57,5 @@ public class SellDiamondsGoal extends ObjectiveGoal finish(event.getPlayer()); } } - else - { - if (event.getItem().getType() == Material.DIAMOND) - event.setCancelled(true); - } } } diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java index 6e07ae2b3..66d8f06a4 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerManager.java @@ -918,7 +918,7 @@ public class ServerManager extends MiniDbClientPlugin @Override public String getQuery(int accountId, String uuid, String name) { - return "SELECT clans.name, accountClan.clanRole, clanServer.serverName, clans.id FROM accountClan INNER JOIN clans ON clans.id = accountClan.clanId INNER JOIN clanServer ON clans.serverId = clanServer.id WHERE accountClan.accountId = " + accountId + "?;"; + return "SELECT clans.name, accountClan.clanRole, clanServer.serverName, clans.id FROM accountClan INNER JOIN clans ON clans.id = accountClan.clanId INNER JOIN clanServer ON clans.serverId = clanServer.id WHERE accountClan.accountId = " + accountId + ";"; } @Override diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerSorter.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerSorter.java index ac874017c..325ae80c6 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerSorter.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ServerSorter.java @@ -52,6 +52,14 @@ public class ServerSorter implements Comparator } } + if (a.Name.contains("Clans") && b.Name.contains("Clans")) + { + if (Integer.parseInt(a.Name.split("-")[1]) < Integer.parseInt(b.Name.split("-")[1])) + return -1; + else if (Integer.parseInt(a.Name.split("-")[1]) > Integer.parseInt(b.Name.split("-")[1])) + return 1; + } + if (a.MaxPlayers - a.CurrentPlayers < _requiredSlots && b.MaxPlayers - b.CurrentPlayers >= _requiredSlots) return -1; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java index 246b93fc2..20764ef6b 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/server/ui/ServerGameMenu.java @@ -272,9 +272,9 @@ public class ServerGameMenu extends ShopPageBase C.Reset + "the games you want, when you want.", }).setHideInfo(true).build(), new SelectPLAYERButton(this)); - addButton(40, new ItemBuilder(Material.IRON_DOOR).setTitle(C.cYellowB + "Mineplex Clans " + C.cGray + "Champions Teams").addLore(new String[] + addButton(40, new ItemBuilder(Material.IRON_DOOR).setTitle(C.cYellowB + "Mineplex Clans " + C.cGray + "Factions PvP").addLore(new String[] { - (_extraValue ? C.cAquaB : C.cWhiteB) + "ALPHA RELEASE", + (_extraValue ? C.cAquaB : C.cWhiteB) + "BETA RELEASE", C.Reset + "", C.Reset + "Equip custom skills and builds", C.Reset + "and join your clan to destroy", diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java index 74e3f7473..718434d95 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/condition/ConditionEffect.java @@ -379,7 +379,7 @@ public class ConditionEffect implements Listener Manager.getDamagerManager().NewDamageEvent(ent, condition.GetSource(), null, DamageCause.CUSTOM, 0.1, false, true, false, - condition.GetSource().getName(), "Poison"); + condition.GetSource() != null ? condition.GetSource().getName() : "The Mighty Defek7", "Poison"); } } diff --git a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java index 4a01218f1..acc786379 100644 --- a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java @@ -24,6 +24,7 @@ public final class DBPool BasicDataSource source = new BasicDataSource(); source.addConnectionProperty("autoReconnect", "true"); source.addConnectionProperty("allowMultiQueries", "true"); + source.addConnectionProperty("zeroDateTimeBehavior", "convertToNull"); source.setDefaultTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); source.setDriverClassName("com.mysql.jdbc.Driver"); source.setUrl(url); diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java index ee4bcc968..85502fd37 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java @@ -203,9 +203,12 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable caller.sendMessage(C.cBlue + "Valentines Gifts Received : " + C.cYellow + valentinesGiftsReceived); caller.sendMessage(C.cBlue + "Monthly Bonus Log (Last 6 entries):"); - for (String logEntry : _accountBonusLog.get(client.getAccountId())) + if (_accountBonusLog.containsKey(client.getAccountId())) { - caller.sendMessage(C.cYellow + logEntry); + for (String logEntry : _accountBonusLog.get(client.getAccountId())) + { + caller.sendMessage(C.cYellow + logEntry); + } } caller.sendMessage(C.cDGreen + C.Strike + "============================================="); @@ -258,7 +261,8 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable accountId = resultSet.getInt(1); log.add("Received " + resultSet.getInt(3) + " " + resultSet.getString(2) + " on " + resultSet.getDate(4)); } - - _accountBonusLog.put(accountId, log); + + if (accountId != 0) + _accountBonusLog.put(accountId, log); } }