From aa0cfc771093006f4e44a0c62bbe5862eabb866e Mon Sep 17 00:00:00 2001 From: phobia Date: Sat, 30 Jan 2016 19:23:59 +1100 Subject: [PATCH 01/33] Fixes to TnTGeneration Fixes to Broadsword giving Generation and slowness 42 instead of 4 --- .../tntGenerator/TntGeneratorManager.java | 77 ++++++++++++------- .../items/legendaries/GiantsBroadsword.java | 4 +- 2 files changed, 50 insertions(+), 31 deletions(-) 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 aa54d362a..6506f4914 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 @@ -4,6 +4,7 @@ import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.craftbukkit.v1_8_R3.CraftWorld; import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack; +import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.block.Action; @@ -167,42 +168,60 @@ public class TntGeneratorManager extends MiniPlugin ClanInfo clan = getGenerator(event.getClickedBlock()); if (clan != null) { - final TntGenerator generator = clan.getGenerator(); - final int stock = generator.getStock(); + interact(clan, event.getPlayer()); + }else { //fix tnt gen issues + //Can only place one of these in a clan location. so it must be a generator + ClanInfo owner = _clansManager.getClanUtility().getOwner(event.getClickedBlock().getLocation()); + if(owner == null) return; //Wilderness + TntGenerator generator = owner.getGenerator(); - if (stock > 0) - { - generator.setStock(stock - 1); - _clansManager.getClanDataAccess().updateGenerator(clan, new Callback() - { - @Override - public void run(Boolean data) - { - if (data) - { - updateBrewingStand(generator); - dropItem(event.getClickedBlock(), new ItemStack(Material.TNT)); - } - else - { - // failed - generator.setStock(stock); - } - } - }); - } - else - { - int secondLeft = SECONDS_PER_TNT - generator.getTicks(); - int msLeft = secondLeft * 1000; - UtilTextMiddle.display("", C.cRed + "Next TNT in " + C.cGold + UtilTime.convertString(msLeft, 1, UtilTime.TimeUnit.FIT), event.getPlayer()); - } + //Create generator if not exist + if(generator == null || !generator.getBlock().equals(event.getClickedBlock())) { + generator = new TntGenerator(event.getClickedBlock()); + generator.setStock(2); + clan.setGenerator(generator); + _clansManager.getClanDataAccess().updateGenerator(clan, null); + } + interact(owner, event.getPlayer()); } event.setCancelled(true); } } + private void interact(ClanInfo clan, Player player) { + final TntGenerator generator = clan.getGenerator(); + final int stock = generator.getStock(); + + if (stock > 0) + { + generator.setStock(stock - 1); + _clansManager.getClanDataAccess().updateGenerator(clan, new Callback() + { + @Override + public void run(Boolean data) + { + if (data) + { + updateBrewingStand(generator); + dropItem(generator.getBlock(), new ItemStack(Material.TNT)); + } + else + { + // failed + generator.setStock(stock); + } + } + }); + } + else + { + int secondLeft = SECONDS_PER_TNT - generator.getTicks(); + int msLeft = secondLeft * 1000; + UtilTextMiddle.display("", C.cRed + "Next TNT in " + C.cGold + UtilTime.convertString(msLeft, 1, UtilTime.TimeUnit.FIT), player); + } + } + @EventHandler public void onDelete(ClanDeleteEvent event) { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java index a04ba08c5..7e6e18f42 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java @@ -62,7 +62,7 @@ public class GiantsBroadsword extends LegendaryItem private void buffPlayer(Player player) { - grantPotionEffect(player, PotionEffectType.SLOW, 40, 43); - grantPotionEffect(player, PotionEffectType.REGENERATION, 2, 43); + grantPotionEffect(player, PotionEffectType.SLOW, 40, 5); + grantPotionEffect(player, PotionEffectType.REGENERATION, 2, 5); //Regen 4 } } From 9c83c64d0103f721db0d91fcc048c7b4fece720b Mon Sep 17 00:00:00 2001 From: phobia Date: Sat, 30 Jan 2016 21:34:06 +1100 Subject: [PATCH 02/33] Fixed issues with Broadsword Added max building height of 100 --- .../game/clans/clans/ClansDataAccessLayer.java | 2 ++ .../clans/tntGenerator/TntGeneratorManager.java | 2 +- .../src/mineplex/game/clans/gameplay/Gameplay.java | 14 ++++++++++++-- .../clans/items/legendaries/GiantsBroadsword.java | 10 +++++----- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java index b848e7d28..b3bdba522 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java @@ -750,6 +750,8 @@ public class ClansDataAccessLayer if (callback != null) { callback.run(ran); + } else { + if(!ran) System.out.println("Tnt Gen didn't save!"); } } }); 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 6506f4914..b6f4edf09 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 @@ -174,7 +174,7 @@ public class TntGeneratorManager extends MiniPlugin ClanInfo owner = _clansManager.getClanUtility().getOwner(event.getClickedBlock().getLocation()); if(owner == null) return; //Wilderness TntGenerator generator = owner.getGenerator(); - + System.out.println("Unable to find generator"); //Create generator if not exist if(generator == null || !generator.getBlock().equals(event.getClickedBlock())) { generator = new TntGenerator(event.getClickedBlock()); diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java index ed9bbd104..e3a425c34 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java @@ -253,7 +253,7 @@ public class Gameplay extends MiniPlugin event.setCancelled(true); } } - + @EventHandler(priority = EventPriority.LOWEST) public void RedstoneCancel(BlockPlaceEvent event) { @@ -263,7 +263,17 @@ public class Gameplay extends MiniPlugin event.setCancelled(true); } } - + + @EventHandler(priority = EventPriority.LOWEST) + public void MaxHeight(BlockPlaceEvent event) + { + if (event.getBlock().getLocation().getBlockY() > 100) + { + UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot place blocks this high.")); + event.setCancelled(true); + } + } + /** * Disable all Piston related events in Clans * diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java index 7e6e18f42..e7059080f 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java @@ -13,9 +13,9 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent; public class GiantsBroadsword extends LegendaryItem { - public static final int SLOW_AMPLIFIER = 4; - public static final int REGEN_AMPLIFIER = 1; - public static final int EFFECT_DURATION = 10; // Duration of potion effect + public static final int SLOW_AMPLIFIER = 43; + public static final int REGEN_AMPLIFIER = 4; + public static final int EFFECT_DURATION = 20; // Duration of potion effect // (in ticks) public GiantsBroadsword() @@ -62,7 +62,7 @@ public class GiantsBroadsword extends LegendaryItem private void buffPlayer(Player player) { - grantPotionEffect(player, PotionEffectType.SLOW, 40, 5); - grantPotionEffect(player, PotionEffectType.REGENERATION, 2, 5); //Regen 4 + grantPotionEffect(player, PotionEffectType.SLOW, EFFECT_DURATION, SLOW_AMPLIFIER); + grantPotionEffect(player, PotionEffectType.REGENERATION, 2, REGEN_AMPLIFIER); //Regen } } From 002be01ef17058e5e0cf6590f603d2f622a87858 Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Sun, 31 Jan 2016 16:21:04 +0000 Subject: [PATCH 03/33] MAVEN TEST COMMIT --- Plugins/.project | 17 +++++++++++ .../org.eclipse.core.resources.prefs | 2 ++ Plugins/.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.Bungee.Mineplexer/.classpath | 20 +++++++++++++ Plugins/Mineplex.Bungee.Mineplexer/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.BungeeRotator/.classpath | 20 +++++++++++++ Plugins/Mineplex.BungeeRotator/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.Cache/.classpath | 20 +++++++++++++ Plugins/Mineplex.Cache/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.Core.Common/.classpath | 20 +++++++++++++ Plugins/Mineplex.Core.Common/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.Core/.classpath | 20 +++++++++++++ Plugins/Mineplex.Core/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ .../.classpath | 20 +++++++++++++ .../Mineplex.DDoSProtectionSwitcher/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.Database/.classpath | 20 +++++++++++++ Plugins/Mineplex.Database/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.EnjinTranslator/.classpath | 20 +++++++++++++ Plugins/Mineplex.EnjinTranslator/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.Game.Clans.Core/.classpath | 20 +++++++++++++ Plugins/Mineplex.Game.Clans.Core/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.Game.Clans/.classpath | 20 +++++++++++++ Plugins/Mineplex.Game.Clans/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.Hub/.classpath | 20 +++++++++++++ Plugins/Mineplex.Hub/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.MapParser/.classpath | 20 +++++++++++++ Plugins/Mineplex.MapParser/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ .../.classpath | 20 +++++++++++++ .../.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ .../Mineplex.Minecraft.Game.Core/.classpath | 20 +++++++++++++ Plugins/Mineplex.Minecraft.Game.Core/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.ServerData/.classpath | 20 +++++++++++++ Plugins/Mineplex.ServerData/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.ServerMonitor/.classpath | 20 +++++++++++++ Plugins/Mineplex.ServerMonitor/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.StaffServer/.classpath | 20 +++++++++++++ Plugins/Mineplex.StaffServer/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Mineplex.Votifier/.classpath | 20 +++++++++++++ Plugins/Mineplex.Votifier/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/Nautilus.Game.Arcade/.classpath | 20 +++++++++++++ Plugins/Nautilus.Game.Arcade/.project | 23 +++++++++++++++ .../org.eclipse.core.resources.prefs | 3 ++ .../.settings/org.eclipse.jdt.core.prefs | 5 ++++ .../.settings/org.eclipse.m2e.core.prefs | 4 +++ Plugins/pom.xml | 29 +++++++++++++++++++ 99 files changed, 1097 insertions(+) create mode 100644 Plugins/.project create mode 100644 Plugins/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Bungee.Mineplexer/.classpath create mode 100644 Plugins/Mineplex.Bungee.Mineplexer/.project create mode 100644 Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.BungeeRotator/.classpath create mode 100644 Plugins/Mineplex.BungeeRotator/.project create mode 100644 Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Cache/.classpath create mode 100644 Plugins/Mineplex.Cache/.project create mode 100644 Plugins/Mineplex.Cache/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Cache/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Cache/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Core.Common/.classpath create mode 100644 Plugins/Mineplex.Core.Common/.project create mode 100644 Plugins/Mineplex.Core.Common/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Core.Common/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Core/.classpath create mode 100644 Plugins/Mineplex.Core/.project create mode 100644 Plugins/Mineplex.Core/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Core/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Core/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.DDoSProtectionSwitcher/.classpath create mode 100644 Plugins/Mineplex.DDoSProtectionSwitcher/.project create mode 100644 Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Database/.classpath create mode 100644 Plugins/Mineplex.Database/.project create mode 100644 Plugins/Mineplex.Database/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Database/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Database/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.EnjinTranslator/.classpath create mode 100644 Plugins/Mineplex.EnjinTranslator/.project create mode 100644 Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Game.Clans.Core/.classpath create mode 100644 Plugins/Mineplex.Game.Clans.Core/.project create mode 100644 Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Game.Clans/.classpath create mode 100644 Plugins/Mineplex.Game.Clans/.project create mode 100644 Plugins/Mineplex.Game.Clans/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Game.Clans/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Hub/.classpath create mode 100644 Plugins/Mineplex.Hub/.project create mode 100644 Plugins/Mineplex.Hub/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Hub/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.MapParser/.classpath create mode 100644 Plugins/Mineplex.MapParser/.project create mode 100644 Plugins/Mineplex.MapParser/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.MapParser/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Minecraft.Game.ClassCombat/.classpath create mode 100644 Plugins/Mineplex.Minecraft.Game.ClassCombat/.project create mode 100644 Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Minecraft.Game.Core/.classpath create mode 100644 Plugins/Mineplex.Minecraft.Game.Core/.project create mode 100644 Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.ServerData/.classpath create mode 100644 Plugins/Mineplex.ServerData/.project create mode 100644 Plugins/Mineplex.ServerData/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.ServerData/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.ServerData/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.ServerMonitor/.classpath create mode 100644 Plugins/Mineplex.ServerMonitor/.project create mode 100644 Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.StaffServer/.classpath create mode 100644 Plugins/Mineplex.StaffServer/.project create mode 100644 Plugins/Mineplex.StaffServer/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.StaffServer/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.StaffServer/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Mineplex.Votifier/.classpath create mode 100644 Plugins/Mineplex.Votifier/.project create mode 100644 Plugins/Mineplex.Votifier/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Mineplex.Votifier/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Mineplex.Votifier/.settings/org.eclipse.m2e.core.prefs create mode 100644 Plugins/Nautilus.Game.Arcade/.classpath create mode 100644 Plugins/Nautilus.Game.Arcade/.project create mode 100644 Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.core.resources.prefs create mode 100644 Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs create mode 100644 Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.m2e.core.prefs diff --git a/Plugins/.project b/Plugins/.project new file mode 100644 index 000000000..a6856b606 --- /dev/null +++ b/Plugins/.project @@ -0,0 +1,17 @@ + + + mineplex-parent + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/.settings/org.eclipse.core.resources.prefs b/Plugins/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..99f26c020 --- /dev/null +++ b/Plugins/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/Plugins/.settings/org.eclipse.m2e.core.prefs b/Plugins/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.classpath b/Plugins/Mineplex.Bungee.Mineplexer/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Bungee.Mineplexer/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.project b/Plugins/Mineplex.Bungee.Mineplexer/.project new file mode 100644 index 000000000..b69c0ae2c --- /dev/null +++ b/Plugins/Mineplex.Bungee.Mineplexer/.project @@ -0,0 +1,23 @@ + + + mineplex-bungee-mineplexer + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.BungeeRotator/.classpath b/Plugins/Mineplex.BungeeRotator/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.BungeeRotator/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.BungeeRotator/.project b/Plugins/Mineplex.BungeeRotator/.project new file mode 100644 index 000000000..129c81c53 --- /dev/null +++ b/Plugins/Mineplex.BungeeRotator/.project @@ -0,0 +1,23 @@ + + + mineplex-bungeerotator + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Cache/.classpath b/Plugins/Mineplex.Cache/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Cache/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Cache/.project b/Plugins/Mineplex.Cache/.project new file mode 100644 index 000000000..6145fd700 --- /dev/null +++ b/Plugins/Mineplex.Cache/.project @@ -0,0 +1,23 @@ + + + mineplex-cache + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Cache/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Cache/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Cache/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Cache/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Cache/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Cache/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Cache/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Cache/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Cache/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Core.Common/.classpath b/Plugins/Mineplex.Core.Common/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Core.Common/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Core.Common/.project b/Plugins/Mineplex.Core.Common/.project new file mode 100644 index 000000000..9806b2840 --- /dev/null +++ b/Plugins/Mineplex.Core.Common/.project @@ -0,0 +1,23 @@ + + + mineplex-core-common + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Core.Common/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Core.Common/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Core.Common/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Core.Common/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Core/.classpath b/Plugins/Mineplex.Core/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Core/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Core/.project b/Plugins/Mineplex.Core/.project new file mode 100644 index 000000000..6a1bf4f06 --- /dev/null +++ b/Plugins/Mineplex.Core/.project @@ -0,0 +1,23 @@ + + + mineplex-core + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Core/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Core/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Core/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Core/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Core/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Core/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Core/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.classpath b/Plugins/Mineplex.DDoSProtectionSwitcher/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.DDoSProtectionSwitcher/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.project b/Plugins/Mineplex.DDoSProtectionSwitcher/.project new file mode 100644 index 000000000..a2ddab34c --- /dev/null +++ b/Plugins/Mineplex.DDoSProtectionSwitcher/.project @@ -0,0 +1,23 @@ + + + mineplex-ddosprotectionswitcher + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Database/.classpath b/Plugins/Mineplex.Database/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Database/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Database/.project b/Plugins/Mineplex.Database/.project new file mode 100644 index 000000000..759b2080b --- /dev/null +++ b/Plugins/Mineplex.Database/.project @@ -0,0 +1,23 @@ + + + mineplex-database + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Database/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Database/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Database/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Database/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Database/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Database/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Database/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Database/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Database/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.EnjinTranslator/.classpath b/Plugins/Mineplex.EnjinTranslator/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.EnjinTranslator/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.EnjinTranslator/.project b/Plugins/Mineplex.EnjinTranslator/.project new file mode 100644 index 000000000..571faeecc --- /dev/null +++ b/Plugins/Mineplex.EnjinTranslator/.project @@ -0,0 +1,23 @@ + + + mineplex-enjintranslator + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Game.Clans.Core/.classpath b/Plugins/Mineplex.Game.Clans.Core/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Game.Clans.Core/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Game.Clans.Core/.project b/Plugins/Mineplex.Game.Clans.Core/.project new file mode 100644 index 000000000..ab84c6a4a --- /dev/null +++ b/Plugins/Mineplex.Game.Clans.Core/.project @@ -0,0 +1,23 @@ + + + mineplex-game-clans-core + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Game.Clans/.classpath b/Plugins/Mineplex.Game.Clans/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Game.Clans/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Game.Clans/.project b/Plugins/Mineplex.Game.Clans/.project new file mode 100644 index 000000000..a26211ecb --- /dev/null +++ b/Plugins/Mineplex.Game.Clans/.project @@ -0,0 +1,23 @@ + + + mineplex-game-clans + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Hub/.classpath b/Plugins/Mineplex.Hub/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Hub/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Hub/.project b/Plugins/Mineplex.Hub/.project new file mode 100644 index 000000000..24d759c40 --- /dev/null +++ b/Plugins/Mineplex.Hub/.project @@ -0,0 +1,23 @@ + + + mineplex-hub + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Hub/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Hub/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Hub/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Hub/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Hub/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Hub/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.MapParser/.classpath b/Plugins/Mineplex.MapParser/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.MapParser/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.MapParser/.project b/Plugins/Mineplex.MapParser/.project new file mode 100644 index 000000000..43bcff000 --- /dev/null +++ b/Plugins/Mineplex.MapParser/.project @@ -0,0 +1,23 @@ + + + mineplex-mapparser + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.MapParser/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.MapParser/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.MapParser/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.MapParser/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.MapParser/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.MapParser/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.classpath b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.project b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.project new file mode 100644 index 000000000..ec0a67356 --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.project @@ -0,0 +1,23 @@ + + + mineplex-minecraft-game-classcombat + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.classpath b/Plugins/Mineplex.Minecraft.Game.Core/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.Core/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.project b/Plugins/Mineplex.Minecraft.Game.Core/.project new file mode 100644 index 000000000..34b626ff9 --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.Core/.project @@ -0,0 +1,23 @@ + + + mineplex-minecraft-game-core + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.ServerData/.classpath b/Plugins/Mineplex.ServerData/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.ServerData/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.ServerData/.project b/Plugins/Mineplex.ServerData/.project new file mode 100644 index 000000000..cc601dfce --- /dev/null +++ b/Plugins/Mineplex.ServerData/.project @@ -0,0 +1,23 @@ + + + mineplex-serverdata + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.ServerData/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.ServerData/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.ServerData/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.ServerData/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.ServerData/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.ServerData/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.ServerData/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.ServerData/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.ServerData/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.ServerMonitor/.classpath b/Plugins/Mineplex.ServerMonitor/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.ServerMonitor/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.ServerMonitor/.project b/Plugins/Mineplex.ServerMonitor/.project new file mode 100644 index 000000000..674450760 --- /dev/null +++ b/Plugins/Mineplex.ServerMonitor/.project @@ -0,0 +1,23 @@ + + + mineplex-servermonitor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.StaffServer/.classpath b/Plugins/Mineplex.StaffServer/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.StaffServer/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.StaffServer/.project b/Plugins/Mineplex.StaffServer/.project new file mode 100644 index 000000000..d237ceb58 --- /dev/null +++ b/Plugins/Mineplex.StaffServer/.project @@ -0,0 +1,23 @@ + + + mineplex-staffserver + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.StaffServer/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.StaffServer/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.StaffServer/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.StaffServer/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.StaffServer/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.StaffServer/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.StaffServer/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.StaffServer/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.StaffServer/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Mineplex.Votifier/.classpath b/Plugins/Mineplex.Votifier/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Mineplex.Votifier/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Mineplex.Votifier/.project b/Plugins/Mineplex.Votifier/.project new file mode 100644 index 000000000..e22997649 --- /dev/null +++ b/Plugins/Mineplex.Votifier/.project @@ -0,0 +1,23 @@ + + + mineplex-votifier + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Mineplex.Votifier/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Votifier/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Mineplex.Votifier/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Votifier/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Votifier/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Mineplex.Votifier/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Votifier/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Votifier/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Mineplex.Votifier/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/Nautilus.Game.Arcade/.classpath b/Plugins/Nautilus.Game.Arcade/.classpath new file mode 100644 index 000000000..149cb3c90 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/.classpath @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Plugins/Nautilus.Game.Arcade/.project b/Plugins/Nautilus.Game.Arcade/.project new file mode 100644 index 000000000..3bdc39535 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/.project @@ -0,0 +1,23 @@ + + + nautilus-game-arcade + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.core.resources.prefs b/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..7a5313928 --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 +encoding/src=UTF-8 diff --git a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs b/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..714351aec --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.m2e.core.prefs b/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 000000000..f897a7f1c --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Plugins/pom.xml b/Plugins/pom.xml index 7706ab5ee..63426e9ae 100644 --- a/Plugins/pom.xml +++ b/Plugins/pom.xml @@ -175,6 +175,35 @@ false + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + net.md-5 + + scriptus + + + [0.3.1,) + + + describe + + + + + + + + + + From 84b887fe8962c38b387c11bc7ceab8502e92f5fd Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Mon, 1 Feb 2016 19:53:59 +0000 Subject: [PATCH 04/33] that's not needed --- .../src/mineplex/game/clans/clans/ClansManager.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index 218d7947b..33e8da07d 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -213,11 +213,6 @@ public class ClansManager extends MiniClientPluginimplements IRelati { super("Clans Manager", plugin); - if (serverName.equals("GarboClans-1")) - { - addCommand(new Meow(new OutpostManager(this))); - } - _instance = this; _punish = punish; From 8a0f58543246af72fafc8e392c66f6fe7c40e76f Mon Sep 17 00:00:00 2001 From: phobia Date: Tue, 2 Feb 2016 22:11:52 +1100 Subject: [PATCH 05/33] Added fix to WarPoint evasion bug + 1 dmg bug --- .../game/clans/clans/ClansManager.java | 12 +++- .../clans/warpoints/WarPointEvasion.java | 58 +++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index 218d7947b..e5b721b4c 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -9,6 +9,7 @@ import java.util.Set; import java.util.TimeZone; import java.util.UUID; +import mineplex.game.clans.clans.warpoints.WarPointEvasion; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -259,9 +260,9 @@ public class ClansManager extends MiniClientPluginimplements IRelati _itemMapManager = new ItemMapManager(this, _worldEvent); new TntGeneratorManager(plugin, this); new SupplyDropManager(plugin, this); - _explosion = new Explosion(plugin, blockRestore); - + new WarPointEvasion(plugin); + // new ClansLoginManager(getPlugin(), clientManager, _serverName); _clanShop = new ClanShop(this, clientManager, donationManager); @@ -608,6 +609,13 @@ public class ClansManager extends MiniClientPluginimplements IRelati { player.setOp(true); } + if(player.getInventory().getHelmet() != null) { //Reset helmet to fix 1 damage bug + ItemStack helmet = player.getInventory().getHelmet().clone(); + player.getInventory().setHelmet(null); + runSyncLater(() -> { + player.getInventory().setHelmet(helmet); + }, 5L); + } } @EventHandler diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java new file mode 100644 index 000000000..fb6e9bd87 --- /dev/null +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java @@ -0,0 +1,58 @@ +package mineplex.game.clans.clans.warpoints; + +import com.google.common.collect.Maps; +import mineplex.core.MiniPlugin; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilTime; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.game.clans.clans.event.PlayerPreClaimTerritoryEvent; +import mineplex.game.clans.clans.event.PlayerUnClaimTerritoryEvent; +import org.bukkit.Chunk; +import org.bukkit.event.EventHandler; +import org.bukkit.plugin.java.JavaPlugin; + +import java.util.HashMap; + +public class WarPointEvasion extends MiniPlugin{ + private HashMap _cooldown; + private final long COOLDOWN_TIME = 1000 * 60 * 30; + + public WarPointEvasion(JavaPlugin plugin) { + super("WP Evasion", plugin); + _cooldown = Maps.newHashMap(); + } + + @EventHandler + public void updateCooldown(UpdateEvent event) { + if(!event.getType().equals(UpdateType.SEC)) return; + + for(Chunk chunk : _cooldown.keySet()) { + if(UtilTime.elapsed(_cooldown.get(chunk), COOLDOWN_TIME)) { + _cooldown.remove(chunk); + } else { + _cooldown.put(chunk, _cooldown.get(chunk) - 1000); + } + } + } + + @EventHandler + public void onClaim(PlayerPreClaimTerritoryEvent event) { + Chunk chunk = event.getClaimedChunk(); + if(_cooldown.containsKey(chunk)) { + event.setCancelled(true); + event.getClaimer().sendMessage(F.main("Clans", "You cannot claim this chunk for another " + UtilTime.convertString(_cooldown.get(chunk), 1, UtilTime.TimeUnit.MINUTES))); + } + } + + @EventHandler + public void onunClaim(PlayerUnClaimTerritoryEvent event) { + Chunk chunk = event.getUnClaimedChunk(); + if(_cooldown.containsKey(chunk)) { + // Error maybe? + _cooldown.remove(chunk); + } + _cooldown.put(chunk, System.currentTimeMillis()); + + } +} From 59e564cdc605778082c56dd32f912df95a584c69 Mon Sep 17 00:00:00 2001 From: phobia Date: Tue, 2 Feb 2016 23:18:05 +1100 Subject: [PATCH 06/33] Fixes to war point evasion --- .../game/clans/clans/warpoints/WarPointEvasion.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java index fb6e9bd87..74f8aefba 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java @@ -27,13 +27,7 @@ public class WarPointEvasion extends MiniPlugin{ public void updateCooldown(UpdateEvent event) { if(!event.getType().equals(UpdateType.SEC)) return; - for(Chunk chunk : _cooldown.keySet()) { - if(UtilTime.elapsed(_cooldown.get(chunk), COOLDOWN_TIME)) { - _cooldown.remove(chunk); - } else { - _cooldown.put(chunk, _cooldown.get(chunk) - 1000); - } - } + _cooldown.keySet().stream().filter(chunk -> UtilTime.elapsed(_cooldown.get(chunk), COOLDOWN_TIME)).forEach(chunk -> _cooldown.remove(chunk)); } @EventHandler @@ -41,7 +35,7 @@ public class WarPointEvasion extends MiniPlugin{ Chunk chunk = event.getClaimedChunk(); if(_cooldown.containsKey(chunk)) { event.setCancelled(true); - event.getClaimer().sendMessage(F.main("Clans", "You cannot claim this chunk for another " + UtilTime.convertString(_cooldown.get(chunk), 1, UtilTime.TimeUnit.MINUTES))); + event.getClaimer().sendMessage(F.main("Clans", "You cannot claim this chunk for another " + UtilTime.convertString(System.currentTimeMillis() - _cooldown.get(chunk), 1, UtilTime.TimeUnit.MINUTES))); } } From cfbfb1fa3be2305ade73653df42fd850f97993a7 Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Tue, 2 Feb 2016 08:20:11 +0000 Subject: [PATCH 07/33] raised war points for invasion to 25 --- .../mineplex/game/clans/clans/war/WarManager.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java index 166693db2..e10d1070e 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java @@ -25,9 +25,9 @@ import mineplex.core.scoreboard.elements.ScoreboardElement; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.game.clans.clans.ClanInfo; +import mineplex.game.clans.clans.ClanTips.TipType; import mineplex.game.clans.clans.ClansManager; import mineplex.game.clans.clans.ClansUtility; -import mineplex.game.clans.clans.ClanTips.TipType; import mineplex.game.clans.clans.event.ClanDisbandedEvent; import mineplex.game.clans.clans.event.ClansPlayerDeathEvent; import mineplex.game.clans.clans.war.command.WarPointsCommand; @@ -38,7 +38,7 @@ import mineplex.game.clans.core.war.ClanWarData; public class WarManager extends MiniPlugin implements ScoreboardElement { public static final int WAR_START_POINTS = 0; - public static final int WAR_FINISH_POINTS = 20; + public static final int WAR_FINISH_POINTS = 25; public static final long INVADE_LENGTH = 60000L * 30; // 30 Minutes public static final long WAR_COOLDOWN = 60000L * 30; // 30 Minutes @@ -117,11 +117,18 @@ public class WarManager extends MiniPlugin implements ScoreboardElement @EventHandler public void handleDeath(final ClansPlayerDeathEvent event) { - if (event.getPlayer() != null && event.getPlayer().getClan() != null) + ClanInfo deathClan = event.getPlayer().getClan(); + + if (deathClan == null) + { + deathClan = _clansManager.leftRecently(event.getPlayer().getPlayer().getUniqueId(), 60000).getLeft(); + } + + if (event.getPlayer() != null && deathClan != null) { if (event.getKiller() != null && event.getKiller().getClan() != null) { - final ClanInfo clan = event.getPlayer().getClan(); + final ClanInfo clan = deathClan; final ClanInfo killerClan = event.getKiller().getClan(); ClanWarData war = clan.getWarData(killerClan); From 23883148dda73b86b2eb187669c6dfe8cfadd7ec Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Tue, 2 Feb 2016 20:55:23 +0000 Subject: [PATCH 08/33] alpha fixes --- .../mineplex/core/common/util/UtilWorld.java | 36 +++++++++++- .../mineplex/game/clans/clans/ClanInfo.java | 7 +++ .../game/clans/clans/ClansManager.java | 23 ++++++-- .../game/clans/clans/ClansUtility.java | 6 +- .../clans/clans/commands/ClansCommand.java | 56 +++++++++++++++++++ .../game/clans/items/GearManager.java | 5 +- 6 files changed, 124 insertions(+), 9 deletions(-) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilWorld.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilWorld.java index c2a3c40ab..3d0d1d18a 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilWorld.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilWorld.java @@ -1,15 +1,19 @@ package mineplex.core.common.util; import java.util.Collection; - +import java.util.List; +import java.util.function.Predicate; import org.bukkit.Chunk; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.World.Environment; import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; import org.bukkit.util.Vector; +import com.google.common.collect.Lists; + public class UtilWorld { public static World getWorld(String world) @@ -194,4 +198,34 @@ public class UtilWorld return vec.toLocation(world); } + + public static Location getNearestLocationThatMatchesNeeds(Location location, Predicate needs) + { + List branch = branch(location); + + for (Block block : branch) + { + if (needs.test(block.getLocation())) + { + return block.getLocation(); + } + else + { + return getNearestLocationThatMatchesNeeds(block.getLocation(), needs); + } + } + + return null; + } + + private static List branch(Location origin) + { + return Lists.newArrayList(origin.getBlock(), + origin.getBlock().getRelative(BlockFace.DOWN), + origin.getBlock().getRelative(BlockFace.UP), + origin.getBlock().getRelative(BlockFace.NORTH), + origin.getBlock().getRelative(BlockFace.EAST), + origin.getBlock().getRelative(BlockFace.SOUTH), + origin.getBlock().getRelative(BlockFace.WEST)); + } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClanInfo.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClanInfo.java index fac283def..9f20b5ec9 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClanInfo.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClanInfo.java @@ -67,6 +67,7 @@ public class ClanInfo private HashMap _warOut = new HashMap(); // Temporary + private NautHashMap _recentlyLeft = new NautHashMap<>(); private NautHashMap _inviteeMap = new NautHashMap(); private NautHashMap _inviterMap = new NautHashMap(); private List _onlinePlayers = new ArrayList(); @@ -76,6 +77,7 @@ public class ClanInfo public ClansManager Clans; private BedStatus _bedStatus = null; + public ClanInfo(ClansManager clans, ClanToken token) { @@ -800,4 +802,9 @@ public class ClanInfo { return _bedStatus == BedStatus.DESTROYED ? C.cRed + "Destroyed" : (_bedStatus == BedStatus.DOESNT_EXIST ? C.cWhite + "None" : (_bedStatus == BedStatus.EXISTS_AND_OBSTRUCTED ? C.cRed + "Obstructed" : (_bedStatus == BedStatus.EXISTS_AND_UNOBSTRUCTED ? C.cGreen + UtilWorld.locToStrClean(_home) : "N/A"))); } + + public void left(String name) + { + _recentlyLeft.put(name, System.currentTimeMillis()); + } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index 6cb20f082..89cc68e01 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -9,7 +9,6 @@ import java.util.Set; import java.util.TimeZone; import java.util.UUID; -import mineplex.game.clans.clans.warpoints.WarPointEvasion; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -40,7 +39,7 @@ import mineplex.core.account.CoreClientManager; import mineplex.core.achievement.AchievementManager; import mineplex.core.blockrestore.BlockRestore; import mineplex.core.chat.Chat; -import mineplex.core.chat.MessageData; +import mineplex.core.common.Pair; import mineplex.core.common.Rank; import mineplex.core.common.util.C; import mineplex.core.common.util.F; @@ -76,10 +75,8 @@ import mineplex.game.clans.clans.commands.ClanManagementCommand; import mineplex.game.clans.clans.commands.ClansAllyChatCommand; import mineplex.game.clans.clans.commands.ClansChatCommand; import mineplex.game.clans.clans.commands.ClansCommand; -import mineplex.game.clans.clans.commands.ClansLoginManager; import mineplex.game.clans.clans.commands.KillCommand; import mineplex.game.clans.clans.commands.MapCommand; -import mineplex.game.clans.clans.commands.Meow; import mineplex.game.clans.clans.commands.RegionsCommand; import mineplex.game.clans.clans.data.PlayerClan; import mineplex.game.clans.clans.event.ClansPlayerDeathEvent; @@ -87,7 +84,6 @@ import mineplex.game.clans.clans.gui.ClanShop; import mineplex.game.clans.clans.loot.LootManager; import mineplex.game.clans.clans.map.ItemMapManager; import mineplex.game.clans.clans.observer.ObserverManager; -import mineplex.game.clans.clans.outpost.OutpostManager; import mineplex.game.clans.clans.playtime.Playtime; import mineplex.game.clans.clans.potato.PotatoManager; import mineplex.game.clans.clans.pvptimer.PvpTimer; @@ -99,6 +95,7 @@ import mineplex.game.clans.clans.stuck.StuckManager; import mineplex.game.clans.clans.supplyDrop.SupplyDropManager; import mineplex.game.clans.clans.tntGenerator.TntGeneratorManager; import mineplex.game.clans.clans.war.WarManager; +import mineplex.game.clans.clans.warpoints.WarPointEvasion; import mineplex.game.clans.clans.worldevent.WorldEventManager; import mineplex.game.clans.core.ClanDeleteCommand; import mineplex.game.clans.core.ClanLoadCommand; @@ -201,6 +198,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati // private NautHashMap _clanMemberNameMap = new // NautHashMap(); private NautHashMap _clanMemberUuidMap = new NautHashMap(); + private NautHashMap> _clanMemberLeftMap = new NautHashMap<>(); private NautHashMap _claimMap = new NautHashMap(); private NautHashMap _unclaimMap = new NautHashMap(); @@ -1163,4 +1161,19 @@ public class ClansManager extends MiniClientPluginimplements IRelati ClansPlayerDeathEvent clansPlayerDeathEvent = new ClansPlayerDeathEvent(event, playerClan, killerClan); Bukkit.getServer().getPluginManager().callEvent(clansPlayerDeathEvent); } + + public void justLeft(UUID uniqueId, ClanInfo clan) + { + _clanMemberLeftMap.put(uniqueId, Pair.create(clan, System.currentTimeMillis())); + } + + public Pair leftRecently(UUID uniqueId, long time) + { + if (_clanMemberLeftMap.containsKey(uniqueId) && (System.currentTimeMillis() - _clanMemberLeftMap.get(uniqueId).getRight()) <= time) + { + return Pair.create(_clanMemberLeftMap.get(uniqueId).getLeft(), (System.currentTimeMillis() - _clanMemberLeftMap.get(uniqueId).getRight())); + } + + return null; + } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java index 6a1356d8c..4e466128c 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansUtility.java @@ -632,6 +632,8 @@ public class ClansUtility // Inform Clans.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You left " + F.elem("Clan " + clan.getName()) + ".")); clan.inform(F.name(caller.getName()) + " has left your Clan.", null); + + clan.left(caller.getName()); } }); } @@ -677,8 +679,8 @@ public class ClansUtility if (!data) { Clans.getTutorials().sendTutorialMsg(caller, F.main("Clans", "There was an error processing your request. Try again later")); - - }else + } + else { Clans.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You disbanded your Clan.")); } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java index cbc4c02dc..6299268cd 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java @@ -30,6 +30,7 @@ import mineplex.game.clans.clans.ClansManager; import mineplex.game.clans.clans.ClientClan; import mineplex.game.clans.clans.event.ClanJoinEvent; import mineplex.game.clans.clans.event.ClansCommandExecutedEvent; +import mineplex.game.clans.core.repository.ClanTerritory; import net.minecraft.server.v1_8_R3.EnumDirection; public class ClansCommand extends CommandBase @@ -105,6 +106,8 @@ public class ClansCommand extends CommandBase else if (args[0].equalsIgnoreCase("sethome")) homeSet(caller); + else if (args[0].equalsIgnoreCase("stuck")) + stuck(caller); /* * else if (args[0].equalsIgnoreCase("enemy") || args[0].equals("e")) @@ -211,6 +214,8 @@ public class ClansCommand extends CommandBase _manager.getTutorials().sendTutorialMsg(caller, F.help("/c map ", "View Clan Map", Rank.ALL)); _manager.getTutorials().sendTutorialMsg(caller, F.help("/cc (Message)", "Clan Chat (Toggle)", Rank.ALL)); + _manager.getTutorials().sendTutorialMsg(caller, F.help("/c stuck", "Teleports you to the nearest Wilderness location", Rank.ALL)); + _manager.getTutorials().sendTutorialMsg(caller, F.help("/c promote ", "Promote Player in Clan", Rank.MODERATOR)); _manager.getTutorials().sendTutorialMsg(caller, F.help("/c demote ", "Demote Player in Clan", Rank.MODERATOR)); @@ -242,6 +247,12 @@ public class ClansCommand extends CommandBase return; } + if (Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000).getLeft() != null) + { + _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You cannot create a Clan for " + C.mTime + UtilTime.MakeStr(Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000).getRight()) + C.mBody + ".")); + return; + } + /* * TODO if (!client.canJoin()) { _manager.getTutorials().sendTutorialMsg(caller, * F.main("Clans", "You cannot join a Clan for " + C.mTime + @@ -344,6 +355,43 @@ public class ClansCommand extends CommandBase Plugin.getClanUtility().invite(caller, clan, target); } + public void stuck(final Player caller) + { + ClanTerritory territory = Plugin.getClanUtility().getClaim(caller.getLocation()); + + String clanName = Plugin.getClanUtility().getClanByPlayer(caller) == null ? null : Plugin.getClanUtility().getClanByPlayer(caller).getName(); + + if (territory == null || territory.Safe || territory.Owner.equals(clanName)) + { + _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You must be in another Clan's territory to use this.")); + return; + } + + DelayedTask.Instance.doDelay(caller, "Wilderness Teleport", new Callback() { + public void run(DelayedTaskClient player) + { + // Do + player.getPlayer().teleport(UtilWorld.getNearestLocationThatMatchesNeeds(caller.getLocation(), location -> + Plugin.getClanUtility().getClaim(location) == null && UtilBlock.getHighest(location.getWorld(), location.getBlockX(), location.getBlockZ()).getY() <= location.getBlockY() + )); + + // Inform + _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You have been teleported to the Wilderness.")); + } + }, new Callback() { + public void run(DelayedTaskClient client) + { + UtilTextMiddle.display("", "Teleporting to Wilderness in " + F.elem(UtilTime.MakeStr(Math.max(0, client.getTimeLeft("Wilderness Teleport")))), 0, 5, 0, client.getPlayer()); + } + }, new Callback() { + public void run(DelayedTaskClient client) + { + UtilPlayer.message(client.getPlayer(), F.main("Clans", "Teleport has been cancelled due to movement.")); + } + }, 2 * 60 * 1000, false); + + } + public void join(final Player caller, String[] args) { if (Plugin.getClanMemberUuidMap().containsKey(caller.getUniqueId())) @@ -352,6 +400,12 @@ public class ClansCommand extends CommandBase return; } + if (Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000).getLeft() != null) + { + _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You cannot join a Clan for " + C.mTime + UtilTime.MakeStr(Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000).getRight()) + C.mBody + ".")); + return; + } + if (!Plugin.Get(caller).canJoin()) { _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You cannot join a Clan for " + C.mTime + UtilTime.convertString(System.currentTimeMillis() - Plugin.Get(caller).getDelay(), 1, TimeUnit.FIT) + C.mBody + ".")); @@ -438,6 +492,8 @@ public class ClansCommand extends CommandBase // Inform _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You left " + F.elem("Clan " + clan.getName()) + ".")); clan.inform(F.name(caller.getName()) + " has left your Clan.", null); + + _manager.justLeft(caller.getUniqueId(), clan); } }); } 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 b6505c23b..73242f881 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 @@ -130,7 +130,10 @@ public class GearManager extends MiniPlugin implements IPacketHandler, Runnable // TODO: Introduce configurable non-hardcoded values for generation // weights? _attributeWeights = new WeightSet(new Weight(3, 3), new Weight(20, 2), new Weight(77, 1)); - _typeWeights = new WeightSet(new Weight(10, ItemType.LEGENDARY), new Weight(45, ItemType.ARMOR), new Weight(23, ItemType.WEAPON), new Weight(22, ItemType.BOW)); + _typeWeights = new WeightSet(new Weight(6, ItemType.LEGENDARY), + new Weight(46, ItemType.ARMOR), + new Weight(25, ItemType.WEAPON), + new Weight(23, ItemType.BOW)); // Weapon-based attributes _weaponAttributes = new WeightSet>(FrostedAttribute.class, SharpAttribute.class, JaggedAttribute.class, HasteAttribute.class, FlamingAttribute.class, ConqueringAttribute.class); From 6fea76a8e4d76de92e989b986efb98b8f3f2835a Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Tue, 2 Feb 2016 21:38:38 +0000 Subject: [PATCH 09/33] finalized alpha patches --- .../mineplex/core/common/util/UtilBlock.java | 5 ++ .../mineplex/core/common/util/UtilWorld.java | 19 ------ .../game/clans/clans/ClansManager.java | 2 +- .../clans/clans/commands/ClansCommand.java | 60 +++++++++++++++++-- .../game/clans/clans/war/WarManager.java | 2 +- 5 files changed, 61 insertions(+), 27 deletions(-) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilBlock.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilBlock.java index 3acb09f70..1f84fdaaa 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilBlock.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilBlock.java @@ -464,6 +464,11 @@ public class UtilBlock return getHighest(world, x, z, null); } + public static Block getHighest(World world, Location location) + { + return getHighest(world, location.getBlockX(), location.getBlockZ(), null); + } + public static Block getHighest(World world, int x, int z, HashSet ignore) { Block block = world.getHighestBlockAt(x, z); diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilWorld.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilWorld.java index 3d0d1d18a..321ba7ee9 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilWorld.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilWorld.java @@ -198,25 +198,6 @@ public class UtilWorld return vec.toLocation(world); } - - public static Location getNearestLocationThatMatchesNeeds(Location location, Predicate needs) - { - List branch = branch(location); - - for (Block block : branch) - { - if (needs.test(block.getLocation())) - { - return block.getLocation(); - } - else - { - return getNearestLocationThatMatchesNeeds(block.getLocation(), needs); - } - } - - return null; - } private static List branch(Location origin) { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index 89cc68e01..2224e07fc 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -1171,7 +1171,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati { if (_clanMemberLeftMap.containsKey(uniqueId) && (System.currentTimeMillis() - _clanMemberLeftMap.get(uniqueId).getRight()) <= time) { - return Pair.create(_clanMemberLeftMap.get(uniqueId).getLeft(), (System.currentTimeMillis() - _clanMemberLeftMap.get(uniqueId).getRight())); + return Pair.create(_clanMemberLeftMap.get(uniqueId).getLeft(), time - (System.currentTimeMillis() - _clanMemberLeftMap.get(uniqueId).getRight())); } return null; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java index 6299268cd..536c29993 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java @@ -1,10 +1,17 @@ package mineplex.game.clans.clans.commands; +import java.util.Collections; +import java.util.List; + import org.bukkit.Bukkit; +import org.bukkit.Chunk; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.BlockFace; import org.bukkit.entity.Player; +import org.bukkit.plugin.Plugin; + +import com.google.common.collect.Lists; import mineplex.core.command.CommandBase; import mineplex.core.common.Rank; @@ -13,6 +20,7 @@ import mineplex.core.common.util.Callback; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilInput; +import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTextMiddle; @@ -247,7 +255,7 @@ public class ClansCommand extends CommandBase return; } - if (Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000).getLeft() != null) + if (Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000) != null) { _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You cannot create a Clan for " + C.mTime + UtilTime.MakeStr(Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000).getRight()) + C.mBody + ".")); return; @@ -371,9 +379,16 @@ public class ClansCommand extends CommandBase public void run(DelayedTaskClient player) { // Do - player.getPlayer().teleport(UtilWorld.getNearestLocationThatMatchesNeeds(caller.getLocation(), location -> - Plugin.getClanUtility().getClaim(location) == null && UtilBlock.getHighest(location.getWorld(), location.getBlockX(), location.getBlockZ()).getY() <= location.getBlockY() - )); + + Location loc = getWildLoc(player.getPlayer().getLocation()); + + if (loc == null) + { + _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "Error whilst finding location to teleport to.")); + return; + } + + player.getPlayer().teleport(loc); // Inform _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You have been teleported to the Wilderness.")); @@ -388,10 +403,43 @@ public class ClansCommand extends CommandBase { UtilPlayer.message(client.getPlayer(), F.main("Clans", "Teleport has been cancelled due to movement.")); } - }, 2 * 60 * 1000, false); + }, 7 * 1000, false); } + public Location getWildLoc(Location origin) + { + Chunk wildLoc = origin.getChunk(); + + List worldChunks = Lists.newArrayList(origin.getWorld().getLoadedChunks()); + + Collections.sort( + worldChunks, + (c1, c2) -> + (int) ((int) + origin.distance( + UtilBlock.getHighest(origin.getWorld(), + c1.getBlock(7, origin.getBlockY(), 7).getLocation() + ).getLocation()) + - + origin.distance( + UtilBlock.getHighest(origin.getWorld(), + c2.getBlock(7, origin.getBlockY(), 7).getLocation() + ).getLocation()) + ) + ); + + for (Chunk chunk : worldChunks) + { + if (Plugin.getClanUtility().getClaim(chunk) == null) + { + return chunk.getBlock(6, UtilBlock.getHighest(origin.getWorld(), chunk.getBlock(6, 0, 6).getLocation()).getY(), 6).getLocation(); + } + } + + return null; + } + public void join(final Player caller, String[] args) { if (Plugin.getClanMemberUuidMap().containsKey(caller.getUniqueId())) @@ -400,7 +448,7 @@ public class ClansCommand extends CommandBase return; } - if (Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000).getLeft() != null) + if (Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000) != null) { _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You cannot join a Clan for " + C.mTime + UtilTime.MakeStr(Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000).getRight()) + C.mBody + ".")); return; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java index e10d1070e..39a1e2680 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/war/WarManager.java @@ -121,7 +121,7 @@ public class WarManager extends MiniPlugin implements ScoreboardElement if (deathClan == null) { - deathClan = _clansManager.leftRecently(event.getPlayer().getPlayer().getUniqueId(), 60000).getLeft(); + deathClan = _clansManager.leftRecently(event.getPlayer().getPlayer().getUniqueId(), 60000) == null ? deathClan : _clansManager.leftRecently(event.getPlayer().getPlayer().getUniqueId(), 60000).getLeft(); } if (event.getPlayer() != null && deathClan != null) From 0e0582a1a7c339a00f49fcdfabc40314327fc88f Mon Sep 17 00:00:00 2001 From: phobia Date: Wed, 3 Feb 2016 10:39:21 +1100 Subject: [PATCH 10/33] Added safe zone protection for flame --- .../src/mineplex/game/clans/clans/ClansGame.java | 4 ++-- .../mineplex/game/clans/items/attributes/AttackAttribute.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java index 9db1f9d2e..01b9f4a39 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java @@ -263,7 +263,7 @@ public class ClansGame extends MiniPlugin { // Cancel event.SetCancelled("Clans Ally"); - + // Inform if (damager != null) { @@ -538,7 +538,7 @@ public class ClansGame extends MiniPlugin ClanInfo clan = _clans.getClanUtility().getOwner(event.getEntity().getLocation()); if (clan == null) return; - + if (_clans.getWarManager().isBeingInvaded(clan)) { // Allow because of invasion diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/AttackAttribute.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/AttackAttribute.java index 836665064..58f115f2d 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/AttackAttribute.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/AttackAttribute.java @@ -30,6 +30,7 @@ public abstract class AttackAttribute extends ItemAttribute @Override public void onAttack(CustomDamageEvent event) { + if(event.GetCancellers().contains("Safe Zone")) return; _attackCount++; System.out.println("Attack count " + _attackCount + " - " + _attackLimit); if (_attackCount >= _attackLimit) From f011fdad5fd601f32fe44f4da8ca28744ceaa957 Mon Sep 17 00:00:00 2001 From: phobia Date: Wed, 3 Feb 2016 15:10:56 +1100 Subject: [PATCH 11/33] Fixes to TntProtection --- .../src/mineplex/game/clans/clans/ClanInfo.java | 8 ++++++-- .../src/mineplex/game/clans/clans/ClansGame.java | 7 ++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClanInfo.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClanInfo.java index fac283def..d5bc9c5ba 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClanInfo.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClanInfo.java @@ -478,7 +478,7 @@ public class ClanInfo public boolean isOnline() { - return isOnlineNow();// || System.currentTimeMillis() - _lastOnline.getTime() < Clans.getOnlineTime(); + return isOnlineNow(); } public String getProtected() @@ -487,7 +487,7 @@ public class ClanInfo if (cur.isOnline()) return C.cRed + "No - Clan Members are Online"; - if (System.currentTimeMillis() - _lastOnline.getTime() > Clans.getOnlineTime()) + if (UtilTime.elapsed(_lastOnline.getTime(), Clans.getOnlineTime())) return C.cGreen + "Yes - Clan Members are Offline"; return C.cGold @@ -496,6 +496,10 @@ public class ClanInfo TimeUnit.FIT) + " to Protection"; } + public boolean isProtected() { + return getProtected().startsWith(C.cGreen + "Yes"); + } + public TntGenerator getGenerator() { return _generator; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java index 01b9f4a39..b1e198995 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansGame.java @@ -520,8 +520,9 @@ public class ClansGame extends MiniPlugin { ClanInfo clan = _clans.getClanUtility().getClanByPlayer(event.getPlayer()); if (clan == null) return; - - clan.setLastOnline(new Timestamp(System.currentTimeMillis())); + + if(!clan.isOnline()) clan.setLastOnline(new Timestamp(System.currentTimeMillis())); //Noone else on + else clan.setLastOnline(new Timestamp(0)); } @EventHandler(priority = EventPriority.LOWEST) @@ -545,7 +546,7 @@ public class ClansGame extends MiniPlugin return; } - if (!clan.isOnline()) + if (!clan.isProtected()) event.setCancelled(true); else clan.inform(C.cRed + "Your Territory is under attack!", null); From e61b36f55c0a0a2d4fe703ed5513e3c02bd141e4 Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Thu, 4 Feb 2016 22:55:37 +0000 Subject: [PATCH 12/33] Fixed /c stuck timer taking 7 seconds instead of 2 minutes --- .../src/mineplex/game/clans/clans/commands/ClansCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java index 536c29993..19a7c9a4a 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java @@ -403,7 +403,7 @@ public class ClansCommand extends CommandBase { UtilPlayer.message(client.getPlayer(), F.main("Clans", "Teleport has been cancelled due to movement.")); } - }, 7 * 1000, false); + }, 2 * 60 * 1000, false); } From 6fd9cffb016fbfb5657dd758b7673501023f0ac2 Mon Sep 17 00:00:00 2001 From: phobia Date: Fri, 5 Feb 2016 10:12:18 +1100 Subject: [PATCH 13/33] Clans alpha bug fixes --- .../src/mineplex/game/clans/gameplay/Gameplay.java | 11 +++++++++++ .../game/clans/items/attributes/AttackAttribute.java | 2 +- .../items/attributes/weapon/FlamingAttribute.java | 6 ++++++ .../clans/items/legendaries/GiantsBroadsword.java | 5 ++--- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java index e3a425c34..3d4320ac8 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java @@ -14,6 +14,7 @@ import org.bukkit.Sound; import org.bukkit.block.Biome; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; +import org.bukkit.block.BlockState; import org.bukkit.entity.EntityType; import org.bukkit.entity.ItemFrame; import org.bukkit.entity.Player; @@ -40,6 +41,7 @@ import org.bukkit.event.player.PlayerFishEvent.State; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.weather.WeatherChangeEvent; +import org.bukkit.event.world.StructureGrowEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.material.Dye; @@ -271,9 +273,17 @@ public class Gameplay extends MiniPlugin { UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot place blocks this high.")); event.setCancelled(true); + } else if(event.getBlock().getLocation().getBlockY() == 99 && event.getBlock().getType().name().contains("DOOR") && !event.getBlock().getType().equals(Material.TRAP_DOOR)) { + UtilPlayer.message(event.getPlayer(), F.main("Game", "You cannot place blocks this high.")); + event.setCancelled(true); } } + @EventHandler(priority = EventPriority.LOWEST) + public void GrowTree(StructureGrowEvent event) { + event.getBlocks().stream().filter(blockState -> blockState.getLocation().getBlockY() > 100).forEach(blockState -> blockState.setType(Material.AIR) ); + } + /** * Disable all Piston related events in Clans * @@ -459,6 +469,7 @@ public class Gameplay extends MiniPlugin @EventHandler(priority = EventPriority.HIGHEST) public void disableSaplings(BlockPlaceEvent event) { + if(event.isCancelled()) return; //Can't place this block if (!event.getItemInHand().getType().equals(Material.SAPLING)) { return; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/AttackAttribute.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/AttackAttribute.java index 58f115f2d..aa702ebfd 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/AttackAttribute.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/AttackAttribute.java @@ -30,7 +30,7 @@ public abstract class AttackAttribute extends ItemAttribute @Override public void onAttack(CustomDamageEvent event) { - if(event.GetCancellers().contains("Safe Zone")) return; + if(event.IsCancelled() || event.isCancelled()) return; _attackCount++; System.out.println("Attack count " + _attackCount + " - " + _attackLimit); if (_attackCount >= _attackLimit) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/weapon/FlamingAttribute.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/weapon/FlamingAttribute.java index 84ab060c0..499c0ec03 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/weapon/FlamingAttribute.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/weapon/FlamingAttribute.java @@ -1,10 +1,13 @@ package mineplex.game.clans.items.attributes.weapon; +import mineplex.game.clans.clans.ClansManager; +import mineplex.game.clans.clans.gui.page.ClanMainPage; import mineplex.game.clans.items.attributes.AttackAttribute; import mineplex.game.clans.items.attributes.AttributeType; import mineplex.game.clans.items.generation.ValueDistribution; import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; public class FlamingAttribute extends AttackAttribute { @@ -34,6 +37,9 @@ public class FlamingAttribute extends AttackAttribute @Override public void triggerAttack(Entity attacker, Entity defender) { + if(attacker instanceof Player && ClansManager.getInstance().isSafe((Player) attacker)) return; + if(defender instanceof Player && ClansManager.getInstance().isSafe((Player) defender)) return; + defender.setFireTicks(_fireDuration); } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java index e7059080f..c49fa95be 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java @@ -15,8 +15,7 @@ public class GiantsBroadsword extends LegendaryItem { public static final int SLOW_AMPLIFIER = 43; public static final int REGEN_AMPLIFIER = 4; - public static final int EFFECT_DURATION = 20; // Duration of potion effect - // (in ticks) + public static final int EFFECT_DURATION = 20; // Duration of potion effect (in ticks) public GiantsBroadsword() { @@ -63,6 +62,6 @@ public class GiantsBroadsword extends LegendaryItem private void buffPlayer(Player player) { grantPotionEffect(player, PotionEffectType.SLOW, EFFECT_DURATION, SLOW_AMPLIFIER); - grantPotionEffect(player, PotionEffectType.REGENERATION, 2, REGEN_AMPLIFIER); //Regen + grantPotionEffect(player, PotionEffectType.REGENERATION, EFFECT_DURATION, REGEN_AMPLIFIER); //Regen } } From 6291decf872340ed2da516e64c981f62ff8a8eeb Mon Sep 17 00:00:00 2001 From: phobia Date: Fri, 5 Feb 2016 11:42:39 +1100 Subject: [PATCH 14/33] Fixes to flame and broadsword --- .../items/attributes/weapon/FlamingAttribute.java | 3 ++- .../clans/items/legendaries/GiantsBroadsword.java | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/weapon/FlamingAttribute.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/weapon/FlamingAttribute.java index 499c0ec03..ec37a112a 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/weapon/FlamingAttribute.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/attributes/weapon/FlamingAttribute.java @@ -6,6 +6,7 @@ import mineplex.game.clans.items.attributes.AttackAttribute; import mineplex.game.clans.items.attributes.AttributeType; import mineplex.game.clans.items.generation.ValueDistribution; +import org.bukkit.GameMode; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; @@ -39,7 +40,7 @@ public class FlamingAttribute extends AttackAttribute { if(attacker instanceof Player && ClansManager.getInstance().isSafe((Player) attacker)) return; if(defender instanceof Player && ClansManager.getInstance().isSafe((Player) defender)) return; - + if(attacker instanceof Player && ((Player)attacker).getGameMode().equals(GameMode.CREATIVE)) return; defender.setFireTicks(_fireDuration); } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java index c49fa95be..bdc9c4491 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java @@ -15,8 +15,7 @@ public class GiantsBroadsword extends LegendaryItem { public static final int SLOW_AMPLIFIER = 43; public static final int REGEN_AMPLIFIER = 4; - public static final int EFFECT_DURATION = 20; // Duration of potion effect (in ticks) - + public GiantsBroadsword() { super("Giants Broadsword", new String[]{ @@ -40,6 +39,11 @@ public class GiantsBroadsword extends LegendaryItem UtilParticle.PlayParticle(ParticleType.HEART, wielder.getEyeLocation().add(0, 0.25, 0), -.5f + (float) Math.random(), -.5f + (float) Math.random(), -.5f + (float) Math.random(), .2f, 1, ViewDist.NORMAL); wielder.playSound(wielder.getLocation(), Sound.LAVA_POP, 1f, 2f); return; + }else{ + if(wielder.hasPotionEffect(PotionEffectType.REGENERATION)) { + wielder.removePotionEffect(PotionEffectType.REGENERATION); + wielder.removePotionEffect(PotionEffectType.SLOW); + } } UtilParticle.PlayParticle(ParticleType.MAGIC_CRIT, wielder.getLocation().add(0, 1, 0), 0, 0, 0, .2f, 3, ViewDist.NORMAL); @@ -61,7 +65,7 @@ public class GiantsBroadsword extends LegendaryItem private void buffPlayer(Player player) { - grantPotionEffect(player, PotionEffectType.SLOW, EFFECT_DURATION, SLOW_AMPLIFIER); - grantPotionEffect(player, PotionEffectType.REGENERATION, EFFECT_DURATION, REGEN_AMPLIFIER); //Regen + grantPotionEffect(player, PotionEffectType.SLOW, 10000000, SLOW_AMPLIFIER); + grantPotionEffect(player, PotionEffectType.REGENERATION, 1000000, REGEN_AMPLIFIER); //Regen } } From b0888208d16998a51e7974c3f0c2dfc89d6fad20 Mon Sep 17 00:00:00 2001 From: phobia Date: Fri, 5 Feb 2016 23:55:38 +1100 Subject: [PATCH 15/33] More alphs bug fixes --- .../clans/warpoints/WarPointEvasion.java | 51 ++++++++++++++----- .../items/legendaries/GiantsBroadsword.java | 18 +++---- .../items/legendaries/LegendaryItem.java | 1 + 3 files changed, 46 insertions(+), 24 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java index 74f8aefba..1847fa9fb 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java @@ -3,50 +3,77 @@ package mineplex.game.clans.clans.warpoints; import com.google.common.collect.Maps; import mineplex.core.MiniPlugin; import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import mineplex.game.clans.clans.event.PlayerPreClaimTerritoryEvent; -import mineplex.game.clans.clans.event.PlayerUnClaimTerritoryEvent; +import mineplex.game.clans.clans.ClansManager; +import mineplex.game.clans.clans.event.*; +import org.bukkit.Bukkit; import org.bukkit.Chunk; +import org.bukkit.OfflinePlayer; +import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.plugin.java.JavaPlugin; import java.util.HashMap; +import java.util.UUID; public class WarPointEvasion extends MiniPlugin{ - private HashMap _cooldown; + private HashMap _chunkCooldown; + private HashMap _playerCooldown; + private final long COOLDOWN_TIME = 1000 * 60 * 30; public WarPointEvasion(JavaPlugin plugin) { super("WP Evasion", plugin); - _cooldown = Maps.newHashMap(); + _chunkCooldown = Maps.newHashMap(); + _playerCooldown = Maps.newHashMap(); } @EventHandler public void updateCooldown(UpdateEvent event) { if(!event.getType().equals(UpdateType.SEC)) return; - _cooldown.keySet().stream().filter(chunk -> UtilTime.elapsed(_cooldown.get(chunk), COOLDOWN_TIME)).forEach(chunk -> _cooldown.remove(chunk)); + _chunkCooldown.keySet().stream().filter(chunk -> UtilTime.elapsed(_chunkCooldown.get(chunk), COOLDOWN_TIME)).forEach(chunk -> _chunkCooldown.remove(chunk)); + + _playerCooldown.keySet().stream().filter(player -> UtilTime.elapsed(_playerCooldown.get(player), COOLDOWN_TIME)).forEach(player -> { + _playerCooldown.remove(player); + if(Bukkit.getOfflinePlayer(player).isOnline()) { + if(ClansManager.getInstance().getClan(Bukkit.getPlayer(player)) == null) { + Bukkit.getPlayer(player).sendMessage(F.main("Clans", "You can now create a clan.")); + } + } + }); } @EventHandler public void onClaim(PlayerPreClaimTerritoryEvent event) { Chunk chunk = event.getClaimedChunk(); - if(_cooldown.containsKey(chunk)) { + if(_chunkCooldown.containsKey(chunk)) { event.setCancelled(true); - event.getClaimer().sendMessage(F.main("Clans", "You cannot claim this chunk for another " + UtilTime.convertString(System.currentTimeMillis() - _cooldown.get(chunk), 1, UtilTime.TimeUnit.MINUTES))); + event.getClaimer().sendMessage(F.main("Clans", "You cannot claim this chunk for another " + UtilTime.convertString(System.currentTimeMillis() - _chunkCooldown.get(chunk), 1, UtilTime.TimeUnit.MINUTES))); } } @EventHandler public void onunClaim(PlayerUnClaimTerritoryEvent event) { Chunk chunk = event.getUnClaimedChunk(); - if(_cooldown.containsKey(chunk)) { - // Error maybe? - _cooldown.remove(chunk); - } - _cooldown.put(chunk, System.currentTimeMillis()); + _chunkCooldown.put(chunk, System.currentTimeMillis()); } + + @EventHandler + public void onClanLeave(ClanDisbandedEvent event) { + _playerCooldown.put(event.getDisbander().getUniqueId(), System.currentTimeMillis()); + } + + @EventHandler + public void onClanCreate(ClanCreatedEvent event) { + if (_playerCooldown.containsKey(event.getFounder().getUniqueId())) { + event.setCancelled(true); + event.getFounder().sendMessage(F.main("Clans", "You cannot create a clan for another " + UtilTime.convertString(System.currentTimeMillis() - _playerCooldown.get(event.getFounder().getUniqueId()), 1, UtilTime.TimeUnit.MINUTES))); + } + } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java index bdc9c4491..d9f71353c 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/GiantsBroadsword.java @@ -14,7 +14,7 @@ import mineplex.minecraft.game.core.damage.CustomDamageEvent; public class GiantsBroadsword extends LegendaryItem { public static final int SLOW_AMPLIFIER = 43; - public static final int REGEN_AMPLIFIER = 4; + public static final int REGEN_AMPLIFIER = 3; public GiantsBroadsword() { @@ -32,20 +32,14 @@ public class GiantsBroadsword extends LegendaryItem @Override public void update(Player wielder) { - if (isHoldingRightClick()) - { + if (isHoldingRightClick()) { buffPlayer(wielder); - + UtilParticle.PlayParticle(ParticleType.HEART, wielder.getEyeLocation().add(0, 0.25, 0), -.5f + (float) Math.random(), -.5f + (float) Math.random(), -.5f + (float) Math.random(), .2f, 1, ViewDist.NORMAL); wielder.playSound(wielder.getLocation(), Sound.LAVA_POP, 1f, 2f); return; - }else{ - if(wielder.hasPotionEffect(PotionEffectType.REGENERATION)) { - wielder.removePotionEffect(PotionEffectType.REGENERATION); - wielder.removePotionEffect(PotionEffectType.SLOW); - } } - + UtilParticle.PlayParticle(ParticleType.MAGIC_CRIT, wielder.getLocation().add(0, 1, 0), 0, 0, 0, .2f, 3, ViewDist.NORMAL); } @@ -65,7 +59,7 @@ public class GiantsBroadsword extends LegendaryItem private void buffPlayer(Player player) { - grantPotionEffect(player, PotionEffectType.SLOW, 10000000, SLOW_AMPLIFIER); - grantPotionEffect(player, PotionEffectType.REGENERATION, 1000000, REGEN_AMPLIFIER); //Regen + grantPotionEffect(player, PotionEffectType.SLOW, 40, SLOW_AMPLIFIER); + grantPotionEffect(player, PotionEffectType.REGENERATION, 40, REGEN_AMPLIFIER); //Regen } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/LegendaryItem.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/LegendaryItem.java index 13094784a..45c32ed17 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/LegendaryItem.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/items/legendaries/LegendaryItem.java @@ -92,6 +92,7 @@ public class LegendaryItem extends CustomItem */ public static void grantPotionEffect(Player player, PotionEffectType type, int tickDuration, int amplifier) { + player.removePotionEffect(type); player.addPotionEffect(new PotionEffect(type, amplifier, tickDuration)); } } From 27e4ef784c93b815aca955a42a079005019984c4 Mon Sep 17 00:00:00 2001 From: phobia Date: Sat, 6 Feb 2016 08:44:37 +1100 Subject: [PATCH 16/33] WP Evade --- .../game/clans/clans/ClansDataAccessLayer.java | 2 +- .../game/clans/clans/warpoints/WarPointEvasion.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java index b3bdba522..4fc76394e 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java @@ -603,7 +603,7 @@ public class ClansDataAccessLayer { UtilBlock.deleteBed(clan.getHome()); clan.setHome(null); - clan.inform("Clan has lost it's Home because of a Territory loss.", null); + clan.inform("Clan has lost its Home because of a Territory loss.", null); } return true; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java index 1847fa9fb..ef92eabe7 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java @@ -53,7 +53,7 @@ public class WarPointEvasion extends MiniPlugin{ Chunk chunk = event.getClaimedChunk(); if(_chunkCooldown.containsKey(chunk)) { event.setCancelled(true); - event.getClaimer().sendMessage(F.main("Clans", "You cannot claim this chunk for another " + UtilTime.convertString(System.currentTimeMillis() - _chunkCooldown.get(chunk), 1, UtilTime.TimeUnit.MINUTES))); + event.getClaimer().sendMessage(F.main("Clans", "You cannot claim this chunk for another " + UtilTime.convertString(COOLDOWN_TIME - (System.currentTimeMillis() - _chunkCooldown.get(chunk)), 1, UtilTime.TimeUnit.MINUTES))); } } @@ -65,15 +65,21 @@ public class WarPointEvasion extends MiniPlugin{ } @EventHandler - public void onClanLeave(ClanDisbandedEvent event) { + public void onClanDisband(ClanDisbandedEvent event) { _playerCooldown.put(event.getDisbander().getUniqueId(), System.currentTimeMillis()); } + @EventHandler + public void onClanLeave(ClanLeaveEvent event) { + _playerCooldown.put(event.getPlayer().getUuid(), System.currentTimeMillis()); + } + + @EventHandler public void onClanCreate(ClanCreatedEvent event) { if (_playerCooldown.containsKey(event.getFounder().getUniqueId())) { event.setCancelled(true); - event.getFounder().sendMessage(F.main("Clans", "You cannot create a clan for another " + UtilTime.convertString(System.currentTimeMillis() - _playerCooldown.get(event.getFounder().getUniqueId()), 1, UtilTime.TimeUnit.MINUTES))); + event.getFounder().sendMessage(F.main("Clans", "You cannot create a clan for another " + UtilTime.convertString(COOLDOWN_TIME - (System.currentTimeMillis() - _playerCooldown.get(event.getFounder().getUniqueId())), 1, UtilTime.TimeUnit.MINUTES))); } } } From 4f5625d63e189ff8c5b69d0c2c9853e757e97de0 Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Fri, 5 Feb 2016 18:42:22 -0500 Subject: [PATCH 17/33] Clans Alpha 1.0 changes --- .../src/mineplex/game/clans/Clans.java | 2 +- .../mineplex/game/clans/clans/ClansAdmin.java | 21 +++++++++++++ .../clans/clans/ClansDataAccessLayer.java | 2 ++ .../game/clans/clans/ClansManager.java | 30 ++++++++----------- .../clans/clans/commands/ClansCommand.java | 4 +-- .../clans/warpoints/WarPointEvasion.java | 10 ++++++- 6 files changed, 47 insertions(+), 22 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java index 69a6891d4..5dedde239 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/Clans.java @@ -53,7 +53,7 @@ import net.minecraft.server.v1_8_R3.MinecraftServer; public class Clans extends JavaPlugin { - public static final String VERSION = "0.19"; + public static final String VERSION = "1.0"; private String WEB_CONFIG = "webServer"; // Modules diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansAdmin.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansAdmin.java index 13e07c1cb..a5c23d8a7 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansAdmin.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansAdmin.java @@ -85,6 +85,9 @@ public class ClansAdmin else if (args[1].equalsIgnoreCase("wp")) wp(caller, args); + else if (args[1].equalsIgnoreCase("timer")) + resetTime(caller, args); + else help(caller); } @@ -111,8 +114,26 @@ public class ClansAdmin UtilPlayer.message(caller, F.help("/c x unclaim (all)", "Unclaim Territory for Mimic", Rank.CMOD)); UtilPlayer.message(caller, F.help("/c x delete", "Delete Mimic Clan", Rank.CMOD)); UtilPlayer.message(caller, F.help("/c x autoclaim", "AutoClaim for Mimic Clan", Rank.CMOD)); + UtilPlayer.message(caller, F.help("/c x timer ", "Reset Clan Create Timer", Rank.CMOD)); UtilPlayer.message(caller, F.main("Mimic Clan", Clans.Get(caller).getMimic())); } + + private void resetTime(Player caller, String[] args) + { + if (args.length < 3) + { + UtilPlayer.message(caller, F.main("Clans Admin", "You did not enter a player name")); + return; + } + + Player player = UtilPlayer.searchOnline(caller, args[2], true); + + if (player != null) + { + Clans.resetLeftTimer(player.getUniqueId()); + UtilPlayer.message(caller, F.main("Clans Admin", "Reset Clan create timer for " + F.name(player.getName()))); + } + } private void autoclaim(Player caller) { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java index 4fc76394e..9ca0714f1 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansDataAccessLayer.java @@ -297,6 +297,8 @@ public class ClansDataAccessLayer clan.getMembers().remove(clansPlayer.getUuid()); _manager.getClanMemberUuidMap().remove(clansPlayer.getUuid()); clan.playerOffline(clansPlayer.getPlayerName()); + + _manager.justLeft(clansPlayer.getUuid(), clan); // Log _manager.log("Removed [" + clansPlayer.getPlayerName() + "] from [" + clan.getName() + "]."); } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index 2224e07fc..d099eb34a 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -181,6 +181,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati private NpcManager _npcManager; private Explosion _explosion; private GoldManager _goldManager; + private WarPointEvasion _warPointEvasion; private Punish _punish; @@ -254,7 +255,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati new TntGeneratorManager(plugin, this); new SupplyDropManager(plugin, this); _explosion = new Explosion(plugin, blockRestore); - new WarPointEvasion(plugin); + _warPointEvasion = new WarPointEvasion(plugin); // new ClansLoginManager(getPlugin(), clientManager, _serverName); @@ -744,23 +745,9 @@ public class ClansManager extends MiniClientPluginimplements IRelati } } - @EventHandler(priority = EventPriority.HIGHEST) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void handlePlayerChat(AsyncPlayerChatEvent event) { - event.setCancelled(false); - - _chat.HandleChat(event); - - if (event.isCancelled()) - { - return; - } - else - { - event.setCancelled(true); - } - - // PunishClient punishclient = _punish.GetClient(event.getPlayer().getName()); // // if (punishclient != null && punishclient.IsMuted()) @@ -809,7 +796,9 @@ public class ClansManager extends MiniClientPluginimplements IRelati { handleRegularChat(event, clan, rank); } - + + event.setCancelled(true); + System.out.println((clan == null ? "" : clan.getName()) + " " + _clientManager.Get(event.getPlayer()).GetRank().name() + " " + event.getPlayer().getName() + " " + event.getMessage()); } @@ -1166,6 +1155,13 @@ public class ClansManager extends MiniClientPluginimplements IRelati { _clanMemberLeftMap.put(uniqueId, Pair.create(clan, System.currentTimeMillis())); } + + public void resetLeftTimer(UUID uuid) + { + _clanMemberLeftMap.remove(uuid); + _warPointEvasion.resetCooldown(uuid); + + } public Pair leftRecently(UUID uniqueId, long time) { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java index 19a7c9a4a..ee20486a9 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/commands/ClansCommand.java @@ -255,7 +255,7 @@ public class ClansCommand extends CommandBase return; } - if (Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000) != null) + if (Plugin.leftRecently(caller.getUniqueId(), 5 * 60 * 1000) != null) { _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You cannot create a Clan for " + C.mTime + UtilTime.MakeStr(Plugin.leftRecently(caller.getUniqueId(), 20 * 60 * 1000).getRight()) + C.mBody + ".")); return; @@ -540,8 +540,6 @@ public class ClansCommand extends CommandBase // Inform _manager.getTutorials().sendTutorialMsg(caller, F.main("Clans", "You left " + F.elem("Clan " + clan.getName()) + ".")); clan.inform(F.name(caller.getName()) + " has left your Clan.", null); - - _manager.justLeft(caller.getUniqueId(), clan); } }); } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java index ef92eabe7..e3f066e3c 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/warpoints/WarPointEvasion.java @@ -24,7 +24,7 @@ public class WarPointEvasion extends MiniPlugin{ private HashMap _chunkCooldown; private HashMap _playerCooldown; - private final long COOLDOWN_TIME = 1000 * 60 * 30; + private final long COOLDOWN_TIME = 1000 * 60 * 10; public WarPointEvasion(JavaPlugin plugin) { super("WP Evasion", plugin); @@ -77,9 +77,17 @@ public class WarPointEvasion extends MiniPlugin{ @EventHandler public void onClanCreate(ClanCreatedEvent event) { + if (event.getFounder() == null) + return; + if (_playerCooldown.containsKey(event.getFounder().getUniqueId())) { event.setCancelled(true); event.getFounder().sendMessage(F.main("Clans", "You cannot create a clan for another " + UtilTime.convertString(COOLDOWN_TIME - (System.currentTimeMillis() - _playerCooldown.get(event.getFounder().getUniqueId())), 1, UtilTime.TimeUnit.MINUTES))); } } + + public void resetCooldown(UUID uuid) + { + _playerCooldown.remove(uuid); + } } From 24254635a8a47cf899505a3b39f85d47bf115326 Mon Sep 17 00:00:00 2001 From: phobia Date: Sun, 14 Feb 2016 09:51:59 +1100 Subject: [PATCH 18/33] Fixes to observer settings --- .../src/mineplex/game/clans/clans/ClansManager.java | 2 +- .../game/clans/clans/observer/ObserverManager.java | 12 ++++++++++++ .../game/clans/clans/observer/ObserverSettings.java | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index d099eb34a..9eb461531 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -608,7 +608,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati player.getInventory().setHelmet(null); runSyncLater(() -> { player.getInventory().setHelmet(helmet); - }, 5L); + }, 20L); } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverManager.java index 7e84a14af..3c9b12958 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverManager.java @@ -10,6 +10,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.block.Action; +import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.player.PlayerInteractEvent; @@ -106,6 +107,17 @@ public class ObserverManager extends MiniPlugin } } + @EventHandler + public void onBreak(BlockBreakEvent event) + { + ObserverData data = _observerMap.get(event.getPlayer()); + + if (data != null) + { + if (!data.getSettings().contains(ObserverSettings.CAN_BREAK_BLOCKS)) + event.setCancelled(true); + } } + @EventHandler public void onInventoryClick(InventoryClickEvent event) { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverSettings.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverSettings.java index b06c62e3c..08c0628a1 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverSettings.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/observer/ObserverSettings.java @@ -16,7 +16,7 @@ public enum ObserverSettings public static EnumSet getSettings(Rank rank) { if (rank.has(Rank.DEVELOPER)) - return EnumSet.of(CAN_OPEN_CHESTS); + return EnumSet.of(CAN_OPEN_CHESTS, CAN_BREAK_BLOCKS); return EnumSet.noneOf(ObserverSettings.class); } From d7ad2cdc5885c5bc4605113b2855d6b7dc9a962c Mon Sep 17 00:00:00 2001 From: phobia Date: Sun, 14 Feb 2016 12:37:37 +1100 Subject: [PATCH 19/33] moar undead fixes --- .../src/mineplex/game/clans/clans/ClansManager.java | 10 ++++++++-- .../game/clans/clans/worldevent/undead/UndeadCamp.java | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java index 9eb461531..7981a5a5e 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ClansManager.java @@ -182,7 +182,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati private Explosion _explosion; private GoldManager _goldManager; private WarPointEvasion _warPointEvasion; - + private ObserverManager _observerManager; private Punish _punish; private int _inviteExpire = 2; @@ -271,7 +271,7 @@ public class ClansManager extends MiniClientPluginimplements IRelati new Spawn(plugin, this); new NPCManager(this, _hologramManager); new SafeLog(plugin, this); - new ObserverManager(plugin, _condition, this); + _observerManager = new ObserverManager(plugin, _condition, this); new ClanEnergyTracker(plugin, this); new StuckManager(this); @@ -1172,4 +1172,10 @@ public class ClansManager extends MiniClientPluginimplements IRelati return null; } + + public ObserverManager getObserverManager() + { + return _observerManager; + } + } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCamp.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCamp.java index 0c98c5f45..a3a746469 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCamp.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/worldevent/undead/UndeadCamp.java @@ -4,6 +4,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Set; +import mineplex.game.clans.clans.ClansManager; import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.Material; @@ -474,6 +475,7 @@ public class UndeadCamp extends WorldEvent @EventHandler(priority = EventPriority.HIGHEST) public void onChestOpen(PlayerInteractEvent event) { + if(ClansManager.getInstance().getObserverManager().isObserver(event.getPlayer())) return;; Block block = event.getClickedBlock(); if (_containers.contains(block)) { From b58ea5b51a6ad6160c4256b765b23059c7adb19a Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 Feb 2016 15:25:09 +1100 Subject: [PATCH 20/33] Provide option to load config from mineplex.yml, not per game folders. --- .../mineplex/core/common/ConfigContainer.java | 46 +++++++++++++++++++ .../Mineplex.Hub/src/mineplex/hub/Hub.java | 13 ++++++ .../src/nautilus/game/arcade/Arcade.java | 13 ++++++ 3 files changed, 72 insertions(+) create mode 100644 Plugins/Mineplex.Core.Common/src/mineplex/core/common/ConfigContainer.java diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/ConfigContainer.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/ConfigContainer.java new file mode 100644 index 000000000..9974025c0 --- /dev/null +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/ConfigContainer.java @@ -0,0 +1,46 @@ +package mineplex.core.common; + +import java.io.File; +import java.io.IOException; +import java.util.logging.Level; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.plugin.Plugin; + +public class ConfigContainer +{ + + private final Plugin _plugin; + private File _configFile; + private FileConfiguration _config; + + public ConfigContainer(Plugin plugin, String configFile) + { + this._plugin = plugin; + this._configFile = new File(configFile); + } + + public FileConfiguration getConfig() { + if (_config == null) + { + if (_configFile.isFile()) + { + _config = YamlConfiguration.loadConfiguration(_configFile); + } else { + _config = _plugin.getConfig(); + _configFile = new File(_plugin.getDataFolder(), "config.yml"); + } + } + + return _config; + } + + public void saveConfig() { + try + { + getConfig().save(_configFile); + } catch (IOException ex) { + _plugin.getLogger().log(Level.SEVERE, "Could not save config to " + _configFile, ex); + } + } +} diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index 15513f191..b7b8cb0cc 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -13,6 +13,7 @@ import mineplex.core.aprilfools.AprilFoolsManager; import mineplex.core.blockrestore.BlockRestore; import mineplex.core.chat.Chat; import mineplex.core.command.CommandCenter; +import mineplex.core.common.ConfigContainer; import mineplex.core.common.events.ServerShutdownEvent; import mineplex.core.creature.Creature; import mineplex.core.customdata.CustomDataManager; @@ -68,10 +69,22 @@ import mineplex.minecraft.game.core.IRelation; import mineplex.minecraft.game.core.combat.CombatManager; import mineplex.minecraft.game.core.damage.DamageManager; import mineplex.minecraft.game.core.fire.Fire; +import org.bukkit.configuration.file.FileConfiguration; public class Hub extends JavaPlugin implements IRelation { private String WEB_CONFIG = "webServer"; + private final ConfigContainer _config = new ConfigContainer(this, "mineplex.yml"); + + @Override + public FileConfiguration getConfig() { + return _config.getConfig(); + } + + @Override + public void saveConfig() { + _config.saveConfig(); + } @Override public void onEnable() diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java index 9bec8fee2..a54d7796b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -16,6 +16,7 @@ import mineplex.core.blockrestore.BlockRestore; import mineplex.core.blood.Blood; import mineplex.core.chat.Chat; import mineplex.core.command.CommandCenter; +import mineplex.core.common.ConfigContainer; import mineplex.core.common.events.ServerShutdownEvent; import mineplex.core.common.util.FileUtil; import mineplex.core.common.util.UtilServer; @@ -60,6 +61,7 @@ import mineplex.minecraft.game.core.damage.DamageManager; import nautilus.game.arcade.game.GameServerConfig; import net.minecraft.server.v1_8_R3.BiomeBase; import net.minecraft.server.v1_8_R3.MinecraftServer; +import org.bukkit.configuration.file.FileConfiguration; public class Arcade extends JavaPlugin { @@ -73,6 +75,17 @@ public class Arcade extends JavaPlugin private ArcadeManager _gameManager; private ServerConfiguration _serverConfiguration; + private final ConfigContainer _config = new ConfigContainer(this, "mineplex.yml"); + + @Override + public FileConfiguration getConfig() { + return _config.getConfig(); + } + + @Override + public void saveConfig() { + _config.saveConfig(); + } @Override public void onEnable() From 6d81e43b30d1366e05e639f47cfdf1b44a9d9892 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 Feb 2016 15:30:30 +1100 Subject: [PATCH 21/33] Don't print db config to System.out --- Plugins/Mineplex.Core/src/mineplex/core/database/DBPool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/DBPool.java b/Plugins/Mineplex.Core/src/mineplex/core/database/DBPool.java index 06495ff54..ca6eaca75 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/DBPool.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/database/DBPool.java @@ -110,7 +110,7 @@ public final class DBPool String userName = args[2]; String password = args[3]; - System.out.println(dbSource + " " + dbHost + " " + userName + " " + password); + // System.out.println(dbSource + " " + dbHost + " " + userName + " " + password); if (dbSource.toUpperCase().equalsIgnoreCase("ACCOUNT")) ACCOUNT = openDataSource("jdbc:mysql://" + dbHost, userName, password); From eab992e621780b870900f68a28dc575e8f73ec99 Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Thu, 18 Feb 2016 23:01:23 -0600 Subject: [PATCH 22/33] Delete SimpleStats --- .../core/simpleStats/SimpleStats.java | 87 ------- .../simpleStats/SimpleStatsRepository.java | 220 ------------------ 2 files changed, 307 deletions(-) delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/simpleStats/SimpleStats.java delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/simpleStats/SimpleStatsRepository.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/simpleStats/SimpleStats.java b/Plugins/Mineplex.Core/src/mineplex/core/simpleStats/SimpleStats.java deleted file mode 100644 index f2ea158bf..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/simpleStats/SimpleStats.java +++ /dev/null @@ -1,87 +0,0 @@ -package mineplex.core.simpleStats; - -import org.bukkit.Bukkit; -import org.bukkit.event.EventHandler; -import org.bukkit.plugin.java.JavaPlugin; - -import mineplex.core.MiniPlugin; -import mineplex.core.common.util.NautHashMap; -import mineplex.core.updater.UpdateType; -import mineplex.core.updater.event.UpdateEvent; - -public class SimpleStats extends MiniPlugin -{ - private static Object _transferLock = new Object(); - - private SimpleStatsRepository _repository = new SimpleStatsRepository(); - private NautHashMap _entries = new NautHashMap(); - - public SimpleStats(JavaPlugin plugin) - { - super("SimpleStats", plugin); - - _repository.initialize(); - } - - /* - public NautHashMap getEntries() - { - synchronized (_transferLock) - { - return _entries; - } - }*/ - - @EventHandler - public void storeStatsUpdate(final UpdateEvent updateEvent) - { - if (updateEvent.getType() != UpdateType.SLOW) - return; - - Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), new Runnable() - { - public void run() - { - synchronized (_transferLock) - { - _entries = (_repository.retrieveStatRecords()); - } - } - }); - } - - public void store(String statName, String statValue) - { - final String statNameFinal = statName; - final String statValueFinal = statValue; - - Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), new Runnable() - { - public void run() - { - synchronized (_transferLock) - { - _repository.storeStatValue(statNameFinal, statValueFinal); - } - } - }); - } - - public NautHashMap getStat(String statName) - { - final String statNameFinal = statName; - - Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), new Runnable() - { - public void run() - { - synchronized (_transferLock) - { - _entries = _repository.retrieveStat(statNameFinal); - } - } - }); - - return _entries; - } -} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/simpleStats/SimpleStatsRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/simpleStats/SimpleStatsRepository.java deleted file mode 100644 index ff39bce61..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/simpleStats/SimpleStatsRepository.java +++ /dev/null @@ -1,220 +0,0 @@ -package mineplex.core.simpleStats; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import mineplex.core.common.util.NautHashMap; - -public class SimpleStatsRepository -{ - private static Object _connectionLock = new Object(); - - private String _connectionString = "jdbc:mysql://sqlstats.mineplex.com:3306/Mineplex?autoReconnect=true&failOverReadOnly=false&maxReconnects=10"; - private String _userName = "root"; - private String _password = "tAbechAk3wR7tuTh"; //try to obfuscate this in the future! - - private static String CREATE_STATS_TABLE = "CREATE TABLE IF NOT EXISTS simpleStats (id INT NOT NULL AUTO_INCREMENT, statName VARCHAR(64), statValue VARCHAR(64), PRIMARY KEY (id));"; - private static String RETRIEVE_STATS_RECORDS = "SELECT simpleStats.statName, simpleStats.statValue FROM simpleStats;"; - private static String STORE_STATS_RECORD = "INSERT INTO simpleStats (statName,statValue) VALUES(?,?);"; - private static String RETRIEVE_STAT_RECORD = "SELECT simpleStats.statName, simpleStats.statValue FROM simpleStats WHERE statName = '?';"; - - private Connection _connection = null; - - public void initialize() - { - /* - PreparedStatement preparedStatement = null; - - try - { - Class.forName("com.mysql.jdbc.Driver"); - - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - // Create table - preparedStatement = _connection.prepareStatement(CREATE_STATS_TABLE); - preparedStatement.execute(); - } - catch (Exception exception) - { - exception.printStackTrace(); - } - finally - { - if (preparedStatement != null) - { - try - { - preparedStatement.close(); - } - catch (SQLException e) - { - e.printStackTrace(); - } - } - } - */ - } - - public NautHashMap retrieveStatRecords() - { - ResultSet resultSet = null; - PreparedStatement preparedStatement = null; - NautHashMap statRecords = new NautHashMap(); - - try - { - synchronized (_connectionLock) - { - if (_connection.isClosed()) - { - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - } - - preparedStatement = _connection.prepareStatement(RETRIEVE_STATS_RECORDS); - - resultSet = preparedStatement.executeQuery(); - - while (resultSet.next()) - { - statRecords.put(resultSet.getString(1), resultSet.getString(2)); - } - } - } - catch (Exception exception) - { - exception.printStackTrace(); - } - finally - { - if (preparedStatement != null) - { - try - { - preparedStatement.close(); - } - catch (SQLException e) - { - e.printStackTrace(); - } - } - - if (resultSet != null) - { - try - { - resultSet.close(); - } - catch (SQLException e) - { - e.printStackTrace(); - } - } - } - - return statRecords; - } - - public void storeStatValue(String statName, String statValue) - { - PreparedStatement preparedStatement = null; - - try - { - synchronized (_connectionLock) - { - if (_connection.isClosed()) - { - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - } - - preparedStatement = _connection.prepareStatement(STORE_STATS_RECORD); - preparedStatement.setString(1, statName); - preparedStatement.setString(2, statValue); - - preparedStatement.executeUpdate(); - } - } - catch (Exception exception) - { - exception.printStackTrace(); - } - finally - { - if (preparedStatement != null) - { - try - { - preparedStatement.close(); - } - catch (SQLException e) - { - e.printStackTrace(); - } - } - } - } - - public NautHashMap retrieveStat(String statName) - { - ResultSet resultSet = null; - PreparedStatement preparedStatement = null; - NautHashMap statRecords = new NautHashMap(); - - try - { - synchronized (_connectionLock) - { - if (_connection.isClosed()) - { - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - } - - preparedStatement = _connection.prepareStatement(RETRIEVE_STAT_RECORD); - preparedStatement.setString(1, statName); - - resultSet = preparedStatement.executeQuery(); - - while (resultSet.next()) - { - statRecords.put(resultSet.getString(1), resultSet.getString(2)); - } - } - } - catch (Exception exception) - { - exception.printStackTrace(); - } - finally - { - if (preparedStatement != null) - { - try - { - preparedStatement.close(); - } - catch (SQLException e) - { - e.printStackTrace(); - } - } - - if (resultSet != null) - { - try - { - resultSet.close(); - } - catch (SQLException e) - { - e.printStackTrace(); - } - } - } - - return statRecords; - } -} From 7714e4960cd65521fecf806cfe70040fb955acde Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Fri, 19 Feb 2016 00:17:38 -0600 Subject: [PATCH 23/33] Use DBPool for everything --- .../playerStats/PlayerStatsRepository.java | 73 +++++------- .../bungee/PlayerStatsRepository.java | 60 ++++------ .../account/repository/AccountRepository.java | 19 +-- .../core/antihack/AntiHackRepository.java | 2 +- .../benefit/BenefitManagerRepository.java | 11 +- .../mineplex/core/bonuses/BonusManager.java | 3 +- .../core/bonuses/BonusRepository.java | 9 +- .../botspam/repository/BotSpamRepository.java | 13 +- .../repository/CustomDataRepository.java | 14 +-- .../core/database/MinecraftRepository.java | 112 ++++++++++++++++++ .../src/mineplex/core/database/Row.java | 9 -- .../repository/DonationRepository.java | 23 ++-- .../src/mineplex/core/elo/EloRepository.java | 11 +- .../core/facebook/FacebookRepository.java | 13 +- .../core/friend/data/FriendRepository.java | 12 +- .../core/giveaway/GiveawayRepository.java | 14 +-- .../core/ignore/data/IgnoreRepository.java | 9 +- .../inventory/data/InventoryRepository.java | 13 +- .../leaderboard/StatEventsRepository.java | 11 +- .../src/mineplex/core/npc/NpcManager.java | 2 +- .../core/pet/repository/PetRepository.java | 18 +-- .../mineplex/core/poll/PollRepository.java | 13 +- .../preferences/PreferencesRepository.java | 9 +- .../core/report/ReportRepository.java | 20 +--- .../mineplex/core/spawn/SpawnRepository.java | 11 +- .../mineplex/core/stats/StatsRepository.java | 11 +- .../core/task/repository/TaskRepository.java | 13 +- .../TitanGiveawayRepository.java | 11 +- .../valentines/ValentinesGiftRepository.java | 9 +- .../mineplex/ddos/DnsMadeEasyRepository.java | 2 +- .../enjinTranslator/TempRepository.java | 11 +- .../purchase/PurchaseManager.java | 2 +- .../purchase/data/PurchaseRepository.java | 15 +-- .../clans/core/repository/ClanRepository.java | 19 +-- .../clans/clans/ban/ClansBanRepository.java | 17 +-- .../fields/repository/FieldRepository.java | 17 +-- .../src/mineplex/hub/HubRepository.java | 10 +- .../src/mineplex/hub/mail/MailRepository.java | 7 +- .../mineplex/hub/queue/QueueRepository.java | 4 +- Plugins/Mineplex.ServerData/pom.xml | 5 + .../mineplex/serverdata}/database/DBPool.java | 7 +- .../database/DatabaseRunnable.java | 2 +- .../serverdata}/database/RepositoryBase.java | 103 ++-------------- .../database/ResultSetCallable.java | 2 +- .../serverdata}/database/column/Column.java | 2 +- .../database/column/ColumnBoolean.java | 2 +- .../database/column/ColumnByte.java | 2 +- .../database/column/ColumnDouble.java | 2 +- .../database/column/ColumnInt.java | 2 +- .../database/column/ColumnLong.java | 2 +- .../database/column/ColumnTimestamp.java | 2 +- .../database/column/ColumnVarChar.java | 2 +- .../StatusHistoryRepository.java | 70 +++++------ .../password/PasswordRepository.java | 11 +- .../mineplex/votifier/VotifierManager.java | 3 +- .../TitanGiveawayRepository.java | 7 +- 56 files changed, 434 insertions(+), 444 deletions(-) create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/database/MinecraftRepository.java delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/database/Row.java rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/DBPool.java (93%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/DatabaseRunnable.java (90%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/RepositoryBase.java (55%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/ResultSetCallable.java (81%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/column/Column.java (92%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/column/ColumnBoolean.java (94%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/column/ColumnByte.java (94%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/column/ColumnDouble.java (94%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/column/ColumnInt.java (94%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/column/ColumnLong.java (94%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/column/ColumnTimestamp.java (94%) rename Plugins/{Mineplex.Core/src/mineplex/core => Mineplex.ServerData/src/mineplex/serverdata}/database/column/ColumnVarChar.java (94%) diff --git a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerStats/PlayerStatsRepository.java b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerStats/PlayerStatsRepository.java index 5227ab818..f46641165 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerStats/PlayerStatsRepository.java +++ b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerStats/PlayerStatsRepository.java @@ -10,14 +10,13 @@ import java.util.UUID; import mineplex.bungee.playerStats.data.IpInfo; import mineplex.cache.player.PlayerInfo; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; -public class PlayerStatsRepository +import javax.sql.DataSource; + +public class PlayerStatsRepository extends RepositoryBase { - private Connection _connection = null; - private String _connectionString = "jdbc:mysql://sqlstats.mineplex.com:3306/PlayerStats?autoReconnect=true&failOverReadOnly=false&maxReconnects=10&allowMultiQueries=true"; - private String _userName = "root"; - private String _password = "tAbechAk3wR7tuTh"; - private static String INSERT_PLAYERINFO = "INSERT INTO playerInfo (uuid, name, version) VALUES (?, ?, ?);"; private static String SELECT_PLAYERINFO = "SELECT id, name, version FROM playerInfo WHERE uuid = ?;"; private static String UPDATE_PLAYERINFO = "UPDATE playerInfo SET name = ?, version = ? WHERE id = ?;"; @@ -30,34 +29,33 @@ public class PlayerStatsRepository + "INSERT IGNORE INTO playerLoginSessions (playerInfoId, loginTime) values(?, now());"; private static String UPDATE_LOGINSESSION = "UPDATE playerLoginSessions SET timeInGame = TIME_TO_SEC(TIMEDIFF(now(), loginTime)) / 60 WHERE id = ?;"; - + + public PlayerStatsRepository() + { + super(DBPool.getStats()); + } + + @Override public void initialize() { - try - { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - } - catch (Exception exception) - { - exception.printStackTrace(); - } - - System.out.println("Initialized PlayerStats."); + } - + + @Override + protected void update() + { + + } + public PlayerInfo getPlayer(UUID uuid, String name, int version) { PlayerInfo playerInfo = null; PreparedStatement preparedStatement = null; ResultSet resultSet = null; - try + try(Connection connection = getConnection()) { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(SELECT_PLAYERINFO); + preparedStatement = connection.prepareStatement(SELECT_PLAYERINFO); preparedStatement.setString(1, uuid.toString()); @@ -73,7 +71,7 @@ public class PlayerStatsRepository if (playerInfo == null) { - preparedStatement = _connection.prepareStatement(INSERT_PLAYERINFO, Statement.RETURN_GENERATED_KEYS); + preparedStatement = connection.prepareStatement(INSERT_PLAYERINFO, Statement.RETURN_GENERATED_KEYS); preparedStatement.setString(1, uuid.toString()); preparedStatement.setString(2, name); preparedStatement.setInt(3, version); @@ -96,7 +94,7 @@ public class PlayerStatsRepository } else if (!playerInfo.getName().equalsIgnoreCase(name) || playerInfo.getVersion() != version) { - preparedStatement = _connection.prepareStatement(UPDATE_PLAYERINFO); + preparedStatement = connection.prepareStatement(UPDATE_PLAYERINFO); preparedStatement.setString(1, name); preparedStatement.setInt(2, version); preparedStatement.setInt(3, playerInfo.getId()); @@ -145,12 +143,9 @@ public class PlayerStatsRepository PreparedStatement preparedStatement = null; ResultSet resultSet = null; - try + try(Connection connection = getConnection()) { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(SELECT_IPINFO); + preparedStatement = connection.prepareStatement(SELECT_IPINFO); preparedStatement.setString(1, ipAddress); resultSet = preparedStatement.executeQuery(); @@ -167,7 +162,7 @@ public class PlayerStatsRepository if (ipInfo == null) { - preparedStatement = _connection.prepareStatement(INSERT_IPINFO, Statement.RETURN_GENERATED_KEYS); + preparedStatement = connection.prepareStatement(INSERT_IPINFO, Statement.RETURN_GENERATED_KEYS); preparedStatement.setString(1, ipAddress); preparedStatement.executeUpdate(); @@ -228,12 +223,9 @@ public class PlayerStatsRepository Statement statement = null; ResultSet resultSet= null; - try + try(Connection connection = getConnection()) { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - statement = _connection.createStatement(); + statement = connection.createStatement(); String queryString = UPDATE_PLAYERSTATS; queryString = queryString.replaceFirst("\\?", playerId + ""); @@ -286,12 +278,9 @@ public class PlayerStatsRepository { PreparedStatement preparedStatement = null; - try + try(Connection connection = getConnection()) { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(UPDATE_LOGINSESSION); + preparedStatement = connection.prepareStatement(UPDATE_LOGINSESSION); preparedStatement.setInt(1, loginSessionId); preparedStatement.executeUpdate(); diff --git a/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/PlayerStatsRepository.java b/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/PlayerStatsRepository.java index f5b298ae9..c664fedb7 100644 --- a/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/PlayerStatsRepository.java +++ b/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/PlayerStatsRepository.java @@ -1,50 +1,43 @@ package mineplex.bungee; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; + +import java.sql.*; import java.util.ArrayList; import java.util.List; -public class PlayerStatsRepository +public class PlayerStatsRepository extends RepositoryBase { - private Connection _connection = null; - private String _connectionString = "jdbc:mysql://sqlstats.mineplex.com:3306/PlayerStats?autoReconnect=true&failOverReadOnly=false&maxReconnects=10&allowMultiQueries=true"; - private String _userName = "root"; - private String _password = "tAbechAk3wR7tuTh"; - private static String SELECT_IPINFO = "SELECT id, ipAddress FROM ipInfo WHERE regionName IS NULL LIMIT 1000;"; private static String UPDATE_IPINFO = "UPDATE ipInfo SET countryCode = ?, countryName = ?, regionCode = ?, regionName = ?, city = ?, zipCode = ?, timeZone = ?, latitude = ?, longitude = ?, metroCode = ? WHERE id = ?;"; - - public void initialize() + + public PlayerStatsRepository() { - try - { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - } - catch (Exception exception) - { - exception.printStackTrace(); - } - - System.out.println("Initialized PlayerStats."); + super(DBPool.getStats()); } - + + @Override + protected void initialize() + { + + } + + @Override + protected void update() + { + + } + public List getIpAddresses() { List ipinfos = new ArrayList(1000); PreparedStatement preparedStatement = null; ResultSet resultSet = null; - try + try(Connection connection = getConnection()) { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(SELECT_IPINFO); + preparedStatement = connection.prepareStatement(SELECT_IPINFO); resultSet = preparedStatement.executeQuery(); @@ -98,12 +91,9 @@ public class PlayerStatsRepository { PreparedStatement preparedStatement = null; - try + try(Connection connection = getConnection()) { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(UPDATE_IPINFO); + preparedStatement = connection.prepareStatement(UPDATE_IPINFO); for (IpInfo ipInfo : ips) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java index 658c984ed..746b3cf6b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/repository/AccountRepository.java @@ -10,6 +10,7 @@ import java.util.LinkedList; import java.util.List; import java.util.UUID; +import mineplex.core.database.MinecraftRepository; import org.bukkit.Bukkit; import com.google.gson.reflect.TypeToken; import org.bukkit.plugin.java.JavaPlugin; @@ -21,16 +22,16 @@ import mineplex.core.account.repository.token.RankUpdateToken; import mineplex.core.common.Rank; import mineplex.core.common.util.Callback; import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.DBPool; -import mineplex.core.database.DatabaseRunnable; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnBoolean; -import mineplex.core.database.column.ColumnTimestamp; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.DatabaseRunnable; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnBoolean; +import mineplex.serverdata.database.column.ColumnTimestamp; +import mineplex.serverdata.database.column.ColumnVarChar; import mineplex.core.server.remotecall.JsonWebCall; -public class AccountRepository extends RepositoryBase +public class AccountRepository extends MinecraftRepository { private static String CREATE_ACCOUNT_TABLE = "CREATE TABLE IF NOT EXISTS accounts (id INT NOT NULL AUTO_INCREMENT, uuid VARCHAR(100), name VARCHAR(40), gems INT, rank VARCHAR(40), rankPerm BOOL, rankExpire LONG, lastLogin LONG, totalPlayTime LONG, PRIMARY KEY (id), UNIQUE INDEX uuidIndex (uuid), UNIQUE INDEX nameIndex (name), INDEX rankIndex (rank));"; private static String ACCOUNT_LOGIN_NEW = "INSERT INTO accounts (uuid, name, lastLogin) values(?, ?, now());"; @@ -234,7 +235,7 @@ public class AccountRepository extends RepositoryBase executeUpdate(UPDATE_ACCOUNT_RANK, new ColumnVarChar("rank", 100, rank.toString()), new ColumnVarChar("uuid", 100, uuid.toString())); } - Bukkit.getServer().getScheduler().runTask(Plugin, new Runnable() + Bukkit.getServer().getScheduler().runTask(getPlugin(), new Runnable() { @Override public void run() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHackRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHackRepository.java index 23a0694b0..d80308172 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHackRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHackRepository.java @@ -4,7 +4,7 @@ import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; -import mineplex.core.database.DBPool; +import mineplex.serverdata.database.DBPool; import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/benefit/BenefitManagerRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/benefit/BenefitManagerRepository.java index eb5628130..60af1605a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/benefit/BenefitManagerRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/benefit/BenefitManagerRepository.java @@ -3,14 +3,15 @@ package mineplex.core.benefit; import java.sql.ResultSet; import java.sql.SQLException; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.core.database.MinecraftRepository; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; import org.bukkit.plugin.java.JavaPlugin; -public class BenefitManagerRepository extends RepositoryBase +public class BenefitManagerRepository extends MinecraftRepository { private static String CREATE_BENEFIT_TABLE = "CREATE TABLE IF NOT EXISTS rankBenefits (id INT NOT NULL AUTO_INCREMENT, accountId INT, benefit VARCHAR(100), PRIMARY KEY (id), FOREIGN KEY (accountId) REFERENCES accounts(id));"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java index d2ec49e6e..1dd545c93 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusManager.java @@ -27,7 +27,7 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilParticle.ParticleType; import mineplex.core.common.util.UtilParticle.ViewDist; -import mineplex.core.database.DBPool; +import mineplex.serverdata.database.DBPool; import mineplex.core.donation.DonationManager; import mineplex.core.donation.GiveDonorData; import mineplex.core.facebook.FacebookManager; @@ -67,7 +67,6 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.player.PlayerInteractAtEntityEvent; -import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.plugin.java.JavaPlugin; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java index 2ce772e8c..a00e6373e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/BonusRepository.java @@ -10,9 +10,10 @@ import java.sql.Types; import mineplex.core.common.Pair; import mineplex.core.common.util.Callback; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; +import mineplex.core.database.MinecraftRepository; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; import mineplex.core.donation.DonationManager; import mineplex.core.recharge.Recharge; import mineplex.database.Tables; @@ -28,7 +29,7 @@ import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.java.JavaPlugin; -public class BonusRepository extends RepositoryBase +public class BonusRepository extends MinecraftRepository { private static String CREATE_BONUS_TABLE = "CREATE TABLE IF NOT EXISTS bonus (accountId INT NOT NULL AUTO_INCREMENT, dailytime TIMESTAMP NULL DEFAULT NULL, ranktime DATE NULL DEFAULT NULL, PRIMARY KEY (accountId), FOREIGN KEY (accountId) REFERENCES accounts(id));"; private BonusManager _manager; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/botspam/repository/BotSpamRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/botspam/repository/BotSpamRepository.java index 3af3d0d4f..30d8f0c62 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/botspam/repository/BotSpamRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/botspam/repository/BotSpamRepository.java @@ -4,16 +4,17 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; import mineplex.core.botspam.SpamText; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; -public class BotSpamRepository extends RepositoryBase +public class BotSpamRepository extends MinecraftRepository { private static final String GET_SPAM_TEXT = "SELECT * FROM botSpam"; private static final String ADD_SPAM_TEXT = "INSERT INTO botSpam (text, createdBy, enabledBy) VALUES (?, ?, ?)"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/customdata/repository/CustomDataRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/customdata/repository/CustomDataRepository.java index c896f2a03..14600c963 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/customdata/repository/CustomDataRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/customdata/repository/CustomDataRepository.java @@ -5,24 +5,24 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.Map; -import org.bukkit.entity.Player; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.account.CoreClientManager; import mineplex.core.customdata.CustomData; import mineplex.core.customdata.CustomDataManager; import mineplex.core.customdata.PlayerCustomData; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; /** * Created by William (WilliamTiger). * 16/12/15 */ -public class CustomDataRepository extends RepositoryBase +public class CustomDataRepository extends MinecraftRepository { private static final String SELECT_KEYS = "SELECT id, name FROM customData;"; private static final String INSERT_KEY = "INSERT INTO customData (name) VALUES (?);"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/MinecraftRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/database/MinecraftRepository.java new file mode 100644 index 000000000..690fc9cc6 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/database/MinecraftRepository.java @@ -0,0 +1,112 @@ +package mineplex.core.database; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Iterator; + +import javax.sql.DataSource; + +import mineplex.core.common.util.NautHashMap; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.DatabaseRunnable; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.Column; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import org.jooq.DSLContext; +import org.jooq.SQLDialect; +import org.jooq.impl.DSL; + +import org.bukkit.Bukkit; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.plugin.java.JavaPlugin; + +public abstract class MinecraftRepository extends RepositoryBase implements Listener +{ + // Queue for failed processes + private static Object _queueLock = new Object(); + private NautHashMap _failedQueue = new NautHashMap(); + + protected JavaPlugin _plugin; // Plugin responsible for this repository + + /** + * Constructor + * @param plugin - the {@link JavaPlugin} module responsible for this repository. + * @param dataSource - the {@link DataSource} responsible for providing the connection pool to this repository. + */ + public MinecraftRepository(JavaPlugin plugin, DataSource dataSource) + { + super(dataSource); + + _plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); + } + + protected DSLContext jooq() + { + return DSL.using(DBPool.getAccount(), SQLDialect.MYSQL); + } + + protected void handleDatabaseCall(final DatabaseRunnable databaseRunnable, final String errorMessage) + { + Thread asyncThread = new Thread(new Runnable() + { + public void run() + { + try + { + databaseRunnable.run(); + } + catch (Exception exception) + { + processFailedDatabaseCall(databaseRunnable, exception.getMessage(), errorMessage); + } + } + }); + + asyncThread.start(); + } + + protected void processFailedDatabaseCall(DatabaseRunnable databaseRunnable, String errorPreMessage, String runnableMessage) + { + if (databaseRunnable.getFailedCounts() < 4) + { + databaseRunnable.incrementFailCount(); + + synchronized (_queueLock) + { + _failedQueue.put(databaseRunnable, runnableMessage); + } + } + } + + @EventHandler + public void processDatabaseQueue(UpdateEvent event) + { + if (event.getType() != UpdateType.MIN_01) + return; + + processFailedQueue(); + } + + private void processFailedQueue() + { + synchronized (_queueLock) + { + for (Iterator runnablesIterator = _failedQueue.keySet().iterator(); runnablesIterator.hasNext();) + { + DatabaseRunnable databaseRunnable = runnablesIterator.next(); + handleDatabaseCall(databaseRunnable, _failedQueue.get(databaseRunnable)); + } + } + } + + public JavaPlugin getPlugin() + { + return _plugin; + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/Row.java b/Plugins/Mineplex.Core/src/mineplex/core/database/Row.java deleted file mode 100644 index 208666a37..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/Row.java +++ /dev/null @@ -1,9 +0,0 @@ -package mineplex.core.database; - -import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.column.Column; - -public class Row -{ - public NautHashMap> Columns = new NautHashMap>(); -} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/donation/repository/DonationRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/donation/repository/DonationRepository.java index b30b30b92..5e696359e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/donation/repository/DonationRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/donation/repository/DonationRepository.java @@ -1,21 +1,18 @@ package mineplex.core.donation.repository; -import java.sql.CallableStatement; -import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.Types; +import mineplex.core.database.MinecraftRepository; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.common.CurrencyType; import mineplex.core.common.util.Callback; -import mineplex.core.database.DBPool; -import mineplex.core.database.DatabaseRunnable; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.DatabaseRunnable; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnInt; import mineplex.core.donation.Donor; import mineplex.core.donation.repository.token.GemRewardToken; import mineplex.core.donation.repository.token.PurchaseToken; @@ -24,7 +21,7 @@ import mineplex.core.server.remotecall.AsyncJsonWebCall; import mineplex.core.server.remotecall.JsonWebCall; import mineplex.core.server.util.TransactionResponse; -public class DonationRepository extends RepositoryBase +public class DonationRepository extends MinecraftRepository { private static String CREATE_COIN_TRANSACTION_TABLE = "CREATE TABLE IF NOT EXISTS accountCoinTransactions (id INT NOT NULL AUTO_INCREMENT, accountId INT, reason VARCHAR(100), coins INT, PRIMARY KEY (id), FOREIGN KEY (accountId) REFERENCES accounts(id));"; private static String CREATE_GEM_TRANSACTION_TABLE = "CREATE TABLE IF NOT EXISTS accountGemTransactions (id INT NOT NULL AUTO_INCREMENT, accountId INT, reason VARCHAR(100), gems INT, PRIMARY KEY (id), FOREIGN KEY (accountId) REFERENCES accounts(id));"; @@ -54,7 +51,7 @@ public class DonationRepository extends RepositoryBase { public void run(final TransactionResponse response) { - Bukkit.getServer().getScheduler().runTask(Plugin, new Runnable() + Bukkit.getServer().getScheduler().runTask(getPlugin(), new Runnable() { @Override public void run() @@ -100,7 +97,7 @@ public class DonationRepository extends RepositoryBase } } - Bukkit.getServer().getScheduler().runTask(Plugin, new Runnable() + Bukkit.getServer().getScheduler().runTask(getPlugin(), new Runnable() { @Override public void run() @@ -131,7 +128,7 @@ public class DonationRepository extends RepositoryBase { public void run(final Boolean response) { - Bukkit.getServer().getScheduler().runTask(Plugin, new Runnable() + Bukkit.getServer().getScheduler().runTask(getPlugin(), new Runnable() { @Override public void run() @@ -168,7 +165,7 @@ public class DonationRepository extends RepositoryBase //executeUpdate(INSERT_COIN_TRANSACTION, new ColumnInt("id", accountId), new ColumnVarChar("reason", 100, "Rewarded by " + giver), new ColumnInt("coins", coins)); } - Bukkit.getServer().getScheduler().runTask(Plugin, new Runnable() + Bukkit.getServer().getScheduler().runTask(getPlugin(), new Runnable() { @Override public void run() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloRepository.java index 2304a75c0..8c0874208 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloRepository.java @@ -3,14 +3,15 @@ package mineplex.core.elo; import java.sql.ResultSet; import java.sql.SQLException; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; -public class EloRepository extends RepositoryBase +public class EloRepository extends MinecraftRepository { private static String CREATE_ELO_TABLE = "CREATE TABLE IF NOT EXISTS eloRating (id INT NOT NULL AUTO_INCREMENT, uuid VARCHAR(256), gameType VARCHAR(256), elo INT, PRIMARY KEY (id), UNIQUE INDEX uuid_gameType_index (uuid, gameType));"; private static String INSERT_ELO = "INSERT INTO eloRating (uuid, gameType, elo) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE elo=VALUES(elo);"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/facebook/FacebookRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/facebook/FacebookRepository.java index 08b6edf93..b9f19f1d9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/facebook/FacebookRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/facebook/FacebookRepository.java @@ -3,16 +3,17 @@ package mineplex.core.facebook; import java.sql.ResultSet; import java.sql.SQLException; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.common.util.Callback; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; -public class FacebookRepository extends RepositoryBase +public class FacebookRepository extends MinecraftRepository { private static final String GET_CODE = "SELECT code, activated FROM facebook WHERE code = ?"; private static final String ACTIVATE_CODE = "UPDATE facebook SET activated = 1, accountId = ?, activationTime = NOW() WHERE code = ?"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/friend/data/FriendRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/friend/data/FriendRepository.java index c09fe1703..e26721864 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/friend/data/FriendRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/friend/data/FriendRepository.java @@ -5,18 +5,18 @@ import java.sql.SQLException; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; -import java.util.List; import java.util.Map; import java.util.Set; +import mineplex.core.database.MinecraftRepository; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnVarChar; import mineplex.core.friend.FriendStatusType; import mineplex.serverdata.Region; import mineplex.serverdata.data.DataRepository; @@ -24,7 +24,7 @@ import mineplex.serverdata.data.PlayerStatus; import mineplex.serverdata.redis.RedisDataRepository; import mineplex.serverdata.servers.ServerManager; -public class FriendRepository extends RepositoryBase +public class FriendRepository extends MinecraftRepository { private static String CREATE_FRIEND_TABLE = "CREATE TABLE IF NOT EXISTS accountFriend (id INT NOT NULL AUTO_INCREMENT, uuidSource VARCHAR(100), uuidTarget VARCHAR(100), status VARCHAR(100), PRIMARY KEY (id), UNIQUE INDEX uuidIndex (uuidSource, uuidTarget));"; private static String RETRIEVE_MULTIPLE_FRIEND_RECORDS = "SELECT uuidSource, tA.Name, status, tA.lastLogin, now() FROM accountFriend INNER Join accounts AS fA ON fA.uuid = uuidSource INNER JOIN accounts AS tA ON tA.uuid = uuidTarget WHERE uuidSource IN "; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/giveaway/GiveawayRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/giveaway/GiveawayRepository.java index 46844bd07..52c0cc50f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/giveaway/GiveawayRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/giveaway/GiveawayRepository.java @@ -8,17 +8,17 @@ import java.sql.Types; import java.util.HashMap; import java.util.UUID; -import org.bukkit.Bukkit; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; import mineplex.serverdata.Region; -public class GiveawayRepository extends RepositoryBase +public class GiveawayRepository extends MinecraftRepository { private static final String INSERT_GIVEAWAY = "INSERT INTO Account.accountGiveaway (giveawayId, accountId, cooldownId, region, serverName, time, uuid) VALUES (?, ?, ?, ?, ?, now(), ?)"; private static final String LOAD_GIVEAWAY = "SELECT id, name, prettyName, header, message, max, notifyNetwork, notifyCooldown, canWinTwice FROM Account.giveaway WHERE enabled = TRUE"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/ignore/data/IgnoreRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/ignore/data/IgnoreRepository.java index 14e1918c4..f4ee78ab2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/ignore/data/IgnoreRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/ignore/data/IgnoreRepository.java @@ -3,14 +3,15 @@ package mineplex.core.ignore.data; import java.sql.ResultSet; import java.sql.SQLException; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.core.database.MinecraftRepository; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnVarChar; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; -public class IgnoreRepository extends RepositoryBase +public class IgnoreRepository extends MinecraftRepository { private static String ADD_IGNORE_RECORD = "INSERT INTO accountIgnore (uuidIgnorer, uuidIgnored) SELECT fA.uuid AS uuidIgnorer, tA.uuid AS uuidIgnored FROM accounts as fA LEFT JOIN accounts AS tA ON tA.name = ? WHERE fA.name = ?;"; private static String DELETE_IGNORE_RECORD = "DELETE aF FROM accountIgnore AS aF INNER JOIN accounts as fA ON aF.uuidIgnorer = fA.uuid INNER JOIN accounts AS tA ON aF.uuidIgnored = tA.uuid WHERE fA.name = ? AND tA.name = ?;"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/inventory/data/InventoryRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/inventory/data/InventoryRepository.java index 018eb41e9..c13bd99e3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/inventory/data/InventoryRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/inventory/data/InventoryRepository.java @@ -5,18 +5,19 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; import mineplex.core.inventory.ClientInventory; import mineplex.core.inventory.ClientItem; -public class InventoryRepository extends RepositoryBase +public class InventoryRepository extends MinecraftRepository { private static String CREATE_INVENTORY_TABLE = "CREATE TABLE IF NOT EXISTS items (id INT NOT NULL AUTO_INCREMENT, name VARCHAR(100), rarity INT, PRIMARY KEY (id), INDEX mameIndex (name));"; private static String CREATE_INVENTORY_RELATION_TABLE = "CREATE TABLE IF NOT EXISTS accountInventory (id INT NOT NULL AUTO_INCREMENT, accountId INT NOT NULL, itemId INT NOT NULL, count INT NOT NULL, PRIMARY KEY (id), FOREIGN KEY (accountId) REFERENCES accounts(id), FOREIGN KEY (itemId) REFERENCES items(id), UNIQUE INDEX accountItemIndex (accountId, itemId));"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/leaderboard/StatEventsRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/leaderboard/StatEventsRepository.java index 5f0659c03..fab7b1cc2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/leaderboard/StatEventsRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/leaderboard/StatEventsRepository.java @@ -1,9 +1,10 @@ package mineplex.core.leaderboard; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.core.database.MinecraftRepository; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; import org.bukkit.plugin.java.JavaPlugin; @@ -15,7 +16,7 @@ import org.bukkit.plugin.java.JavaPlugin; * @author MrTwiggy * */ -public class StatEventsRepository extends RepositoryBase +public class StatEventsRepository extends MinecraftRepository { // Insert or update stat events query diff --git a/Plugins/Mineplex.Core/src/mineplex/core/npc/NpcManager.java b/Plugins/Mineplex.Core/src/mineplex/core/npc/NpcManager.java index 56d689a77..a94be37fe 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/npc/NpcManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/npc/NpcManager.java @@ -38,7 +38,7 @@ import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilPlayer; import mineplex.core.creature.Creature; import mineplex.core.creature.event.CreatureKillEntitiesEvent; -import mineplex.core.database.DBPool; +import mineplex.serverdata.database.DBPool; import mineplex.core.npc.command.NpcCommand; import mineplex.core.npc.event.NpcDamageByEntityEvent; import mineplex.core.npc.event.NpcInteractEntityEvent; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/pet/repository/PetRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/pet/repository/PetRepository.java index 40c2d2e1c..e607bd0c3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/pet/repository/PetRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/pet/repository/PetRepository.java @@ -2,21 +2,21 @@ package mineplex.core.pet.repository; import java.util.List; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; import com.google.gson.reflect.TypeToken; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; import mineplex.core.pet.repository.token.PetChangeToken; import mineplex.core.pet.repository.token.PetExtraToken; -import mineplex.core.pet.repository.token.PetSalesToken; import mineplex.core.server.remotecall.AsyncJsonWebCall; import mineplex.core.server.remotecall.JsonWebCall; -public class PetRepository extends RepositoryBase +public class PetRepository extends MinecraftRepository { private String _webAddress; @@ -31,7 +31,7 @@ public class PetRepository extends RepositoryBase { new AsyncJsonWebCall(_webAddress + "Pets/AddPet").Execute(token); - Plugin.getServer().getScheduler().runTaskAsynchronously(Plugin, new Runnable() + getPlugin().getServer().getScheduler().runTaskAsynchronously(getPlugin(), new Runnable() { public void run() { @@ -49,7 +49,7 @@ public class PetRepository extends RepositoryBase { new AsyncJsonWebCall(_webAddress + "Pets/RemovePet").Execute(token); - Plugin.getServer().getScheduler().runTaskAsynchronously(Plugin, new Runnable() + getPlugin().getServer().getScheduler().runTaskAsynchronously(getPlugin(), new Runnable() { public void run() { @@ -72,7 +72,7 @@ public class PetRepository extends RepositoryBase { new AsyncJsonWebCall(_webAddress + "Pets/UpdatePet").Execute(token); - Plugin.getServer().getScheduler().runTaskAsynchronously(Plugin, new Runnable() + getPlugin().getServer().getScheduler().runTaskAsynchronously(getPlugin(), new Runnable() { public void run() { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/poll/PollRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/poll/PollRepository.java index 9628a5c93..dbf24772d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/poll/PollRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/poll/PollRepository.java @@ -6,18 +6,19 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; /** * Created by Shaun on 8/16/2014. */ -public class PollRepository extends RepositoryBase +public class PollRepository extends MinecraftRepository { private static String CREATE_POLL_TABLE = "CREATE TABLE IF NOT EXISTS polls (id INT NOT NULL AUTO_INCREMENT, enabled BIT(1), question VARCHAR(256) NOT NULL, answerA VARCHAR(256) NOT NULL, answerB VARCHAR(256), answerC VARCHAR(256), answerD VARCHAR(256), coinReward INT NOT NULL, displayType INT DEFAULT 0 NOT NULL, PRIMARY KEY (id));"; private static String CREATE_RELATION_TABLE = "CREATE TABLE IF NOT EXISTS accountPolls (id INT NOT NULL AUTO_INCREMENT, accountId INT NOT NULL, pollId INT NOT NULL, value TINYINT(1) NOT NULL, PRIMARY KEY (id), FOREIGN KEY (accountId) REFERENCES accounts(id), FOREIGN KEY (pollId) REFERENCES polls(id), UNIQUE INDEX accountPollIndex (accountId, pollId));"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/preferences/PreferencesRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/preferences/PreferencesRepository.java index 3c90a2cce..ac3b06ffe 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/preferences/PreferencesRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/preferences/PreferencesRepository.java @@ -6,14 +6,15 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Map.Entry; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnVarChar; -public class PreferencesRepository extends RepositoryBase +public class PreferencesRepository extends MinecraftRepository { // private static String CREATE_ACCOUNT_TABLE = "CREATE TABLE IF NOT EXISTS // accountPreferences (id INT NOT NULL AUTO_INCREMENT, uuid VARCHAR(256), diff --git a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportRepository.java index 7b550e058..87f2780ac 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/report/ReportRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/report/ReportRepository.java @@ -1,22 +1,14 @@ package mineplex.core.report; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.UUID; -import java.util.Map.Entry; - -import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; -import mineplex.core.preferences.UserPreferences; +import mineplex.core.database.MinecraftRepository; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; import org.bukkit.plugin.java.JavaPlugin; -public class ReportRepository extends RepositoryBase +public class ReportRepository extends MinecraftRepository { /* * *ReportTicket diff --git a/Plugins/Mineplex.Core/src/mineplex/core/spawn/SpawnRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/spawn/SpawnRepository.java index c6f4191a5..78fda20c2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/spawn/SpawnRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/spawn/SpawnRepository.java @@ -5,14 +5,15 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnVarChar; -public class SpawnRepository extends RepositoryBase +public class SpawnRepository extends MinecraftRepository { private static String CREATE_SPAWN_TABLE = "CREATE TABLE IF NOT EXISTS spawns (id INT NOT NULL AUTO_INCREMENT, serverName VARCHAR(100), location VARCHAR(100), PRIMARY KEY (id), INDEX serverNameIndex (serverName));"; private static String RETRIEVE_SPAWNS = "SELECT location FROM spawns WHERE serverName = ?;"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsRepository.java index e8ac03479..cb5ec1320 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsRepository.java @@ -7,10 +7,11 @@ import java.util.Collections; import java.util.List; import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.core.database.MinecraftRepository; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnVarChar; import mineplex.database.Tables; import org.bukkit.plugin.java.JavaPlugin; @@ -23,7 +24,7 @@ import org.jooq.Update; import org.jooq.impl.DSL; import org.jooq.types.ULong; -public class StatsRepository extends RepositoryBase +public class StatsRepository extends MinecraftRepository { private static String RETRIEVE_STATS = "SELECT id, name FROM stats;"; private static String INSERT_STAT = "INSERT INTO stats (name) VALUES (?);"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/task/repository/TaskRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/task/repository/TaskRepository.java index 51dfe5726..35766c91d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/task/repository/TaskRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/task/repository/TaskRepository.java @@ -5,17 +5,18 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; import mineplex.core.task.Task; import mineplex.core.task.TaskClient; -public class TaskRepository extends RepositoryBase +public class TaskRepository extends MinecraftRepository { private static String ADD_ACCOUNT_TASK = "INSERT INTO accountTasks (accountId, taskId) VALUES (?, ?);"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/titangiveaway/TitanGiveawayRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/titangiveaway/TitanGiveawayRepository.java index b6d29c68b..29c0d6a88 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/titangiveaway/TitanGiveawayRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/titangiveaway/TitanGiveawayRepository.java @@ -4,15 +4,16 @@ import java.sql.CallableStatement; import java.sql.Connection; import java.sql.Types; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; import mineplex.serverdata.Region; -public class TitanGiveawayRepository extends RepositoryBase +public class TitanGiveawayRepository extends MinecraftRepository { private static final String ADD_TITAN = "INSERT INTO titanGiveaway (accountId, region, serverName) VALUES (?, ?, ?)"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/valentines/ValentinesGiftRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/valentines/ValentinesGiftRepository.java index 39a9d4034..0115bd9a3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/valentines/ValentinesGiftRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/valentines/ValentinesGiftRepository.java @@ -1,11 +1,12 @@ package mineplex.core.valentines; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.column.ColumnInt; +import mineplex.core.database.MinecraftRepository; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnInt; import org.bukkit.plugin.java.JavaPlugin; -public class ValentinesGiftRepository extends RepositoryBase +public class ValentinesGiftRepository extends MinecraftRepository { private String GIVE_GIFT = "INSERT INTO accountValentinesGift (senderId, targetId) VALUES (?, ?);"; diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/src/mineplex/ddos/DnsMadeEasyRepository.java b/Plugins/Mineplex.DDoSProtectionSwitcher/src/mineplex/ddos/DnsMadeEasyRepository.java index 2563df862..aebe2bdec 100644 --- a/Plugins/Mineplex.DDoSProtectionSwitcher/src/mineplex/ddos/DnsMadeEasyRepository.java +++ b/Plugins/Mineplex.DDoSProtectionSwitcher/src/mineplex/ddos/DnsMadeEasyRepository.java @@ -61,7 +61,7 @@ public class DnsMadeEasyRepository } } } - + public boolean switchToDDOSProt() { Connection connection = null; diff --git a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/TempRepository.java b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/TempRepository.java index e96d4a42a..73cba9a30 100644 --- a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/TempRepository.java +++ b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/TempRepository.java @@ -1,13 +1,14 @@ package mineplex.enjinTranslator; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; -public class TempRepository extends RepositoryBase +public class TempRepository extends MinecraftRepository { private static String INSERT_CLIENT_INVENTORY = "INSERT INTO accountInventory (accountId, itemId, count) SELECT accounts.id, 5, ? FROM accounts WHERE accounts.name = ? ON DUPLICATE KEY UPDATE count=count + VALUES(count);"; diff --git a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/purchase/PurchaseManager.java b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/purchase/PurchaseManager.java index 1897f407e..8f52c28a4 100644 --- a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/purchase/PurchaseManager.java +++ b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/purchase/PurchaseManager.java @@ -9,7 +9,7 @@ import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.MiniPlugin; import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.ResultSetCallable; +import mineplex.serverdata.database.ResultSetCallable; import mineplex.enjinTranslator.purchase.data.PurchaseRepository; import mineplex.enjinTranslator.purchase.data.Package; diff --git a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/purchase/data/PurchaseRepository.java b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/purchase/data/PurchaseRepository.java index 048c1fc99..0c2fe000a 100644 --- a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/purchase/data/PurchaseRepository.java +++ b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/purchase/data/PurchaseRepository.java @@ -5,16 +5,17 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnBoolean; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnBoolean; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; -public class PurchaseRepository extends RepositoryBase +public class PurchaseRepository extends MinecraftRepository { private static String INSERT_ACCOUNT_PURCHASE = "INSERT INTO accountPurchases (accountId, packageId, amount, date, success) VALUES (?, ?, ?, now(), ?);"; diff --git a/Plugins/Mineplex.Game.Clans.Core/src/mineplex/game/clans/core/repository/ClanRepository.java b/Plugins/Mineplex.Game.Clans.Core/src/mineplex/game/clans/core/repository/ClanRepository.java index 70f9d082b..8e2068a2d 100644 --- a/Plugins/Mineplex.Game.Clans.Core/src/mineplex/game/clans/core/repository/ClanRepository.java +++ b/Plugins/Mineplex.Game.Clans.Core/src/mineplex/game/clans/core/repository/ClanRepository.java @@ -11,14 +11,15 @@ import java.util.UUID; import mineplex.core.common.util.Callback; import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.Column; -import mineplex.core.database.column.ColumnBoolean; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnTimestamp; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.core.database.MinecraftRepository; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.Column; +import mineplex.serverdata.database.column.ColumnBoolean; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnTimestamp; +import mineplex.serverdata.database.column.ColumnVarChar; import mineplex.database.tables.records.ClansRecord; import mineplex.game.clans.core.repository.tokens.ClanAllianceToken; import mineplex.game.clans.core.repository.tokens.ClanMemberToken; @@ -36,7 +37,7 @@ import org.jooq.DSLContext; import static mineplex.database.Tables.*; import static org.jooq.impl.DSL.*; -public class ClanRepository extends RepositoryBase +public class ClanRepository extends MinecraftRepository { private static String CREATE_CLAN_TABLE = "CREATE TABLE IF NOT EXISTS clans (id INT NOT NULL AUTO_INCREMENT, serverId INT NOT NULL, name VARCHAR(100), description VARCHAR(140), home VARCHAR(140), admin BIT(1), dateCreated DATETIME, lastOnline DATETIME, energy INT, PRIMARY KEY (id), INDEX clanName (name));"; private static String CREATE_ACCOUNT_CLAN_TABLE = "CREATE TABLE IF NOT EXISTS accountClan (id INT NOT NULL AUTO_INCREMENT, accountId INT, clanId INT, clanRole VARCHAR(140), PRIMARY KEY (id), FOREIGN KEY (accountId) REFERENCES accounts(id), FOREIGN KEY (clanId) REFERENCES clans(id), INDEX clanIdIndex (clanId));"; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ban/ClansBanRepository.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ban/ClansBanRepository.java index 5ec0f6fc0..287d3c1de 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ban/ClansBanRepository.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/ban/ClansBanRepository.java @@ -6,20 +6,21 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.List; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.account.CoreClient; import mineplex.core.common.util.Callback; import mineplex.core.common.util.NonFinalInteger; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnBoolean; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnTimestamp; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnBoolean; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnTimestamp; +import mineplex.serverdata.database.column.ColumnVarChar; -public class ClansBanRepository extends RepositoryBase +public class ClansBanRepository extends MinecraftRepository { private ClansBanManager _manager; diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/fields/repository/FieldRepository.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/fields/repository/FieldRepository.java index 2f36fd067..6e604d3f8 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/fields/repository/FieldRepository.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/fields/repository/FieldRepository.java @@ -5,17 +5,18 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnByte; -import mineplex.core.database.column.ColumnDouble; -import mineplex.core.database.column.ColumnInt; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnByte; +import mineplex.serverdata.database.column.ColumnDouble; +import mineplex.serverdata.database.column.ColumnInt; +import mineplex.serverdata.database.column.ColumnVarChar; -public class FieldRepository extends RepositoryBase +public class FieldRepository extends MinecraftRepository { private static String ALL_STRING = "ALL"; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubRepository.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubRepository.java index cf07e0012..065728f36 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubRepository.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubRepository.java @@ -1,20 +1,12 @@ package mineplex.hub; import java.sql.Connection; -import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; -import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.DBPool; - -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; +import mineplex.serverdata.database.DBPool; public class HubRepository { diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/mail/MailRepository.java b/Plugins/Mineplex.Hub/src/mineplex/hub/mail/MailRepository.java index ae09e592f..7e7659b83 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/mail/MailRepository.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/mail/MailRepository.java @@ -4,10 +4,11 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.UUID; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; import mineplex.database.Tables; import mineplex.database.tables.records.MailRecord; @@ -15,7 +16,7 @@ import org.jooq.DSLContext; import org.jooq.Result; import org.jooq.impl.DSL; -public class MailRepository extends RepositoryBase +public class MailRepository extends MinecraftRepository { private MailManager _manager; diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/queue/QueueRepository.java b/Plugins/Mineplex.Hub/src/mineplex/hub/queue/QueueRepository.java index d0b0d0a91..217e4cd49 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/queue/QueueRepository.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/queue/QueueRepository.java @@ -1,14 +1,12 @@ package mineplex.hub.queue; import java.sql.Connection; -import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import mineplex.core.common.util.C; -import mineplex.core.database.DBPool; +import mineplex.serverdata.database.DBPool; public class QueueRepository { diff --git a/Plugins/Mineplex.ServerData/pom.xml b/Plugins/Mineplex.ServerData/pom.xml index b7e313ba5..b89ca0d8f 100644 --- a/Plugins/Mineplex.ServerData/pom.xml +++ b/Plugins/Mineplex.ServerData/pom.xml @@ -20,5 +20,10 @@ redis.clients jedis + + org.apache.commons + commons-dbcp2 + 2.0.1 + diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/DBPool.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java similarity index 93% rename from Plugins/Mineplex.Core/src/mineplex/core/database/DBPool.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java index ca6eaca75..d7c85e11a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/DBPool.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java @@ -1,4 +1,4 @@ -package mineplex.core.database; +package mineplex.serverdata.database; import javax.sql.DataSource; @@ -6,15 +6,10 @@ import java.io.File; import java.nio.charset.Charset; import java.nio.file.Files; import java.sql.Connection; -import java.util.ArrayList; import java.util.List; import org.apache.commons.dbcp2.BasicDataSource; -import mineplex.serverdata.redis.RedisConfig; -import mineplex.serverdata.servers.ConnectionData; -import mineplex.serverdata.servers.ConnectionData.ConnectionType; - public final class DBPool { private static DataSource ACCOUNT; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/DatabaseRunnable.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DatabaseRunnable.java similarity index 90% rename from Plugins/Mineplex.Core/src/mineplex/core/database/DatabaseRunnable.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DatabaseRunnable.java index f5d1899cd..4817a9dc4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/DatabaseRunnable.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DatabaseRunnable.java @@ -1,4 +1,4 @@ -package mineplex.core.database; +package mineplex.serverdata.database; public class DatabaseRunnable { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/RepositoryBase.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/RepositoryBase.java similarity index 55% rename from Plugins/Mineplex.Core/src/mineplex/core/database/RepositoryBase.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/RepositoryBase.java index 55acc83ed..daa668281 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/RepositoryBase.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/RepositoryBase.java @@ -1,57 +1,31 @@ -package mineplex.core.database; +package mineplex.serverdata.database; -import java.sql.CallableStatement; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.Iterator; import javax.sql.DataSource; -import mineplex.core.common.util.NautHashMap; -import mineplex.core.database.column.Column; -import mineplex.core.updater.UpdateType; -import mineplex.core.updater.event.UpdateEvent; -import org.jooq.DSLContext; -import org.jooq.SQLDialect; -import org.jooq.impl.DSL; +import mineplex.serverdata.database.column.Column; -import org.bukkit.Bukkit; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.plugin.java.JavaPlugin; - -public abstract class RepositoryBase implements Listener +public abstract class RepositoryBase { - // Queue for failed processes - private static Object _queueLock = new Object(); - private NautHashMap _failedQueue = new NautHashMap(); - private DataSource _dataSource; // Connection pool - protected JavaPlugin Plugin; // Plugin responsible for this repository - + /** * Constructor - * @param plugin - the {@link JavaPlugin} module responsible for this repository. * @param dataSource - the {@link DataSource} responsible for providing the connection pool to this repository. */ - public RepositoryBase(JavaPlugin plugin, DataSource dataSource) + public RepositoryBase(DataSource dataSource) { - Plugin = plugin; _dataSource = dataSource; - Bukkit.getServer().getScheduler().runTaskAsynchronously(plugin, new Runnable() - { - public void run() - { - initialize(); - update(); - } - }); - - plugin.getServer().getPluginManager().registerEvents(this, plugin); + new Thread(() -> { + initialize(); + update(); + }).start(); } protected abstract void initialize(); @@ -66,11 +40,6 @@ public abstract class RepositoryBase implements Listener return _dataSource; } - protected DSLContext jooq() - { - return DSL.using(DBPool.getAccount(), SQLDialect.MYSQL); - } - /** * Requirements: {@link Connection}s must be closed after usage so they may be returned to the pool! * @see Connection#close() @@ -178,58 +147,4 @@ public abstract class RepositoryBase implements Listener exception.printStackTrace(); } } - - protected void handleDatabaseCall(final DatabaseRunnable databaseRunnable, final String errorMessage) - { - Thread asyncThread = new Thread(new Runnable() - { - public void run() - { - try - { - databaseRunnable.run(); - } - catch (Exception exception) - { - processFailedDatabaseCall(databaseRunnable, exception.getMessage(), errorMessage); - } - } - }); - - asyncThread.start(); - } - - protected void processFailedDatabaseCall(DatabaseRunnable databaseRunnable, String errorPreMessage, String runnableMessage) - { - if (databaseRunnable.getFailedCounts() < 4) - { - databaseRunnable.incrementFailCount(); - - synchronized (_queueLock) - { - _failedQueue.put(databaseRunnable, runnableMessage); - } - } - } - - @EventHandler - public void processDatabaseQueue(UpdateEvent event) - { - if (event.getType() != UpdateType.MIN_01) - return; - - processFailedQueue(); - } - - private void processFailedQueue() - { - synchronized (_queueLock) - { - for (Iterator runnablesIterator = _failedQueue.keySet().iterator(); runnablesIterator.hasNext();) - { - DatabaseRunnable databaseRunnable = runnablesIterator.next(); - handleDatabaseCall(databaseRunnable, _failedQueue.get(databaseRunnable)); - } - } - } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/ResultSetCallable.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/ResultSetCallable.java similarity index 81% rename from Plugins/Mineplex.Core/src/mineplex/core/database/ResultSetCallable.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/ResultSetCallable.java index 2972d5f4a..adac7876d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/ResultSetCallable.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/ResultSetCallable.java @@ -1,4 +1,4 @@ -package mineplex.core.database; +package mineplex.serverdata.database; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/column/Column.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/Column.java similarity index 92% rename from Plugins/Mineplex.Core/src/mineplex/core/database/column/Column.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/Column.java index d73d6da05..939e29a83 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/column/Column.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/Column.java @@ -1,4 +1,4 @@ -package mineplex.core.database.column; +package mineplex.serverdata.database.column; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnBoolean.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnBoolean.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnBoolean.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnBoolean.java index a7da34f61..4eb6a48c2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnBoolean.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnBoolean.java @@ -1,4 +1,4 @@ -package mineplex.core.database.column; +package mineplex.serverdata.database.column; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnByte.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnByte.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnByte.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnByte.java index 40464a318..9a92bdb38 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnByte.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnByte.java @@ -1,4 +1,4 @@ -package mineplex.core.database.column; +package mineplex.serverdata.database.column; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnDouble.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnDouble.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnDouble.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnDouble.java index 1163df926..2c7fe76c2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnDouble.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnDouble.java @@ -1,4 +1,4 @@ -package mineplex.core.database.column; +package mineplex.serverdata.database.column; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnInt.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnInt.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnInt.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnInt.java index 25ed6a705..348aeb1dd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnInt.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnInt.java @@ -1,4 +1,4 @@ -package mineplex.core.database.column; +package mineplex.serverdata.database.column; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnLong.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnLong.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnLong.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnLong.java index d8c8815b5..d3eec3a95 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnLong.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnLong.java @@ -1,4 +1,4 @@ -package mineplex.core.database.column; +package mineplex.serverdata.database.column; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnTimestamp.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnTimestamp.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnTimestamp.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnTimestamp.java index 1efacd628..6ce17f633 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnTimestamp.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnTimestamp.java @@ -1,4 +1,4 @@ -package mineplex.core.database.column; +package mineplex.serverdata.database.column; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnVarChar.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnVarChar.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnVarChar.java rename to Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnVarChar.java index da5c484c1..a60b3b19d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/database/column/ColumnVarChar.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/column/ColumnVarChar.java @@ -1,4 +1,4 @@ -package mineplex.core.database.column; +package mineplex.serverdata.database.column; import java.sql.PreparedStatement; import java.sql.ResultSet; diff --git a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/StatusHistoryRepository.java b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/StatusHistoryRepository.java index a85d42848..8f4566b0f 100644 --- a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/StatusHistoryRepository.java +++ b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/StatusHistoryRepository.java @@ -1,7 +1,6 @@ package mineplex.servermonitor; import java.sql.Connection; -import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.ArrayList; @@ -14,15 +13,13 @@ import mineplex.serverdata.data.BungeeServer; import mineplex.serverdata.data.DataRepository; import mineplex.serverdata.data.DedicatedServer; import mineplex.serverdata.data.ServerGroup; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; import mineplex.serverdata.redis.RedisDataRepository; import mineplex.serverdata.servers.ServerManager; -public class StatusHistoryRepository +public class StatusHistoryRepository extends RepositoryBase { - private String _connectionString = "jdbc:mysql://sqlstats.mineplex.com:3306/ServerStats"; - private String _userName = "root"; - private String _password = "tAbechAk3wR7tuTh"; - private static String CREATE_GROUP_TABLE = "CREATE TABLE IF NOT EXISTS ServerGroupStats (id INT NOT NULL AUTO_INCREMENT, serverGroup VARCHAR(100), updated LONG, players INT, maxPlayers INT, totalNetworkCpuUsage DOUBLE(4,2), totalNetworkRamUsage DOUBLE(4,2), totalCpu MEDIUMINT, totalRam MEDIUMINT, US BOOLEAN NOT NULL DEFAULT '1', PRIMARY KEY (id));"; private static String CREATE_DEDICATED_TABLE = "CREATE TABLE IF NOT EXISTS DedicatedServerStats (id INT NOT NULL AUTO_INCREMENT, serverName VARCHAR(100), address VARCHAR(25), updated LONG, cpu TINYINT, ram MEDIUMINT, usedCpuPercent DOUBLE(4,2), usedRamPercent DOUBLE(4,2), US BOOLEAN NOT NULL DEFAULT '1', PRIMARY KEY (id));"; private static String CREATE_BUNGEE_TABLE = "CREATE TABLE IF NOT EXISTS BungeeStats (id INT NOT NULL AUTO_INCREMENT, address VARCHAR(25), updated LONG, players INT, maxPlayers INT, alive BOOLEAN NOT NULL, online BOOLEAN NOT NULL, US BOOLEAN NOT NULL DEFAULT '1', PRIMARY KEY (id));"; @@ -33,38 +30,33 @@ public class StatusHistoryRepository private static String INSERT_BUNGEE_STATS = "INSERT INTO BungeeStats (address, updated, players, maxPlayers, alive, online, US) VALUES (?, now(), ?, ?, ?, ?, ?);"; private static String INSERT_NETWORK_STATS = "INSERT INTO NetworkStats (updated, players, totalNetworkCpuUsage, totalNetworkRamUsage, totalCpu, totalRam, US) VALUES (now(), ?, ?, ?, ?, ?, ?);"; - private static Connection _connection; - private static DataRepository _repository; public StatusHistoryRepository() { + super(DBPool.getStats()); + PreparedStatement preparedStatement = null; - - try + + try(Connection connection = getConnection()) { - Class.forName("com.mysql.jdbc.Driver"); - - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - // Create table - preparedStatement = _connection.prepareStatement(CREATE_GROUP_TABLE); + preparedStatement = connection.prepareStatement(CREATE_GROUP_TABLE); preparedStatement.execute(); preparedStatement.close(); // Create table - preparedStatement = _connection.prepareStatement(CREATE_DEDICATED_TABLE); + preparedStatement = connection.prepareStatement(CREATE_DEDICATED_TABLE); preparedStatement.execute(); preparedStatement.close(); // Create table - preparedStatement = _connection.prepareStatement(CREATE_BUNGEE_TABLE); + preparedStatement = connection.prepareStatement(CREATE_BUNGEE_TABLE); preparedStatement.execute(); preparedStatement.close(); // Create table - preparedStatement = _connection.prepareStatement(CREATE_NETWORKSTATS_TABLE); + preparedStatement = connection.prepareStatement(CREATE_NETWORKSTATS_TABLE); preparedStatement.execute(); preparedStatement.close(); @@ -95,12 +87,9 @@ public class StatusHistoryRepository { PreparedStatement preparedStatement = null; - try + try(Connection connection = getConnection()) { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(INSERT_SERVERGROUP_STATS); + preparedStatement = connection.prepareStatement(INSERT_SERVERGROUP_STATS); for (ServerGroup serverGroup : collection) { @@ -144,12 +133,9 @@ public class StatusHistoryRepository { PreparedStatement preparedStatement = null; - try + try(Connection connection = getConnection()) { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(INSERT_DEDICATEDSERVER_STATS); + preparedStatement = connection.prepareStatement(INSERT_DEDICATEDSERVER_STATS); for (DedicatedServer dedicatedServer : dedicatedServers) { @@ -204,12 +190,9 @@ public class StatusHistoryRepository PreparedStatement preparedStatement = null; - try + try(Connection connection = getConnection()) { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(INSERT_BUNGEE_STATS); + preparedStatement = connection.prepareStatement(INSERT_BUNGEE_STATS); for (BungeeServer bungeeStatusData : bungeeServers) { @@ -246,12 +229,9 @@ public class StatusHistoryRepository preparedStatement = null; - try + try(Connection connection = getConnection()) { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(INSERT_NETWORK_STATS); + preparedStatement = connection.prepareStatement(INSERT_NETWORK_STATS); preparedStatement.setInt(1, totalPlayers); preparedStatement.setDouble(2, usedCpuPercent); preparedStatement.setDouble(3, usedRamPercent); @@ -280,4 +260,16 @@ public class StatusHistoryRepository } } } + + @Override + protected void initialize() + { + + } + + @Override + protected void update() + { + + } } diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/PasswordRepository.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/PasswordRepository.java index 33b63e8a5..07fa746c1 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/PasswordRepository.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/password/PasswordRepository.java @@ -5,14 +5,15 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +import mineplex.core.database.MinecraftRepository; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; -import mineplex.core.database.ResultSetCallable; -import mineplex.core.database.column.ColumnVarChar; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; +import mineplex.serverdata.database.ResultSetCallable; +import mineplex.serverdata.database.column.ColumnVarChar; -public class PasswordRepository extends RepositoryBase +public class PasswordRepository extends MinecraftRepository { private static String CREATE_SERVER_PASSWORD_TABLE = "CREATE TABLE IF NOT EXISTS serverPassword (id INT NOT NULL AUTO_INCREMENT, server VARCHAR(100), password VARCHAR(100), PRIMARY KEY (id));"; private static String RETRIEVE_SERVER_PASSWORD = "SELECT password FROM serverPassword WHERE server = ?;"; diff --git a/Plugins/Mineplex.Votifier/src/mineplex/votifier/VotifierManager.java b/Plugins/Mineplex.Votifier/src/mineplex/votifier/VotifierManager.java index 4817371cb..23801e02d 100644 --- a/Plugins/Mineplex.Votifier/src/mineplex/votifier/VotifierManager.java +++ b/Plugins/Mineplex.Votifier/src/mineplex/votifier/VotifierManager.java @@ -11,12 +11,11 @@ import com.vexsoftware.votifier.model.VotifierEvent; import mineplex.core.MiniPlugin; import mineplex.core.account.CoreClientManager; import mineplex.core.bonuses.BonusAmount; -import mineplex.core.bonuses.BonusClientData; import mineplex.core.bonuses.BonusManager; import mineplex.core.common.Pair; import mineplex.core.common.util.Callback; import mineplex.core.common.util.UUIDFetcher; -import mineplex.core.database.DBPool; +import mineplex.serverdata.database.DBPool; import mineplex.core.donation.DonationManager; import mineplex.core.bonuses.redis.VotifierCommand; import mineplex.database.Tables; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/titangiveaway/TitanGiveawayRepository.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/titangiveaway/TitanGiveawayRepository.java index 3585b3586..49bc0601b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/titangiveaway/TitanGiveawayRepository.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/titangiveaway/TitanGiveawayRepository.java @@ -4,12 +4,13 @@ import java.sql.CallableStatement; import java.sql.Connection; import java.sql.Types; -import mineplex.core.database.DBPool; -import mineplex.core.database.RepositoryBase; +import mineplex.core.database.MinecraftRepository; +import mineplex.serverdata.database.DBPool; +import mineplex.serverdata.database.RepositoryBase; import org.bukkit.plugin.java.JavaPlugin; -public class TitanGiveawayRepository extends RepositoryBase +public class TitanGiveawayRepository extends MinecraftRepository { private int _titanGiveawayCount; From d5583b93f277458f1d04955946e824a8f642a5da Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Fri, 19 Feb 2016 07:14:13 +0000 Subject: [PATCH 24/33] remove eclipse files --- .../org.eclipse.core.resources.prefs | 2 -- Plugins/.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.Bungee.Mineplexer/.classpath | 20 ---------------- Plugins/Mineplex.Bungee.Mineplexer/.project | 23 ------------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.BungeeRotator/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.Cache/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.Core.Common/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.Core/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- .../.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.Database/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.EnjinTranslator/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.Game.Clans.Core/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.Game.Clans/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.Hub/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.MapParser/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- .../.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- .../Mineplex.Minecraft.Game.Core/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.ServerData/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.ServerMonitor/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.StaffServer/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Mineplex.Votifier/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- Plugins/Nautilus.Game.Arcade/.classpath | 20 ---------------- .../org.eclipse.core.resources.prefs | 3 --- .../.settings/org.eclipse.jdt.core.prefs | 5 ---- .../.settings/org.eclipse.m2e.core.prefs | 4 ---- 79 files changed, 637 deletions(-) delete mode 100644 Plugins/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Bungee.Mineplexer/.classpath delete mode 100644 Plugins/Mineplex.Bungee.Mineplexer/.project delete mode 100644 Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.BungeeRotator/.classpath delete mode 100644 Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Cache/.classpath delete mode 100644 Plugins/Mineplex.Cache/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Cache/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Cache/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Core.Common/.classpath delete mode 100644 Plugins/Mineplex.Core.Common/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Core.Common/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Core/.classpath delete mode 100644 Plugins/Mineplex.Core/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Core/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Core/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.DDoSProtectionSwitcher/.classpath delete mode 100644 Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Database/.classpath delete mode 100644 Plugins/Mineplex.Database/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Database/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Database/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.EnjinTranslator/.classpath delete mode 100644 Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Game.Clans.Core/.classpath delete mode 100644 Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Game.Clans/.classpath delete mode 100644 Plugins/Mineplex.Game.Clans/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Game.Clans/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Hub/.classpath delete mode 100644 Plugins/Mineplex.Hub/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Hub/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.MapParser/.classpath delete mode 100644 Plugins/Mineplex.MapParser/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.MapParser/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Minecraft.Game.ClassCombat/.classpath delete mode 100644 Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Minecraft.Game.Core/.classpath delete mode 100644 Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.ServerData/.classpath delete mode 100644 Plugins/Mineplex.ServerData/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.ServerData/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.ServerData/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.ServerMonitor/.classpath delete mode 100644 Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.StaffServer/.classpath delete mode 100644 Plugins/Mineplex.StaffServer/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.StaffServer/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.StaffServer/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Mineplex.Votifier/.classpath delete mode 100644 Plugins/Mineplex.Votifier/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Mineplex.Votifier/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Mineplex.Votifier/.settings/org.eclipse.m2e.core.prefs delete mode 100644 Plugins/Nautilus.Game.Arcade/.classpath delete mode 100644 Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.core.resources.prefs delete mode 100644 Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.m2e.core.prefs diff --git a/Plugins/.settings/org.eclipse.core.resources.prefs b/Plugins/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c020..000000000 --- a/Plugins/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/Plugins/.settings/org.eclipse.m2e.core.prefs b/Plugins/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.classpath b/Plugins/Mineplex.Bungee.Mineplexer/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Bungee.Mineplexer/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.project b/Plugins/Mineplex.Bungee.Mineplexer/.project deleted file mode 100644 index b69c0ae2c..000000000 --- a/Plugins/Mineplex.Bungee.Mineplexer/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-bungee-mineplexer - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Bungee.Mineplexer/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.BungeeRotator/.classpath b/Plugins/Mineplex.BungeeRotator/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.BungeeRotator/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.BungeeRotator/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Cache/.classpath b/Plugins/Mineplex.Cache/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Cache/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Cache/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Cache/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Cache/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Cache/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Cache/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Cache/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Cache/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Cache/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Cache/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Core.Common/.classpath b/Plugins/Mineplex.Core.Common/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Core.Common/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Core.Common/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Core.Common/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Core.Common/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Core/.classpath b/Plugins/Mineplex.Core/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Core/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Core/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Core/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Core/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Core/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Core/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Core/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Core/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Core/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Core/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.classpath b/Plugins/Mineplex.DDoSProtectionSwitcher/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.DDoSProtectionSwitcher/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.DDoSProtectionSwitcher/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Database/.classpath b/Plugins/Mineplex.Database/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Database/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Database/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Database/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Database/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Database/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Database/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Database/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Database/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Database/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Database/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.EnjinTranslator/.classpath b/Plugins/Mineplex.EnjinTranslator/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.EnjinTranslator/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.EnjinTranslator/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Game.Clans.Core/.classpath b/Plugins/Mineplex.Game.Clans.Core/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Game.Clans.Core/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Game.Clans.Core/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Game.Clans/.classpath b/Plugins/Mineplex.Game.Clans/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Game.Clans/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Game.Clans/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Hub/.classpath b/Plugins/Mineplex.Hub/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Hub/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Hub/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Hub/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Hub/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Hub/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Hub/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Hub/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Hub/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.MapParser/.classpath b/Plugins/Mineplex.MapParser/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.MapParser/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.MapParser/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.MapParser/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.MapParser/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.MapParser/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.MapParser/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.MapParser/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.MapParser/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.classpath b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.classpath b/Plugins/Mineplex.Minecraft.Game.Core/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Minecraft.Game.Core/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Minecraft.Game.Core/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.ServerData/.classpath b/Plugins/Mineplex.ServerData/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.ServerData/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.ServerData/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.ServerData/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.ServerData/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.ServerData/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.ServerData/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.ServerData/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.ServerData/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.ServerData/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.ServerData/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.ServerMonitor/.classpath b/Plugins/Mineplex.ServerMonitor/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.ServerMonitor/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.ServerMonitor/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.StaffServer/.classpath b/Plugins/Mineplex.StaffServer/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.StaffServer/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.StaffServer/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.StaffServer/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.StaffServer/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.StaffServer/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.StaffServer/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.StaffServer/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.StaffServer/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.StaffServer/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.StaffServer/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Mineplex.Votifier/.classpath b/Plugins/Mineplex.Votifier/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Mineplex.Votifier/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Mineplex.Votifier/.settings/org.eclipse.core.resources.prefs b/Plugins/Mineplex.Votifier/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Mineplex.Votifier/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Mineplex.Votifier/.settings/org.eclipse.jdt.core.prefs b/Plugins/Mineplex.Votifier/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Mineplex.Votifier/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Mineplex.Votifier/.settings/org.eclipse.m2e.core.prefs b/Plugins/Mineplex.Votifier/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Mineplex.Votifier/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Plugins/Nautilus.Game.Arcade/.classpath b/Plugins/Nautilus.Game.Arcade/.classpath deleted file mode 100644 index 149cb3c90..000000000 --- a/Plugins/Nautilus.Game.Arcade/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.core.resources.prefs b/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a5313928..000000000 --- a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 -encoding/src=UTF-8 diff --git a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs b/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 714351aec..000000000 --- a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.m2e.core.prefs b/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f1c..000000000 --- a/Plugins/Nautilus.Game.Arcade/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 From c811906a7ec501fc16f2a1685f9d7d54d3ef0fe7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 Feb 2016 18:20:36 +1100 Subject: [PATCH 25/33] REVERT: Provide option to load config from mineplex.yml, not per game folders. (reverted from commit b58ea5b51a6ad6160c4256b765b23059c7adb19a) --- .../mineplex/core/common/ConfigContainer.java | 46 ------------------- .../Mineplex.Hub/src/mineplex/hub/Hub.java | 13 ------ .../src/nautilus/game/arcade/Arcade.java | 13 ------ 3 files changed, 72 deletions(-) delete mode 100644 Plugins/Mineplex.Core.Common/src/mineplex/core/common/ConfigContainer.java diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/ConfigContainer.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/ConfigContainer.java deleted file mode 100644 index 9974025c0..000000000 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/ConfigContainer.java +++ /dev/null @@ -1,46 +0,0 @@ -package mineplex.core.common; - -import java.io.File; -import java.io.IOException; -import java.util.logging.Level; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.configuration.file.YamlConfiguration; -import org.bukkit.plugin.Plugin; - -public class ConfigContainer -{ - - private final Plugin _plugin; - private File _configFile; - private FileConfiguration _config; - - public ConfigContainer(Plugin plugin, String configFile) - { - this._plugin = plugin; - this._configFile = new File(configFile); - } - - public FileConfiguration getConfig() { - if (_config == null) - { - if (_configFile.isFile()) - { - _config = YamlConfiguration.loadConfiguration(_configFile); - } else { - _config = _plugin.getConfig(); - _configFile = new File(_plugin.getDataFolder(), "config.yml"); - } - } - - return _config; - } - - public void saveConfig() { - try - { - getConfig().save(_configFile); - } catch (IOException ex) { - _plugin.getLogger().log(Level.SEVERE, "Could not save config to " + _configFile, ex); - } - } -} diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index b7b8cb0cc..15513f191 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -13,7 +13,6 @@ import mineplex.core.aprilfools.AprilFoolsManager; import mineplex.core.blockrestore.BlockRestore; import mineplex.core.chat.Chat; import mineplex.core.command.CommandCenter; -import mineplex.core.common.ConfigContainer; import mineplex.core.common.events.ServerShutdownEvent; import mineplex.core.creature.Creature; import mineplex.core.customdata.CustomDataManager; @@ -69,22 +68,10 @@ import mineplex.minecraft.game.core.IRelation; import mineplex.minecraft.game.core.combat.CombatManager; import mineplex.minecraft.game.core.damage.DamageManager; import mineplex.minecraft.game.core.fire.Fire; -import org.bukkit.configuration.file.FileConfiguration; public class Hub extends JavaPlugin implements IRelation { private String WEB_CONFIG = "webServer"; - private final ConfigContainer _config = new ConfigContainer(this, "mineplex.yml"); - - @Override - public FileConfiguration getConfig() { - return _config.getConfig(); - } - - @Override - public void saveConfig() { - _config.saveConfig(); - } @Override public void onEnable() diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java index a54d7796b..9bec8fee2 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -16,7 +16,6 @@ import mineplex.core.blockrestore.BlockRestore; import mineplex.core.blood.Blood; import mineplex.core.chat.Chat; import mineplex.core.command.CommandCenter; -import mineplex.core.common.ConfigContainer; import mineplex.core.common.events.ServerShutdownEvent; import mineplex.core.common.util.FileUtil; import mineplex.core.common.util.UtilServer; @@ -61,7 +60,6 @@ import mineplex.minecraft.game.core.damage.DamageManager; import nautilus.game.arcade.game.GameServerConfig; import net.minecraft.server.v1_8_R3.BiomeBase; import net.minecraft.server.v1_8_R3.MinecraftServer; -import org.bukkit.configuration.file.FileConfiguration; public class Arcade extends JavaPlugin { @@ -75,17 +73,6 @@ public class Arcade extends JavaPlugin private ArcadeManager _gameManager; private ServerConfiguration _serverConfiguration; - private final ConfigContainer _config = new ConfigContainer(this, "mineplex.yml"); - - @Override - public FileConfiguration getConfig() { - return _config.getConfig(); - } - - @Override - public void saveConfig() { - _config.saveConfig(); - } @Override public void onEnable() From 67c355bf652e9c802dc1e8e56b088c44cdaaac3b Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Fri, 19 Feb 2016 07:22:54 +0000 Subject: [PATCH 26/33] remove more eclipse files --- Plugins/.project | 17 -------------- Plugins/Mineplex.BungeeRotator/.project | 23 ------------------- Plugins/Mineplex.Cache/.project | 23 ------------------- Plugins/Mineplex.Core.Common/.project | 23 ------------------- Plugins/Mineplex.Core/.project | 23 ------------------- .../Mineplex.DDoSProtectionSwitcher/.project | 23 ------------------- Plugins/Mineplex.Database/.project | 23 ------------------- Plugins/Mineplex.EnjinTranslator/.project | 23 ------------------- Plugins/Mineplex.Game.Clans.Core/.project | 23 ------------------- Plugins/Mineplex.Game.Clans/.project | 23 ------------------- Plugins/Mineplex.Hub/.project | 23 ------------------- Plugins/Mineplex.MapParser/.project | 23 ------------------- .../.project | 23 ------------------- Plugins/Mineplex.Minecraft.Game.Core/.project | 23 ------------------- Plugins/Mineplex.ServerData/.project | 23 ------------------- Plugins/Mineplex.ServerMonitor/.project | 23 ------------------- Plugins/Mineplex.StaffServer/.project | 23 ------------------- Plugins/Mineplex.Votifier/.project | 23 ------------------- Plugins/Nautilus.Game.Arcade/.project | 23 ------------------- 19 files changed, 431 deletions(-) delete mode 100644 Plugins/.project delete mode 100644 Plugins/Mineplex.BungeeRotator/.project delete mode 100644 Plugins/Mineplex.Cache/.project delete mode 100644 Plugins/Mineplex.Core.Common/.project delete mode 100644 Plugins/Mineplex.Core/.project delete mode 100644 Plugins/Mineplex.DDoSProtectionSwitcher/.project delete mode 100644 Plugins/Mineplex.Database/.project delete mode 100644 Plugins/Mineplex.EnjinTranslator/.project delete mode 100644 Plugins/Mineplex.Game.Clans.Core/.project delete mode 100644 Plugins/Mineplex.Game.Clans/.project delete mode 100644 Plugins/Mineplex.Hub/.project delete mode 100644 Plugins/Mineplex.MapParser/.project delete mode 100644 Plugins/Mineplex.Minecraft.Game.ClassCombat/.project delete mode 100644 Plugins/Mineplex.Minecraft.Game.Core/.project delete mode 100644 Plugins/Mineplex.ServerData/.project delete mode 100644 Plugins/Mineplex.ServerMonitor/.project delete mode 100644 Plugins/Mineplex.StaffServer/.project delete mode 100644 Plugins/Mineplex.Votifier/.project delete mode 100644 Plugins/Nautilus.Game.Arcade/.project diff --git a/Plugins/.project b/Plugins/.project deleted file mode 100644 index a6856b606..000000000 --- a/Plugins/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - mineplex-parent - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.BungeeRotator/.project b/Plugins/Mineplex.BungeeRotator/.project deleted file mode 100644 index 129c81c53..000000000 --- a/Plugins/Mineplex.BungeeRotator/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-bungeerotator - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Cache/.project b/Plugins/Mineplex.Cache/.project deleted file mode 100644 index 6145fd700..000000000 --- a/Plugins/Mineplex.Cache/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-cache - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Core.Common/.project b/Plugins/Mineplex.Core.Common/.project deleted file mode 100644 index 9806b2840..000000000 --- a/Plugins/Mineplex.Core.Common/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-core-common - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Core/.project b/Plugins/Mineplex.Core/.project deleted file mode 100644 index 6a1bf4f06..000000000 --- a/Plugins/Mineplex.Core/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-core - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.DDoSProtectionSwitcher/.project b/Plugins/Mineplex.DDoSProtectionSwitcher/.project deleted file mode 100644 index a2ddab34c..000000000 --- a/Plugins/Mineplex.DDoSProtectionSwitcher/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-ddosprotectionswitcher - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Database/.project b/Plugins/Mineplex.Database/.project deleted file mode 100644 index 759b2080b..000000000 --- a/Plugins/Mineplex.Database/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-database - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.EnjinTranslator/.project b/Plugins/Mineplex.EnjinTranslator/.project deleted file mode 100644 index 571faeecc..000000000 --- a/Plugins/Mineplex.EnjinTranslator/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-enjintranslator - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Game.Clans.Core/.project b/Plugins/Mineplex.Game.Clans.Core/.project deleted file mode 100644 index ab84c6a4a..000000000 --- a/Plugins/Mineplex.Game.Clans.Core/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-game-clans-core - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Game.Clans/.project b/Plugins/Mineplex.Game.Clans/.project deleted file mode 100644 index a26211ecb..000000000 --- a/Plugins/Mineplex.Game.Clans/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-game-clans - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Hub/.project b/Plugins/Mineplex.Hub/.project deleted file mode 100644 index 24d759c40..000000000 --- a/Plugins/Mineplex.Hub/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-hub - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.MapParser/.project b/Plugins/Mineplex.MapParser/.project deleted file mode 100644 index 43bcff000..000000000 --- a/Plugins/Mineplex.MapParser/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-mapparser - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.project b/Plugins/Mineplex.Minecraft.Game.ClassCombat/.project deleted file mode 100644 index ec0a67356..000000000 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-minecraft-game-classcombat - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Minecraft.Game.Core/.project b/Plugins/Mineplex.Minecraft.Game.Core/.project deleted file mode 100644 index 34b626ff9..000000000 --- a/Plugins/Mineplex.Minecraft.Game.Core/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-minecraft-game-core - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.ServerData/.project b/Plugins/Mineplex.ServerData/.project deleted file mode 100644 index cc601dfce..000000000 --- a/Plugins/Mineplex.ServerData/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-serverdata - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.ServerMonitor/.project b/Plugins/Mineplex.ServerMonitor/.project deleted file mode 100644 index 674450760..000000000 --- a/Plugins/Mineplex.ServerMonitor/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-servermonitor - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.StaffServer/.project b/Plugins/Mineplex.StaffServer/.project deleted file mode 100644 index d237ceb58..000000000 --- a/Plugins/Mineplex.StaffServer/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-staffserver - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Mineplex.Votifier/.project b/Plugins/Mineplex.Votifier/.project deleted file mode 100644 index e22997649..000000000 --- a/Plugins/Mineplex.Votifier/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - mineplex-votifier - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/Plugins/Nautilus.Game.Arcade/.project b/Plugins/Nautilus.Game.Arcade/.project deleted file mode 100644 index 3bdc39535..000000000 --- a/Plugins/Nautilus.Game.Arcade/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - nautilus-game-arcade - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - From 3b102075032948cdd6d26452459260fed499c70c Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Fri, 19 Feb 2016 02:40:14 -0600 Subject: [PATCH 27/33] Class.forName! --- .../mineplex/serverdata/database/RepositoryBase.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/RepositoryBase.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/RepositoryBase.java index daa668281..668985c77 100644 --- a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/RepositoryBase.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/RepositoryBase.java @@ -12,6 +12,17 @@ import mineplex.serverdata.database.column.Column; public abstract class RepositoryBase { + static + { + try + { + Class.forName("com.mysql.jdbc.Driver"); + } catch (ClassNotFoundException e) + { + e.printStackTrace(); + } + } + private DataSource _dataSource; // Connection pool /** From d575266522755ef92b14b459ef87272dbb7c0770 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 Feb 2016 19:44:30 +1100 Subject: [PATCH 28/33] Fix sentry --- Plugins/Mineplex.Bungee.Mineplexer/pom.xml | 2 +- .../src/mineplex/bungee/Mineplexer.java | 26 ++++++++++++------- Plugins/pom.xml | 6 +++++ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Plugins/Mineplex.Bungee.Mineplexer/pom.xml b/Plugins/Mineplex.Bungee.Mineplexer/pom.xml index dceb4ba39..b32fcf94a 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/pom.xml +++ b/Plugins/Mineplex.Bungee.Mineplexer/pom.xml @@ -30,7 +30,7 @@ net.kencochrane.raven - raven-log4j2 + raven net.md-5 diff --git a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java index a5d48c5ee..ade10e764 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java +++ b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java @@ -7,21 +7,27 @@ import mineplex.bungee.motd.MotdManager; import mineplex.bungee.playerCount.PlayerCount; import mineplex.bungee.playerStats.PlayerStats; import mineplex.bungee.playerTracker.PlayerTracker; -import mineplex.bungee.status.InternetStatus; -import net.kencochrane.raven.RavenFactory; +import net.kencochrane.raven.DefaultRavenFactory; +import net.kencochrane.raven.dsn.Dsn; import net.kencochrane.raven.jul.SentryHandler; import net.md_5.bungee.api.plugin.Plugin; public class Mineplexer extends Plugin -{ +{ @Override - public void onEnable() - { - // Sentry setup - Handler sentry = new SentryHandler(RavenFactory.ravenInstance("https://470f12378af3453ba089e0c0a0c9aae6:292516b722594784807aebb06db8ec38@app.getsentry.com/66323")); - sentry.setLevel(Level.WARNING); - getProxy().getLogger().addHandler(sentry); - + public void onEnable() { + getProxy().getScheduler().runAsync(this, new Runnable() { + @Override + public void run() { + // Sentry setup + Handler sentry = new SentryHandler(new DefaultRavenFactory().createRavenInstance( + new Dsn("https://470f12378af3453ba089e0c0a0c9aae6:292516b722594784807aebb06db8ec38@app.getsentry.com/66323" + ))); + sentry.setLevel(Level.WARNING); + getProxy().getLogger().addHandler(sentry); + } + }); + new MotdManager(this); new LobbyBalancer(this); PlayerCount playerCount = new PlayerCount(this); diff --git a/Plugins/pom.xml b/Plugins/pom.xml index 60205936c..870b66b55 100644 --- a/Plugins/pom.xml +++ b/Plugins/pom.xml @@ -77,6 +77,12 @@ 1.4.7 compile + + net.kencochrane.raven + raven + 6.0.0 + compile + net.kencochrane.raven raven-log4j2 From 81f9ca0bc285954026299597b2c770eda4df27ac Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 Feb 2016 20:10:01 +1100 Subject: [PATCH 29/33] Fix mysql --- Plugins/Mineplex.ServerData/pom.xml | 5 ++++- Plugins/pom.xml | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.ServerData/pom.xml b/Plugins/Mineplex.ServerData/pom.xml index b89ca0d8f..a745995ee 100644 --- a/Plugins/Mineplex.ServerData/pom.xml +++ b/Plugins/Mineplex.ServerData/pom.xml @@ -16,6 +16,10 @@ com.google.code.gson gson + + mysql + mysql-connector-java + redis.clients jedis @@ -23,7 +27,6 @@ org.apache.commons commons-dbcp2 - 2.0.1 diff --git a/Plugins/pom.xml b/Plugins/pom.xml index 870b66b55..d2bfb0b8c 100644 --- a/Plugins/pom.xml +++ b/Plugins/pom.xml @@ -77,6 +77,12 @@ 1.4.7 compile + + mysql + mysql-connector-java + 5.1.14 + compile + net.kencochrane.raven raven From a84f8dd2d05ea93259b7ffe07b0e279e0056439b Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 19 Feb 2016 20:28:22 +1100 Subject: [PATCH 30/33] Fix dbcp, tone down sentry --- .../src/mineplex/bungee/Mineplexer.java | 2 +- Plugins/Mineplex.ServerData/pom.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java index ade10e764..56e179590 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java +++ b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java @@ -23,7 +23,7 @@ public class Mineplexer extends Plugin Handler sentry = new SentryHandler(new DefaultRavenFactory().createRavenInstance( new Dsn("https://470f12378af3453ba089e0c0a0c9aae6:292516b722594784807aebb06db8ec38@app.getsentry.com/66323" ))); - sentry.setLevel(Level.WARNING); + sentry.setLevel(Level.SEVERE); getProxy().getLogger().addHandler(sentry); } }); diff --git a/Plugins/Mineplex.ServerData/pom.xml b/Plugins/Mineplex.ServerData/pom.xml index a745995ee..40275a893 100644 --- a/Plugins/Mineplex.ServerData/pom.xml +++ b/Plugins/Mineplex.ServerData/pom.xml @@ -20,13 +20,13 @@ mysql mysql-connector-java - - redis.clients - jedis - org.apache.commons commons-dbcp2 + + redis.clients + jedis + From 7032568a9288322f9213ff85d3ee35a63a385e21 Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Fri, 19 Feb 2016 19:33:39 -0600 Subject: [PATCH 31/33] Add PLAYER_STATS DBPool --- .../bungee/playerStats/PlayerStatsRepository.java | 2 +- .../src/mineplex/serverdata/database/DBPool.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerStats/PlayerStatsRepository.java b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerStats/PlayerStatsRepository.java index f46641165..5e8a54c67 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerStats/PlayerStatsRepository.java +++ b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerStats/PlayerStatsRepository.java @@ -32,7 +32,7 @@ public class PlayerStatsRepository extends RepositoryBase public PlayerStatsRepository() { - super(DBPool.getStats()); + super(DBPool.getPlayerStats()); } @Override diff --git a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java index d7c85e11a..2a33e450b 100644 --- a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java @@ -16,6 +16,7 @@ public final class DBPool private static DataSource QUEUE; private static DataSource MINEPLEX; private static DataSource STATS_MINEPLEX; + private static DataSource PLAYER_STATS; private static DataSource openDataSource(String url, String username, String password) { @@ -67,6 +68,14 @@ public final class DBPool return STATS_MINEPLEX; } + public static DataSource getPlayerStats() + { + if (PLAYER_STATS == null) + loadDataSources(); + + return PLAYER_STATS; + } + private static void loadDataSources() { try @@ -115,6 +124,8 @@ public final class DBPool MINEPLEX = openDataSource("jdbc:mysql://" + dbHost, userName, password); else if (dbSource.toUpperCase().equalsIgnoreCase("STATS")) STATS_MINEPLEX = openDataSource("jdbc:mysql://" + dbHost, userName, password); + else if (dbSource.toUpperCase().equalsIgnoreCase("PLAYER_STATS")) + PLAYER_STATS = openDataSource("jdbc:mysql://" + dbHost, userName, password); } } } From 82d51a896fbb36cc3ace21eadedccac4c03eff82 Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Fri, 19 Feb 2016 19:54:06 -0600 Subject: [PATCH 32/33] Add SERVER_STATS to DBPool. Rename STATS to MINEPLEX_STATS --- .../bungee/PlayerStatsRepository.java | 2 +- .../mineplex/cache/player/PlayerCache.java | 11 +++++++++- .../core/antihack/AntiHackRepository.java | 2 +- .../mineplex/serverdata/database/DBPool.java | 20 +++++++++++++------ .../StatusHistoryRepository.java | 2 +- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/PlayerStatsRepository.java b/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/PlayerStatsRepository.java index c664fedb7..009695499 100644 --- a/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/PlayerStatsRepository.java +++ b/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/PlayerStatsRepository.java @@ -14,7 +14,7 @@ public class PlayerStatsRepository extends RepositoryBase public PlayerStatsRepository() { - super(DBPool.getStats()); + super(DBPool.getPlayerStats()); } @Override diff --git a/Plugins/Mineplex.Cache/src/mineplex/cache/player/PlayerCache.java b/Plugins/Mineplex.Cache/src/mineplex/cache/player/PlayerCache.java index 3bfb1bf00..232352662 100644 --- a/Plugins/Mineplex.Cache/src/mineplex/cache/player/PlayerCache.java +++ b/Plugins/Mineplex.Cache/src/mineplex/cache/player/PlayerCache.java @@ -47,7 +47,16 @@ public class PlayerCache { try { - return _repository.getElement(uuid.toString()); + System.out.println("Getting PlayerCache for " + uuid.toString()); + PlayerInfo playerInfo = _repository.getElement(uuid.toString()); + System.out.println("Got playerINfo: " + playerInfo); + if (playerInfo != null) + { + System.out.println("account id: " + playerInfo.getAccountId()); + System.out.println("name: " + playerInfo.getName()); + } + + return playerInfo; } catch (Exception exception) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHackRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHackRepository.java index d80308172..eb3b3cd0c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHackRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/antihack/AntiHackRepository.java @@ -33,7 +33,7 @@ public class AntiHackRepository { PreparedStatement preparedStatement = null; - try (Connection connection = DBPool.getStats().getConnection()) + try (Connection connection = DBPool.getMineplexStats().getConnection()) { preparedStatement = connection.prepareStatement(UPDATE_PLAYER_OFFENSES); diff --git a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java index 2a33e450b..226e45f44 100644 --- a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/database/DBPool.java @@ -15,8 +15,9 @@ public final class DBPool private static DataSource ACCOUNT; private static DataSource QUEUE; private static DataSource MINEPLEX; - private static DataSource STATS_MINEPLEX; + private static DataSource MINEPLEX_STATS; private static DataSource PLAYER_STATS; + private static DataSource SERVER_STATS; private static DataSource openDataSource(String url, String username, String password) { @@ -60,12 +61,12 @@ public final class DBPool return MINEPLEX; } - public static DataSource getStats() + public static DataSource getMineplexStats() { - if (STATS_MINEPLEX == null) + if (MINEPLEX_STATS == null) loadDataSources(); - return STATS_MINEPLEX; + return MINEPLEX_STATS; } public static DataSource getPlayerStats() @@ -76,6 +77,11 @@ public final class DBPool return PLAYER_STATS; } + public static DataSource getServerStats() + { + return SERVER_STATS; + } + private static void loadDataSources() { try @@ -122,10 +128,12 @@ public final class DBPool QUEUE = openDataSource("jdbc:mysql://" + dbHost, userName, password); else if (dbSource.toUpperCase().equalsIgnoreCase("MINEPLEX")) MINEPLEX = openDataSource("jdbc:mysql://" + dbHost, userName, password); - else if (dbSource.toUpperCase().equalsIgnoreCase("STATS")) - STATS_MINEPLEX = openDataSource("jdbc:mysql://" + dbHost, userName, password); + else if (dbSource.toUpperCase().equalsIgnoreCase("MINEPLEX_STATS")) + MINEPLEX_STATS = openDataSource("jdbc:mysql://" + dbHost, userName, password); else if (dbSource.toUpperCase().equalsIgnoreCase("PLAYER_STATS")) PLAYER_STATS = openDataSource("jdbc:mysql://" + dbHost, userName, password); + else if (dbSource.toUpperCase().equalsIgnoreCase("SERVER_STATS")) + SERVER_STATS = openDataSource("jdbc:mysql://" + dbHost, userName, password); } } } diff --git a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/StatusHistoryRepository.java b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/StatusHistoryRepository.java index 8f4566b0f..5fd639283 100644 --- a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/StatusHistoryRepository.java +++ b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/StatusHistoryRepository.java @@ -34,7 +34,7 @@ public class StatusHistoryRepository extends RepositoryBase public StatusHistoryRepository() { - super(DBPool.getStats()); + super(DBPool.getServerStats()); PreparedStatement preparedStatement = null; From b46e1bc37d6c52c1614e0223c492c0e561808fa8 Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Fri, 19 Feb 2016 22:17:23 -0600 Subject: [PATCH 33/33] Create README file --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..dfdf2a767 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Minecraft-PC +Minecraft PC Edition