diff --git a/(OLD) Paik/.classpath b/(OLD) Paik/.classpath new file mode 100644 index 0000000..fe9dbcb --- /dev/null +++ b/(OLD) Paik/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/(OLD) Paik/.project b/(OLD) Paik/.project new file mode 100644 index 0000000..cfac424 --- /dev/null +++ b/(OLD) Paik/.project @@ -0,0 +1,17 @@ + + + Paik + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/(OLD) Paik/.settings/org.eclipse.jdt.core.prefs b/(OLD) Paik/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/(OLD) Paik/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/(OLD) Paik/META-INF/MANIFEST.MF b/(OLD) Paik/META-INF/MANIFEST.MF new file mode 100644 index 0000000..a93d75a --- /dev/null +++ b/(OLD) Paik/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: Paik + diff --git a/(OLD) Paik/bin/META-INF/MANIFEST.MF b/(OLD) Paik/bin/META-INF/MANIFEST.MF new file mode 100644 index 0000000..6f64277 --- /dev/null +++ b/(OLD) Paik/bin/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: secondlife.network.paik.Paik + diff --git a/(OLD) Paik/bin/config.yml b/(OLD) Paik/bin/config.yml new file mode 100644 index 0000000..ea84a0b --- /dev/null +++ b/(OLD) Paik/bin/config.yml @@ -0,0 +1,39 @@ +enabled: true +test-mode: false +autobans: true +checks: + reach: true + autoclicker: true + fastbow: true + killaura: + dead: true + bot: true + packet: true + angle: true + wall: true + regen: true + flyA: true + flyB: true + fasteat: true + groundspoof: true + inventory: + move: true + killaura: true + autopotion: true + noslowdown: + shooting: true + eating: true + sneak: true + speed: true + timer: + standing: true + moving: true + looking: true + crash: true + custompayload: true + pingspoof: true + impossiblepitch: true + autoblock: true + refill: true + morepackets: true + invalidinteract: true \ No newline at end of file diff --git a/(OLD) Paik/bin/plugin.yml b/(OLD) Paik/bin/plugin.yml new file mode 100644 index 0000000..30b939e --- /dev/null +++ b/(OLD) Paik/bin/plugin.yml @@ -0,0 +1,26 @@ +name: Paik +main: secondlife.network.paik.Paik +author: ItsNature +version: 1.0 +depend: [ProtocolLib] + +commands: + autobans: + description: Autobans command + aliases: [enableautobans, disableautobans] + killaura: + description: Killaura command + aliases: [ff, forcefield, ka] + ocmc: + description: OCMC command + logs: + description: Logs command + aliases: [log, aclogs, anticheatlogs] + paik: + description: Paik command + aliases: [ac, anticheat] + paikban: + description: Paik ban command + aliases: [pban, acban, anticheatban] + ping: + description: Ping command \ No newline at end of file diff --git a/(OLD) Paik/src/META-INF/MANIFEST.MF b/(OLD) Paik/src/META-INF/MANIFEST.MF new file mode 100644 index 0000000..6f64277 --- /dev/null +++ b/(OLD) Paik/src/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: secondlife.network.paik.Paik + diff --git a/(OLD) Paik/src/config.yml b/(OLD) Paik/src/config.yml new file mode 100644 index 0000000..ea84a0b --- /dev/null +++ b/(OLD) Paik/src/config.yml @@ -0,0 +1,39 @@ +enabled: true +test-mode: false +autobans: true +checks: + reach: true + autoclicker: true + fastbow: true + killaura: + dead: true + bot: true + packet: true + angle: true + wall: true + regen: true + flyA: true + flyB: true + fasteat: true + groundspoof: true + inventory: + move: true + killaura: true + autopotion: true + noslowdown: + shooting: true + eating: true + sneak: true + speed: true + timer: + standing: true + moving: true + looking: true + crash: true + custompayload: true + pingspoof: true + impossiblepitch: true + autoblock: true + refill: true + morepackets: true + invalidinteract: true \ No newline at end of file diff --git a/(OLD) Paik/src/plugin.yml b/(OLD) Paik/src/plugin.yml new file mode 100644 index 0000000..30b939e --- /dev/null +++ b/(OLD) Paik/src/plugin.yml @@ -0,0 +1,26 @@ +name: Paik +main: secondlife.network.paik.Paik +author: ItsNature +version: 1.0 +depend: [ProtocolLib] + +commands: + autobans: + description: Autobans command + aliases: [enableautobans, disableautobans] + killaura: + description: Killaura command + aliases: [ff, forcefield, ka] + ocmc: + description: OCMC command + logs: + description: Logs command + aliases: [log, aclogs, anticheatlogs] + paik: + description: Paik command + aliases: [ac, anticheat] + paikban: + description: Paik ban command + aliases: [pban, acban, anticheatban] + ping: + description: Ping command \ No newline at end of file diff --git a/(OLD) Paik/src/secondlife/network/paik/Paik.java b/(OLD) Paik/src/secondlife/network/paik/Paik.java new file mode 100644 index 0000000..8981b88 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/Paik.java @@ -0,0 +1,71 @@ +package secondlife.network.paik; + +import com.comphenix.protocol.ProtocolLibrary; +import lombok.Getter; +import org.bukkit.Bukkit; +import org.bukkit.plugin.java.JavaPlugin; +import secondlife.network.paik.checks.combat.AutoClicker; +import secondlife.network.paik.checks.combat.Killaura; +import secondlife.network.paik.checks.movement.Speed; +import secondlife.network.paik.checks.movement.Timer; +import secondlife.network.paik.checks.movement.fly.FlyA; +import secondlife.network.paik.handlers.*; +import secondlife.network.paik.handlers.data.PlayerStatsHandler; +import secondlife.network.paik.handlers.fixes.BookExploitHandler; +import secondlife.network.paik.handlers.fixes.FenceGlitchHandler; +import secondlife.network.paik.utils.DirectoryUtils; +import secondlife.network.paik.utils.PasteUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class Paik extends JavaPlugin { + + @Getter private static Paik instance; + + @Override + public void onEnable() { + instance = this; + + this.registerOther(); + this.registerHandlers(); + this.registerChecks(); + } + + @Override + public void onDisable() { + CheatHandler.clear(); + } + + private void registerOther() { + + new ConfigFile(this); + + Bukkit.getMessenger().registerOutgoingPluginChannel(this, "AutoBan"); + Bukkit.getMessenger().registerOutgoingPluginChannel(this, "Alerts"); + + DirectoryUtils.registerDirectory(); + + PasteUtils.setDeveloperKey("8f3898360d2fe368a723d12839fa8374"); + } + + private void registerChecks() { + new AutoClicker(this); + new Killaura(this); + new FlyA(this); + new Speed(this); + new Timer(this); + } + + private void registerHandlers() { + new PlayerStatsHandler(this); + + new BookExploitHandler(this); + new FenceGlitchHandler(this); + + new AlertsHandler(this); + new CheatHandler(this); + new CommandHandler(this); + new PlayerHandler(this); + + ProtocolLibrary.getProtocolManager().addPacketListener(new PacketHandler(this)); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/combat/AutoBlock.java b/(OLD) Paik/src/secondlife/network/paik/checks/combat/AutoBlock.java new file mode 100644 index 0000000..8bfd0f0 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/combat/AutoBlock.java @@ -0,0 +1,78 @@ +package secondlife.network.paik.checks.combat; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import org.bukkit.inventory.ItemStack; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class AutoBlock { + + public static void handleAutoBlockPlace(Player player, PlayerStats stats) { + if(stats.getAutoblock() > 0) { + stats.setAutoblock(stats.getAutoblock() - 1); + //Message.sendMessage("§cverbose -1 (BLOCK PLACE)"); + } + } + + public static void handleAutoBlockDig(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.autoblock")) { + if (ServerUtils.isServerLagging()) return; + + if(stats.getAutoblock() > 15) { + stats.setAutoblock(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "AutoBlock (Damage)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(System.currentTimeMillis() - stats.getLastUseEntityPacket() < 250) { + ItemStack item = player.getItemInHand(); + + if(item == null) return; + + if(item.getType() == Material.DIAMOND_SWORD + || item.getType() == Material.GOLD_SWORD + || item.getType() == Material.IRON_SWORD + || item.getType() == Material.STONE_SWORD + || item.getType() == Material.WOOD_SWORD) { + stats.setAutoblock(stats.getAutoblock() + 1); + //Message.sendMessage("§averbose +1"); + } + } else { + if(stats.getAutoblock() > 0) { + stats.setAutoblock(stats.getAutoblock() - 1); + //Message.sendMessage("§cverbose -1 (USE ENTITY)"); + } + } + } + } + + public static void handleAutoBlock(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.autoblock")) { + if (ServerUtils.isServerLagging()) return; + + ItemStack item = player.getItemInHand(); + + if(item == null) return; + + if(item.getType() == Material.DIAMOND_SWORD + || item.getType() == Material.GOLD_SWORD + || item.getType() == Material.IRON_SWORD + || item.getType() == Material.STONE_SWORD + || item.getType() == Material.WOOD_SWORD) { + + if (player.isBlocking() && player.isSprinting()) { + if(stats.getAutoblock2() > 50) { + stats.setAutoblock2(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "AutoBlock (Walk)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + } else { + stats.setAutoblock2(0); + } + } + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/combat/AutoClicker.java b/(OLD) Paik/src/secondlife/network/paik/checks/combat/AutoClicker.java new file mode 100644 index 0000000..2540673 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/combat/AutoClicker.java @@ -0,0 +1,158 @@ +package secondlife.network.paik.checks.combat; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.block.Action; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.scheduler.BukkitRunnable; +import secondlife.network.paik.Paik; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.data.PlayerStatsHandler; +import secondlife.network.paik.utils.Handler; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +import java.io.IOException; +import java.text.DecimalFormat; +import java.util.ArrayList; + +public class AutoClicker extends Handler { + + public static ArrayList butterfly; + + public AutoClicker(Paik plugin) { + super(plugin); + + butterfly = new ArrayList(); + + butterfly.add("ghostclienterr"); + + this.getClicks(); + } + + public static void handleAutoClickInteract(Player player, PlayerStats stats, Action action) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.autoclicker")) { + if(ServerUtils.isServerLagging() || action != Action.LEFT_CLICK_AIR) return; + + handleAutoClick(player, stats); + handleConstantCPS(player, stats); + handleDoubleClick(player, stats); + } + } + + public void getClicks() { + new BukkitRunnable() { + public void run() { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if (ServerUtils.isServerLagging()) return; + + for(Player player : Bukkit.getOnlinePlayers()) { + PlayerStats stats = PlayerStatsHandler.getStats(player); + + if(stats != null) { + int cps = stats.getLeftClickCPS(); + + if (cps >= 50 && ConfigFile.configuration.getBoolean("autobans")) { + try { + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "AutoClicker &c[&4" + cps + " &cCPS]", player.getPing(), Bukkit.spigot().getTPS()[0])); + CheatHandler.log(player, "WAS AUTOBANNED FOR HAVING MORE THAN 50 CPS [" + cps + " CPS] ", "AutoClicker", LocationUtils.getLocation(player), player.getPing(), new DecimalFormat("##.##").format(Bukkit.spigot().getTPS()[0])); + } catch (IOException e) { + e.printStackTrace(); + } + CheatHandler.handleBan(player); + } else if (cps >= 30) { + stats.setAutoclickerVL(stats.getAutoclickerVL() + 1); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "AutoClicker &c[&4" + cps + " &cCPS]", player.getPing(), Bukkit.spigot().getTPS()[0])); + } else if (cps >= 27 && butterfly.contains(player.getUniqueId())) { + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "AutoClicker &c[&4" + cps + " &cCPS]", player.getPing(), Bukkit.spigot().getTPS()[0])); + } else if (cps >= 20) { + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "AutoClicker &c[&4" + cps + " &cCPS]", player.getPing(), Bukkit.spigot().getTPS()[0])); + } else if (cps >= 10 && cps < 30) { + stats.setConstantCPS(stats.getConstantCPS() + 1); + + ItemStack item = player.getItemInHand(); + + if(item != null && stats.getLastUseEntityPacket() < 2500) { + if(item.getType() == Material.POTION || item.getType() == Material.ENDER_PEARL || item.getType() == Material.COOKED_BEEF || item.getType() == Material.BAKED_POTATO) { + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "AutoClicker (Item Swing)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + } + } else { + if(stats.getAutoclickerVL() > 0) { + stats.setAutoclickerVL(stats.getAutoclickerVL() - 1); + } + stats.setConstantCPS(0); + } + + stats.setLeftClickCPS(0); + } + } + } + }.runTaskTimer(this.getInstance(), 20L, 20L); + } + + public static void handleDoubleClick(Player player, PlayerStats stats) { + if(stats.getDoubleclick() > 25) { + stats.setDoubleclick(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "DoubleClick", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(stats.getClick1() != 0) { + stats.setClick2(System.currentTimeMillis()); + //Message.sendMessage("set click 2 " + time); + } + + if(stats.getClick1() == 0) { + stats.setClick1(System.currentTimeMillis()); + //Message.sendMessage("set click 1 " + time); + } + + if(stats.getClick1() == 0 || stats.getClick2() == 0) return; + + long difference = (stats.getClick2() - stats.getClick1()); + + if(difference <= 5) { + if(!butterfly.contains(player.getUniqueId()) && player.getPing() < 200) { + stats.setDoubleclick(stats.getDoubleclick() + 1); + } + } else { + stats.setDoubleclick(0); + } + + stats.setClick1(0); + stats.setClick2(0); + } + + public static void handleConstantCPS(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("autobans") && stats.getAutoclickerVL() > 10) { + try { + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "AutoClicker (Constant - 30+)", player.getPing(), Bukkit.spigot().getTPS()[0])); + CheatHandler.log(player, "WAS AUTOBANNED FOR CONSTANT 30+ CPS", "AutoClicker", LocationUtils.getLocation(player), player.getPing(), new DecimalFormat("##.##").format(Bukkit.spigot().getTPS()[0])); + } catch (IOException e) { + e.printStackTrace(); + } + CheatHandler.handleBan(player); + return; + } + + if(stats.getConstantCPS() > 25) { + stats.setConstantCPS(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "AutoClicker (Constant - 10-30)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + } + + public static void handleAutoClick(Player player, PlayerStats stats) { + if(player.getPing() > 350 + || !player.getLocation().getChunk().isLoaded() + || player.isDead() + || System.currentTimeMillis() - stats.getJoined() < 1000 + || System.currentTimeMillis() - stats.getLastBlockBreak() < 500) + return; + + stats.setLeftClickCPS(stats.getLeftClickCPS() + 1); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/combat/FastBow.java b/(OLD) Paik/src/secondlife/network/paik/checks/combat/FastBow.java new file mode 100644 index 0000000..ebfbfab --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/combat/FastBow.java @@ -0,0 +1,52 @@ +package secondlife.network.paik.checks.combat; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class FastBow { + + public static void handleFastBowInteract(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.fastbow")) { + if(ServerUtils.isServerLagging() + || player.getItemInHand() == null + || player.getItemInHand().getType() != Material.BOW + || player.getAllowFlight() + || player.isDead()) return; + + stats.setPull(System.currentTimeMillis()); + } + } + + public static void handleFastBowShoot(Player player, PlayerStats stats, double power) { + if(ServerUtils.isServerLagging() || player.getPing() > 200) return; + + if(stats.getBowVL() > 7) { + stats.setBowVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "FastBow", player.getPing(), Bukkit.spigot().getTPS()[0])); + + if(!ConfigFile.configuration.getBoolean("autobans") || player.hasPermission("secondlife.staff")) return; + + CheatHandler.handleBan(player); + } + + Long time = System.currentTimeMillis() - stats.getPull(); + Long timeLimit = 300L; + + if(power > 2.5 && time < timeLimit) { + stats.setBowVL(stats.getBowVL() + 1); + } else { + if(stats.getBowVL() > 0) { + stats.setBowVL(stats.getBowVL() - 1); + } + } + + stats.setPull(0); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/combat/FastEat.java b/(OLD) Paik/src/secondlife/network/paik/checks/combat/FastEat.java new file mode 100644 index 0000000..083f4c5 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/combat/FastEat.java @@ -0,0 +1,45 @@ +package secondlife.network.paik.checks.combat; + +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class FastEat { + + public static void handleFastEat(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.fasteat")) { + if(ServerUtils.isServerLagging() + || player.isDead() + || player.getVehicle() != null + || player.getAllowFlight() + || player.getGameMode() == GameMode.CREATIVE + || player.getPing() > 350) + return;; + + if(stats.getFastEatVL() > 4) { + stats.setFastEatVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "FastEat", player.getPing(), Bukkit.spigot().getTPS()[0])); + + if(!ConfigFile.configuration.getBoolean("autobans") || player.hasPermission("secondlife.staff")) return; + + CheatHandler.handleBan(player); + } + + if(System.currentTimeMillis() - stats.getLastEat() < 1000) { + stats.setFastEatVL(stats.getFastEatVL() + 1); + } else { + if(stats.getFastEatVL() > 0) { + stats.setFastEatVL(stats.getFastEatVL() - 1); + } + } + + stats.setLastEat(System.currentTimeMillis()); + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/combat/Killaura.java b/(OLD) Paik/src/secondlife/network/paik/checks/combat/Killaura.java new file mode 100644 index 0000000..92a99b3 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/combat/Killaura.java @@ -0,0 +1,195 @@ +package secondlife.network.paik.checks.combat; + +import net.minecraft.server.v1_7_R4.*; +import net.minecraft.util.com.mojang.authlib.GameProfile; +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.craftbukkit.v1_7_R4.CraftServer; +import org.bukkit.craftbukkit.v1_7_R4.CraftWorld; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import org.bukkit.scheduler.BukkitRunnable; +import secondlife.network.paik.Paik; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.CheatUtils; +import secondlife.network.paik.utils.Handler; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +import java.util.UUID; + +public class Killaura extends Handler { + + public static EntityPlayer npc; + + public Killaura(Paik plugin) { + super(plugin); + + npc = new EntityPlayer(((CraftServer) Bukkit.getServer()).getServer(), ((CraftWorld) Bukkit.getWorld("world")).getHandle(), + new GameProfile(UUID.randomUUID(), UUID.randomUUID().toString().substring(0, 14).replace("-", "")), + new PlayerInteractManager(((CraftWorld) Bukkit.getWorld("world")).getHandle())); + npc.viewDistance = 1; + npc.setSprinting(true); + npc.onGround = true; + npc.ping = CheatUtils.random(30, 100); + npc.expLevel = CheatUtils.random(3, 100); + } + + public static void handleKillaura(Player player, PlayerStats stats) { + if(!ConfigFile.configuration.getBoolean("enabled") || ServerUtils.isServerLagging()) return; + + if(ConfigFile.configuration.getBoolean("checks.killaura.packet")) { + handleKillauraPacket(player, stats); + } + + if(ConfigFile.configuration.getBoolean("checks.killaura.dead")) { + handleKillauraDead(player, stats); + } + + if(ConfigFile.configuration.getBoolean("checks.inventory.killaura")) { + handleKillauraInventory(player, stats); + } + + if(ConfigFile.configuration.getBoolean("checks.killaura.bot")) { + handleTeleportBot(player, stats); + } + } + + public static void handleKillauraBotCheck(Player player, int entityID) { + if(entityID == npc.getBukkitEntity().getEntityId()) { + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "KillAura (Bot)", player.getPing(), Bukkit.spigot().getTPS()[0])); + + if(ConfigFile.configuration.getBoolean("autobans") || !player.hasPermission("secondlife.staff")) return; + + CheatHandler.handleBan(player); + } + } + + public static void handleTeleportBot(Player player, PlayerStats stats) { + if(Bukkit.getOnlinePlayers().size() > 100 || player.getPing() > 300 || player.isDead()) return; + + stats.setHits(stats.getHits() + 1); + + if(stats.getHits() > 20) { + stats.setHits(0); + teleportBot(player); + } + } + + public static void handleKillauraPacket(Player player, PlayerStats stats) { + if(player.getPing() > 300) return; + + if(stats.getLastArmPacket() == 0 || stats.getLastUseEntityPacket() == 0) return; + + if(stats.getNoSwingDamageVL() > 3) { + stats.setNoSwingDamageVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "KillAura (Swing)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(stats.getLastUseEntityPacket() - stats.getLastArmPacket() > 500) { + stats.setNoSwingDamageVL(stats.getNoSwingDamageVL() + 1); + } else { + stats.setNoSwingDamageVL(0); + } + } + + public static void handleKillauraDead(Player player, PlayerStats stats) { + if(stats.getHitsWhileDead() > 3) { + stats.setHitsWhileDead(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "KillAura (Dead)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(player.isDead()) { + stats.setHitsWhileDead(stats.getHitsWhileDead() + 1); + } else { + stats.setHitsWhileDead(0); + } + } + + public static void handleKillauraInventory(Player player, PlayerStats stats) { + if(player.getGameMode() != GameMode.SURVIVAL || System.currentTimeMillis() - stats.getJoined() < 1500) return; + + if(stats.getHitsWhileInventoryOpen() > 3) { + stats.setHitsWhileInventoryOpen(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Inventory Killaura", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(!stats.isInventoryOpen()) return; + + stats.setHitsWhileInventoryOpen(stats.getHitsWhileInventoryOpen() + 1); + } + + public static void handleKillauraAngle(Player player, PlayerStats stats, float yaw, float pitch) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.killaura.angle")) { + if(stats.getAngle() > 20) { + stats.setAngle(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Killaura (Angle)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + float diff = Math.abs((stats.getLastYaw() - yaw) + (stats.getLastPitch() - pitch)); + + if(diff < 35) { + if(stats.getAngle() > 0) { + stats.setAngle(stats.getAngle() - 1); + //Message.sendMessage(Color.translate("&cVerbose -1")); + } + } else if(diff >= 35 && diff < 500 && System.currentTimeMillis() - stats.getJoined() > 1500 && System.currentTimeMillis() - stats.getLastUseEntityPacket() < 1000) { + //Message.sendMessage(Color.translate("&aVerbose +1")); + stats.setAngle(stats.getAngle() + 1); + } + + stats.setLastYaw(yaw); + stats.setLastPitch(pitch); + } + } + + public static void handleKillauraWall(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.killaura.wall")) { + if(stats.getSwingAngle() > 7) { + stats.setSwingAngle(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Killaura (Wall)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(stats.getLastEntity() == null || player.hasLineOfSight(stats.getLastEntity())) return; + + Block block = player.getTargetBlock(null, 4); + + if(block == null || block.getType() == Material.AIR || !block.getType().isSolid()) return; + + if(System.currentTimeMillis() - stats.getLastBlockDigPacket() > 1000) { + if(System.currentTimeMillis() - stats.getLastUseEntityPacket() < 100) { + stats.setSwingAngle(stats.getSwingAngle() + 1); + //Message.sendMessage(Color.translate("&aVerbose +1")); + } + } else { + stats.setSwingAngle(0); + //Message.sendMessage(Color.translate("&cVerbose 0")); + } + } + } + + public static void teleportBot(Player player) { + if(player.getLocation().getPitch() < -20.0) return; + + npc.setInvisible(false); + PlayerConnection connection = ((CraftPlayer) player).getHandle().playerConnection; + Location loc = player.getLocation(); + npc.setLocation(loc.getX(), loc.getY() + 4.5, loc.getZ(), loc.getPitch(), loc.getYaw()); + connection.sendPacket(new PacketPlayOutPlayerInfo().addPlayer(npc)); + connection.sendPacket(new PacketPlayOutNamedEntitySpawn((EntityHuman) npc)); + + new BukkitRunnable() { + public void run() { + npc.setInvisible(true); + connection.sendPacket(new PacketPlayOutPlayerInfo().removePlayer(npc)); + connection.sendPacket(new PacketPlayOutEntityDestroy(npc.getBukkitEntity().getEntityId())); + } + }.runTaskLater(Paik.getInstance(), 2L); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/combat/Reach.java b/(OLD) Paik/src/secondlife/network/paik/checks/combat/Reach.java new file mode 100644 index 0000000..d3357f5 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/combat/Reach.java @@ -0,0 +1,77 @@ +package secondlife.network.paik.checks.combat; + +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.CheatUtils; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class Reach { + + public static void handleReachCheck(Player player, PlayerStats stats, int entityID) { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if(!ConfigFile.configuration.getBoolean("checks.reach")) return; + + if(ServerUtils.isServerLagging()) return; + + if(player.isDead() + || player.getVehicle() != null + || player.getAllowFlight() + || player.getGameMode() == GameMode.CREATIVE + || player.getPing() > 300) + return; + + Entity hit = null; + + if(player.getWorld().getEntities().size() > 0) { + for(Entity entity : player.getWorld().getEntities()) { + if(entity.getEntityId() == entityID) { + hit = entity; + } + } + } + + if(hit == null) return; + if(!(hit instanceof Player)) return; + + Player target = (Player) hit; + + if(target.isDead() + || target.getVehicle() != null + || target.getAllowFlight() + || target.getGameMode() == GameMode.CREATIVE + || target.getPing() > 300) + return; + + if(CheatUtils.direction(player) == CheatUtils.direction(target)) return; + + if(stats.getReachVL() > 9) { + stats.setReachVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Reach", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + double reach = CheatUtils.getHorizontalDistance(player.getLocation(), target.getLocation()) - CheatUtils.getYDifference(player.getLocation(), target.getLocation()); + double maxReach = 3.4; + double playerPing = player.getPing(); + double entityPing = target.getPing(); + double deltaXZ = stats.getDelta(); + double entityDeltaXZ = target.getVelocity().length() > 0 ? target.getVelocity().length() : 0; + + maxReach += (playerPing + entityPing) * 0.004; + maxReach += (deltaXZ + entityDeltaXZ) * 0.9; + maxReach += Math.abs(player.getEyeLocation().getYaw() - target.getLocation().getYaw()) * 0.004; + + if(reach > maxReach) { + stats.setReachVL(stats.getReachVL() + 1); + } else { + if(stats.getReachVL() > 0) { + stats.setReachVL(stats.getReachVL() - 1); + } + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/combat/Regen.java b/(OLD) Paik/src/secondlife/network/paik/checks/combat/Regen.java new file mode 100644 index 0000000..ceccd08 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/combat/Regen.java @@ -0,0 +1,40 @@ +package secondlife.network.paik.checks.combat; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import org.bukkit.potion.PotionEffectType; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class Regen { + + public static void handleRegen(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.regen")) { + if(ServerUtils.isServerLagging()) return; + + if(player.getPing() > 250 + || player.hasPotionEffect(PotionEffectType.REGENERATION) + || player.hasPotionEffect(PotionEffectType.HEAL)) + return; + + long now = System.currentTimeMillis(); + + if(stats.getRegenVL() > 2) { + stats.setRegenVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Regen (Normal)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if (now - stats.getLastRegen() < 1000L) { + stats.setRegenVL(stats.getRegenVL() + 1); + } else { + stats.setLastRegen(now); + if(stats.getRegenVL() > 0) { + stats.setRegenVL(stats.getRegenVL() - 1); + } + } + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/movement/GroundSpoof.java b/(OLD) Paik/src/secondlife/network/paik/checks/movement/GroundSpoof.java new file mode 100644 index 0000000..7e08f1c --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/movement/GroundSpoof.java @@ -0,0 +1,47 @@ +package secondlife.network.paik.checks.movement; + +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.events.PlayerMoveByBlockEvent; +import secondlife.network.paik.utils.CheatUtils; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class GroundSpoof { + + public static void handleGroundSpoof(Player player, PlayerStats stats, PlayerMoveByBlockEvent event) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.groundspoof")) { + if(ServerUtils.isServerLagging()) return; + + if(player.getGameMode() == GameMode.CREATIVE + || player.getAllowFlight() + || player.getVehicle() != null + || player.getPing() > 200 + || !player.isOnGround() + || !CheatUtils.isInAir(player) + || CheatUtils.blocksNear(player)) + return; + + Location a = player.getLocation().subtract(0.0D, 1.0D, 0.0D); + + if(CheatUtils.blocksNear(a) || CheatHandler.ignore.containsKey(player.getUniqueId()) && System.currentTimeMillis() < CheatHandler.ignore.get(player.getUniqueId())) return; + + if(stats.getNofallVL() > 10) { + stats.setNofallVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "GroundSpoof", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(player.getFallDistance() == 0.0 && event.getFrom().getY() > event.getTo().getY()) { + stats.setNofallVL(stats.getNofallVL() + 1); + } else { + stats.setNofallVL(0); + } + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/movement/Inventory.java b/(OLD) Paik/src/secondlife/network/paik/checks/movement/Inventory.java new file mode 100644 index 0000000..65195b5 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/movement/Inventory.java @@ -0,0 +1,84 @@ +package secondlife.network.paik.checks.movement; + +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import org.bukkit.scheduler.BukkitRunnable; +import secondlife.network.paik.Paik; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.events.PlayerMoveByBlockEvent; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class Inventory { + + public static void handleInventoryClose(Player player, PlayerStats stats) { + stats.setInventoryOpen(false); + stats.setMovesWhileInventoryClosed(0); + stats.setHitsWhileInventoryOpen(0); + + new BukkitRunnable() { + public void run() { + if(stats.isInventoryOpen()) { + stats.setInventoryOpen(false); + stats.setMovesWhileInventoryClosed(0); + stats.setHitsWhileInventoryOpen(0); + } + } + }.runTaskLaterAsynchronously(Paik.getInstance(), 2L); + } + + public static void handleInventoryMove(Player player, PlayerStats stats, PlayerMoveByBlockEvent event) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.inventory.move")) { + if(player.getPing() > 250 + || player.getAllowFlight() + || player.getGameMode() == GameMode.CREATIVE) + return; + + if(CheatHandler.ignore.containsKey(player.getUniqueId()) && System.currentTimeMillis() < CheatHandler.ignore.get(player.getUniqueId())) return; + + if(System.currentTimeMillis() - stats.getJoined() < 1500) return; + + if(stats.getMovesWhileInventoryClosed() > 10) { + stats.setMovesWhileInventoryClosed(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Inventory Move", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(!stats.isInventoryOpen()) return; + + Location from = event.getFrom().clone(); + Location to = event.getTo().clone(); + + from.setY(0.0D); + to.setY(0.0D); + + Double distance = Double.valueOf(from.distance(to)); + + if(distance.doubleValue() > 0.25) { + stats.setMovesWhileInventoryClosed(stats.getMovesWhileInventoryClosed() + 1); + } + } + } + + public static void handleAutoPotion(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.inventory.autopotion")) { + if(ServerUtils.isServerLagging()) return; + + if(player.getGameMode() != GameMode.SURVIVAL) return; + + if(stats.getPotionsSplashedWhileInventoryOpen() > 1) { + stats.setPotionsSplashedWhileInventoryOpen(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "AutoPotion", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(!stats.isInventoryOpen()) return; + + stats.setPotionsSplashedWhileInventoryOpen(stats.getPotionsSplashedWhileInventoryOpen() + 1); + } + } +} + \ No newline at end of file diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/movement/NoSlowdown.java b/(OLD) Paik/src/secondlife/network/paik/checks/movement/NoSlowdown.java new file mode 100644 index 0000000..0a1d5c4 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/movement/NoSlowdown.java @@ -0,0 +1,59 @@ +package secondlife.network.paik.checks.movement; + +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class NoSlowdown { + + public static void handleNoSlowdownEating(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.noslowdown.eating")) { + if(ServerUtils.isServerLagging() + || player.isDead() + || player.getVehicle() != null + || player.getAllowFlight() + || player.getGameMode() == GameMode.CREATIVE + || player.getPing() > 350) + return; + + if(stats.getNoslowFoodVl() > 2) { + stats.setNoslowFoodVl(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "NoSlowdown (Eating)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(player.isSprinting()) { + stats.setNoslowFoodVl(stats.getNoslowFoodVl() + 1); + } else { + stats.setNoslowFoodVl(0); + } + } + } + + public static void handleNoSlowdownShooting(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.noslowdown.shooting")) { + if(ServerUtils.isServerLagging() + || player.isDead() + || player.getVehicle() != null + || player.getAllowFlight() + || player.getGameMode() == GameMode.CREATIVE + || player.getPing() > 350) + return; + + if(stats.getNoslowBowVl() > 2) { + stats.setNoslowBowVl(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "NoSlowdown (Shooting)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(player.isSprinting()) { + stats.setNoslowBowVl(stats.getNoslowBowVl() + 1); + } else { + stats.setNoslowBowVl(0); + } + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/movement/Sneak.java b/(OLD) Paik/src/secondlife/network/paik/checks/movement/Sneak.java new file mode 100644 index 0000000..cd7f09c --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/movement/Sneak.java @@ -0,0 +1,50 @@ +package secondlife.network.paik.checks.movement; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class Sneak { + + public static void handleSneak(Player player, PlayerStats stats) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.sneak")) { + if(ServerUtils.isServerLagging() + || player.isDead() + || System.currentTimeMillis() - stats.getLastBlockPlace() < 1000 + || System.currentTimeMillis() - stats.getJoined() < 1500) + return; + + if(stats.getSneakVL() > 50) { + stats.setSneakVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Sneak", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(player.isSneaking()) { + if(stats.getSneak1() != 0) { + stats.setSneak2(System.currentTimeMillis()); + } + + if(stats.getSneak1() == 0) { + stats.setSneak1(System.currentTimeMillis()); + } + + if(stats.getSneak1() == 0 || stats.getSneak2() == 0) return; + + long diff = (stats.getSneak2() - stats.getSneak1()); + + if(diff < 150) { + stats.setSneakVL(stats.getSneakVL() + 1); + } else { + stats.setSneakVL(0); + } + + stats.setSneak1(0); + stats.setSneak2(0); + } + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/movement/Speed.java b/(OLD) Paik/src/secondlife/network/paik/checks/movement/Speed.java new file mode 100644 index 0000000..089f3bd --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/movement/Speed.java @@ -0,0 +1,513 @@ +package secondlife.network.paik.checks.movement; + +import net.minecraft.server.v1_7_R4.EntityPlayer; +import net.minecraft.server.v1_7_R4.MobEffectList; +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.Location; +import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import secondlife.network.paik.Paik; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.data.PlayerStatsHandler; +import secondlife.network.paik.handlers.events.PlayerMoveByBlockEvent; +import secondlife.network.paik.utils.CheatUtils; +import secondlife.network.paik.utils.Handler; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +import java.text.DecimalFormat; +import java.util.ArrayList; + +public class Speed extends Handler { + + public static ArrayList speeds; + public static ArrayList speeds1; + public static ArrayList speeds2; + public static ArrayList speeds3; + public static ArrayList speeds4; + public static ArrayList speeds5; + + public Speed(Paik plugin) { + super(plugin); + + speeds = new ArrayList(); + speeds1 = new ArrayList(); + speeds2 = new ArrayList(); + speeds3 = new ArrayList(); + speeds4 = new ArrayList(); + speeds5 = new ArrayList(); + + // ARTIX - MINEMEN + speeds.add(0.5274); + speeds1.add(0.5529); + speeds2.add(0.5783); + speeds3.add(0.6038); + speeds4.add(0.6293); + speeds5.add(0.6548); + + // ARTIX - SLOWHOP + speeds.add(0.2870); + speeds1.add(0.3444); + } + + public static void handleSpeed(Player player, PlayerStats stats, PlayerMoveByBlockEvent event) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.speed")) { + if(ServerUtils.isServerLagging()) { + if(!CheatHandler.ignore.isEmpty()) { + CheatHandler.ignore.clear(); + } + if(!CheatHandler.ignoreJump.isEmpty()) { + CheatHandler.ignoreJump.clear(); + } + return; + } + + if(player.getWalkSpeed() != 0.2F + || player.getGameMode() == GameMode.CREATIVE + || player.getAllowFlight() + || player.getVehicle() != null + || CheatUtils.isUnderBlock(player) + || CheatUtils.isInLiquid(player) + || CheatUtils.isOnHalfBlocks(player) + || !CheatUtils.isOnSolidBlock(player) + || !CheatUtils.isOnSolidBlocks(player) + || CheatUtils.isOnSnow(player) + || CheatUtils.isInAir(player)) + return; + + if(CheatHandler.ignore.containsKey(player.getUniqueId()) && System.currentTimeMillis() < CheatHandler.ignore.get(player.getUniqueId())) return; + + if(CheatUtils.isOnIce(player)) { + CheatHandler.ignore.put(player.getUniqueId(), System.currentTimeMillis() + 1000); + return; + } + + for(PotionEffect potionEffect : player.getActivePotionEffects()) { + if((potionEffect.getType().equals(PotionEffectType.SPEED)) && (potionEffect.getAmplifier() >= 5)) return; + } + + Location from = event.getFrom().clone(); + Location to = event.getTo().clone(); + + if(to.getX() == from.getX() || to.getZ() == from.getZ()) return; + + from.setY(0); + to.setY(0); + + Double distance = Double.valueOf(from.distance(to)); + + if(stats.getSpeedFast() > 1) { + stats.setSpeedFast(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Speed (Fast)", player.getPing(), Bukkit.spigot().getTPS()[0])); + return; + } + + if(distance > 4.25) { + stats.setSpeedFast(stats.getSpeedFast() + 1); + return; + } + + if(player.getPing() > 200) { + removeJumpOne(player); + removeOne(player); + return; + } + + DecimalFormat dc = new DecimalFormat("#.####"); + + /*if(player.isOnGround()) { + Message.sendMessage("�c" + player.getName() + " GROUND " + String.valueOf(dc.format(distance))); + } else { + Message.sendMessage("�a" + player.getName() + " AIR " + String.valueOf(dc.format(distance))); + }*/ + + if(stats.getSpeedJumpVL() > 20) { + stats.setSpeedJumpVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Speed (Ground)", player.getPing(), Bukkit.spigot().getTPS()[0])); + return; + } + + if(stats.getSpeedVL() > 10) { + stats.setSpeedVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Speed (Hop / Air)", player.getPing(), Bukkit.spigot().getTPS()[0])); + return; + } + + if(stats.getSpeedOtherVL() > 10) { + stats.setSpeedOtherVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Speed (Hop / Air)", player.getPing(), Bukkit.spigot().getTPS()[0])); + return; + } + + if(stats.getSpeedSlowhopVL() > 10) { + stats.setSpeedSlowhopVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Speed (Slow / Packet)", player.getPing(), Bukkit.spigot().getTPS()[0])); + return; + } + + /*if(stats.getSpritingandblockingVL() > 5) { + stats.setSpritingandblockingVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Speed (AutoBlock)", player.getPing(), Bukkit.spigot().getTPS()[0])); + return; + }*/ + + if(player.isSprinting()) { + if(player.getFoodLevel() <= 5) { + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Speed (Fake Sprint)", player.getPing(), Bukkit.spigot().getTPS()[0])); + return; + } + /*if(player.isBlocking()) { + stats.setSpritingandblockingVL(stats.getSpritingandblockingVL() + 1); + return; + } else { + if(stats.getSpritingandblockingVL() > 0) { + stats.setSpritingandblockingVL(stats.getSpritingandblockingVL() - 1); + } + }*/ + } + + /*if(stats.getSpeedSneak() > 10) { + stats.setSpeedSneak(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Speed (Sneak)", player.getPing(), Bukkit.spigot().getTPS()[0])); + return; + }*/ + + if(player.isOnGround() && from.getY() == to.getY()) { + if((!CheatHandler.ignoreJump.containsKey(player.getUniqueId())) || (CheatHandler.ignoreJump.containsKey(player.getUniqueId()) && System.currentTimeMillis() > CheatHandler.ignoreJump.get(player.getUniqueId()))) { + if(isGroundSpeeding(player, distance)) { + stats.setSpeedJumpVL(stats.getSpeedJumpVL() + 1); + return; + } + } + } + + /*if(player.isSneaking()) { + if(this.isSneakSpeeding(player, distance)) { + stats.setSpeedSneak(stats.getSpeedSneak() + 1); + return; + } + } else { + stats.setSpeedSneak(0); + }*/ + + if(!player.isOnGround() && isAirSpeeding(player, distance)) { + stats.setSpeedVL(stats.getSpeedVL() + 1); + return; + } + + if(player.isOnGround() && isOtherSpeeding(player, distance)) { + stats.setSpeedOtherVL(stats.getSpeedOtherVL() + 1); + return; + } + + if(isBypassingSpeeding(player, distance) || isSlowHopSpeeding(player, distance)) { + stats.setSpeedSlowhopVL(stats.getSpeedSlowhopVL() + 1); + return; + } + } + } + + public static void removeOne(Player player) { + PlayerStats stats = PlayerStatsHandler.getStats(player); + + if(stats.getSpeedVL() > 0) { + stats.setSpeedVL(stats.getSpeedVL() - 1); + } + + if(stats.getSpeedOtherVL() > 0) { + stats.setSpeedOtherVL(stats.getSpeedOtherVL() - 1); + } + + if(stats.getSpeedSlowhopVL() > 0) { + stats.setSpeedSlowhopVL(stats.getSpeedSlowhopVL() - 1); + } + + /*if(stats.getSpeedSneak() > 0) { + stats.setSpeedSneak(stats.getSpeedSneak() - 1); + }*/ + } + + public static void removeJumpOne(Player player) { + PlayerStats stats = PlayerStatsHandler.getStats(player); + + stats.setSpeedJumpVL(0); + } + + public static boolean isGroundSpeeding(Player player, double distance) { + EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle(); + boolean hasSpeed = mcPlayer.hasEffect(MobEffectList.FASTER_MOVEMENT); + + double limit = 10; + + if(hasSpeed) { + //Message.sendMessage(String.valueOf(player.getName() + " " + mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier())); + switch(mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier()) { + case 0: + limit = 0.3467; + break; + case 1: + limit = 0.4029; + break; + case 2: + limit = 0.4590; + break; + case 3: + limit = 0.5151; + break; + case 4: + limit = 0.5712; + break; + } + } else { + limit = 0.2906; + } + + if(distance > limit) { + return true; + } + + return false; + } + + public static boolean isBypassingSpeeding(Player player, double distance) { + double limit = 10; + double limit2 = 10; + + DecimalFormat dc = new DecimalFormat("#.####"); + + Double moved = Double.valueOf(dc.format(distance).replaceAll(",", ".")); + + EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle(); + boolean hasSpeed = mcPlayer.hasEffect(MobEffectList.FASTER_MOVEMENT); + + if(hasSpeed) { + //Message.sendMessage(String.valueOf(player.getName() + " " + mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier())); + switch(mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier()) { + case 0: + if(speeds1.contains(moved)) { + limit = (speeds1.get((int) moved.doubleValue()) - 0.0001); + limit2 = (speeds1.get((int) moved.doubleValue()) + 0.0001); + } + break; + case 1: + if(speeds2.contains(moved)) { + limit = (speeds2.get((int) moved.doubleValue()) - 0.0001); + limit2 = (speeds2.get((int) moved.doubleValue()) + 0.0001); + } + break; + case 2: + if(speeds3.contains(moved)) { + limit = (speeds3.get((int) moved.doubleValue()) - 0.0001); + limit2 = (speeds3.get((int) moved.doubleValue()) + 0.0001); + } + break; + case 3: + if(speeds4.contains(moved)) { + limit = (speeds4.get((int) moved.doubleValue()) - 0.0001); + limit2 = (speeds4.get((int) moved.doubleValue()) + 0.0001); + } + break; + case 4: + if(speeds5.contains(moved)) { + limit = (speeds5.get((int) moved.doubleValue()) - 0.0001); + limit2 = (speeds5.get((int) moved.doubleValue()) + 0.0001); + } + break; + } + } else { + if(speeds.contains(moved)) { + limit = (speeds.get((int) moved.doubleValue()) - 0.0001); + limit2 = (speeds.get((int) moved.doubleValue()) + 0.0001); + } + } + + if((distance > limit) && (distance < limit2)) { + return true; + } + + return false; + } + + /*public boolean isSneakSpeeding(Player player, double distance) { + double limit = 10; + + EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle(); + boolean hasSpeed = mcPlayer.hasEffect(MobEffectList.FASTER_MOVEMENT); + + if(hasSpeed) { + //Message.sendMessage(String.valueOf(player.getName() + " " + mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier())); + switch(mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier()) { + case 0: + limit = 0.0877; + break; + case 1: + limit = 0.1007; + break; + case 2: + limit = 0.1036; + break; + case 3: + limit = 0.1266; + break; + case 4: + limit = 0.1395; + break; + } + } else { + limit = 0.0748; + } + + if(distance > limit) { + return true; + } + + return false; + }*/ + + + public static boolean isAirSpeeding(Player player, double distance) { + double limit = 10; + + EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle(); + boolean hasSpeed = mcPlayer.hasEffect(MobEffectList.FASTER_MOVEMENT); + + if(hasSpeed) { + //Message.sendMessage(String.valueOf(player.getName() + " " + mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier())); + switch(mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier()) { + case 0: + limit = 0.3869; + break; + case 1: + limit = 0.4042; + break; + case 2: + limit = 0.4215; + break; + case 3: + limit = 0.4387; + break; + case 4: + limit = 0.4513; + break; + } + } else { + limit = 0.3696; + } + + if(distance > limit) { + return true; + } + + return false; + } + + public static boolean isOtherSpeeding(Player player, double distance) { + double limit = 10; + + EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle(); + boolean hasSpeed = mcPlayer.hasEffect(MobEffectList.FASTER_MOVEMENT); + + if(hasSpeed) { + //Message.sendMessage(String.valueOf(player.getName() + " " + mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier())); + switch(mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier()) { + case 0: + limit = 0.6538; + break; + case 1: + limit = 0.6854; + break; + case 2: + limit = 0.7170; + break; + case 3: + limit = 0.7485; + break; + case 4: + limit = 0.7801; + break; + } + } else { + limit = 0.6222; + } + + if(distance > limit) { + return true; + } + + return false; + } + + public static boolean isSlowHopSpeeding(Player player, double distance) { + double limit = 10; + double limit2 = 10; + + EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle(); + boolean hasSpeed = mcPlayer.hasEffect(MobEffectList.FASTER_MOVEMENT); + + if(hasSpeed) { + //Message.sendMessage(String.valueOf(player.getName() + " " + mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier())); + switch(mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier()) { + case 0: + limit = 0.3443; + limit2 = 0.3445; + break; + } + } else { + limit = 0.2869; + limit2 = 0.2871; + } + + if((distance > limit) && (distance < limit2)) { + return true; + } + + return false; + } + + /*public boolean isMinemenSpeeding(Player player, double distance) { + double limit = 10; + double limit2 = 10; + + if(player.hasPotionEffect(PotionEffectType.SPEED)) { + for(PotionEffect potionEffect : player.getActivePotionEffects()) { + switch(potionEffect.getAmplifier()) { + case 0: + limit = 0.5528; + limit2 = 0.5530; + break; + case 1: + limit = 0.5782; + limit2 = 0.5784; + break; + case 2: + limit = 0.6037; + limit2 = 0.6039; + break; + case 3: + limit = 0.6292; + limit2 = 0.6294; + break; + case 4: + limit = 0.6547; + limit2 = 0.6549; + break; + } + } + } else { + limit = 0.5273; + limit2 = 0.5275; + } + + if((distance > limit) && (distance < limit2)) { + return true; + } + + return false; + }*/ +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/movement/Timer.java b/(OLD) Paik/src/secondlife/network/paik/checks/movement/Timer.java new file mode 100644 index 0000000..902fde7 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/movement/Timer.java @@ -0,0 +1,176 @@ +package secondlife.network.paik.checks.movement; + +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import org.bukkit.scheduler.BukkitRunnable; +import secondlife.network.paik.Paik; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.data.PlayerStatsHandler; +import secondlife.network.paik.utils.Handler; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class Timer extends Handler { + + public Timer(Paik plugin) { + super(plugin); + + this.getPackets(); + } + + public static void handleTimerFlying(Player player, PlayerStats stats) { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if(!ConfigFile.configuration.getBoolean("checks.timer.standing")) return; + + if(ServerUtils.isServerLagging()) return; + + if(CheatHandler.ignore.containsKey(player.getUniqueId()) && System.currentTimeMillis() < CheatHandler.ignore.get(player.getUniqueId())) return; + + if(player.getPing() > 175 + || player.getAllowFlight() + || player.getGameMode() == GameMode.CREATIVE) + return; + + if(System.currentTimeMillis() - stats.getJoined() < 1500) return; + + stats.setFlyingPackets(stats.getFlyingPackets() + 1); + } + + public static void handleTimerPosition(Player player, PlayerStats stats) { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if(!ConfigFile.configuration.getBoolean("checks.timer.moving")) return; + + if(ServerUtils.isServerLagging()) return; + + if(player.getPing() > 250 + || player.getAllowFlight() + || player.getGameMode() == GameMode.CREATIVE) + return; + + if(CheatHandler.ignore.containsKey(player.getUniqueId()) && System.currentTimeMillis() < CheatHandler.ignore.get(player.getUniqueId())) return; + + if(System.currentTimeMillis() - stats.getJoined() < 1500) return; + + stats.setPositionPackets(stats.getPositionPackets() + 1); + } + + public static void handleTimerPositionLook(Player player, PlayerStats stats) { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if(!ConfigFile.configuration.getBoolean("checks.timer.looking")) return; + + if(ServerUtils.isServerLagging()) return; + + if(player.getPing() > 250 + || player.getAllowFlight() + || player.getGameMode() == GameMode.CREATIVE) + return; + + if(CheatHandler.ignore.containsKey(player.getUniqueId()) && System.currentTimeMillis() < CheatHandler.ignore.get(player.getUniqueId())) return; + + if(System.currentTimeMillis() - stats.getJoined() < 1500) return; + + stats.setPositionLookPackets(stats.getPositionLookPackets() + 1); + } + + public void getPackets() { + new BukkitRunnable() { + public void run() { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if (ServerUtils.isServerLagging()) return; + + for (Player player : Bukkit.getOnlinePlayers()) { + PlayerStats stats = PlayerStatsHandler.getStats(player); + + if (stats != null) { + // FLYING PACKET + if(ConfigFile.configuration.getBoolean("checks.timer.standing")) { + int packets = stats.getFlyingPackets(); + + if(stats.getTimerAVL() > 20) { + stats.setTimerAVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Timer (Standing)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(packets > 23) { + stats.setTimerAVL(stats.getTimerAVL() + 6); + //Message.sendMessage(Color.translate("&aVerbose: +6")); + } else if(packets > 19 && packets <= 23) { + stats.setTimerAVL(stats.getTimerAVL() + 3); + //Message.sendMessage(Color.translate("&aVerbose: +3")); + } else if(packets <= 19){ + if(stats.getTimerAVL() > 0) { + stats.setTimerAVL(stats.getTimerAVL() - 1); + //Message.sendMessage(Color.translate("&cVerbose: -1")); + } + } + + stats.setFlyingPackets(0); + } + + // POSITION PACKET + if(ConfigFile.configuration.getBoolean("checks.timer.moving")) { + int packets = stats.getPositionPackets(); + + if(stats.getTimerBVL() > 20) { + stats.setTimerBVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Timer (Moving)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(packets > 24) { + stats.setTimerBVL(stats.getTimerBVL() + 6); + //Message.sendMessage(Color.translate("&aVerbose: +6")); + } else if(packets > 21 && packets <= 24) { + stats.setTimerBVL(stats.getTimerBVL() + 3); + //Message.sendMessage(Color.translate("&aVerbose: +3")); + } else if(packets <= 21){ + if(stats.getTimerBVL() > 0) { + stats.setTimerBVL(stats.getTimerBVL() - 1); + //Message.sendMessage(Color.translate("&cVerbose: -1")); + } + } + + stats.setPositionPackets(0); + } + + // POSITION LOOK & LOOK PACKET + if(ConfigFile.configuration.getBoolean("checks.timer.looking")) { + int packets = stats.getPositionLookPackets(); + + if(stats.getTimerCVL() > 20) { + stats.setTimerCVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Timer (Moving & Looking)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(packets > 24) { + stats.setTimerCVL(stats.getTimerCVL() + 6); + //Message.sendMessage(Color.translate("&aVerbose: +6")); + } else if(packets > 21 && packets <= 24) { + stats.setTimerCVL(stats.getTimerCVL() + 3); + //Message.sendMessage(Color.translate("&aVerbose: +3")); + } else if(packets <= 21){ + if(stats.getTimerCVL() > 0) { + stats.setTimerCVL(stats.getTimerCVL() - 1); + //Message.sendMessage(Color.translate("&cVerbose: -1")); + } + } + + stats.setPositionLookPackets(0); + } + + if(ConfigFile.configuration.getBoolean("checks.morepackets")) { + if(stats.getMorePackets() > 50 && System.currentTimeMillis() - stats.getJoined() > 1500) { + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "MorePackets (Position)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + stats.setMorePackets(0); + } + } + } + } + }.runTaskTimer(this.getInstance(), 20L, 20L); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/movement/fly/FlyA.java b/(OLD) Paik/src/secondlife/network/paik/checks/movement/fly/FlyA.java new file mode 100644 index 0000000..d62736e --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/movement/fly/FlyA.java @@ -0,0 +1,135 @@ +package secondlife.network.paik.checks.movement.fly; + +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import secondlife.network.paik.Paik; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.data.PlayerStatsHandler; +import secondlife.network.paik.handlers.events.PlayerMoveByBlockEvent; +import secondlife.network.paik.utils.CheatUtils; +import secondlife.network.paik.utils.Handler; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +import java.util.AbstractMap; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +public class FlyA extends Handler { + + public static Map> upTicks; + public static Map onGround; + + public FlyA(Paik plugin) { + super(plugin); + + upTicks = new HashMap>(); + onGround = new HashMap(); + } + + public static void handleFly(Player player, PlayerStats stats, PlayerMoveByBlockEvent event) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.flyA")) { + if(ServerUtils.isServerLagging()) { + if(!CheatHandler.ignore.isEmpty()) { + CheatHandler.ignore.clear(); + } + if(!upTicks.isEmpty()) { + upTicks.clear(); + } + if(!onGround.isEmpty()) { + onGround.clear(); + } + return; + } + + if(player.getPing() > 200 + || player.getAllowFlight() + || player.getVehicle() != null + || player.isOnGround()) + return; + + if(CheatHandler.ignore.containsKey(player.getUniqueId()) && System.currentTimeMillis() < CheatHandler.ignore.get(player.getUniqueId())) return; + + Location from = event.getFrom().clone(); + Location to = event.getTo().clone(); + + from.setX(0.0D); + from.setZ(0.0D); + to.setX(0.0D); + to.setZ(0.0D); + + long timeMillis = System.currentTimeMillis(); + double blocks = 0.0D; + + if (upTicks.containsKey(player.getUniqueId())) { + timeMillis = upTicks.get(player.getUniqueId()).getKey().longValue(); + blocks = upTicks.get(player.getUniqueId()).getValue().doubleValue(); + } + + long timeDifference = System.currentTimeMillis() - timeMillis; + double distance = from.toVector().subtract(to.toVector()).length(); + + if (distance > 0.0D) { + blocks += distance; + } + + if (CheatUtils.blocksNear(player)) { + blocks = 0.0D; + } + + Location a = player.getLocation().subtract(0.0D, 1.0D, 0.0D); + + if (CheatUtils.blocksNear(a)) { + blocks = 0.0D; + } + + double trigger = 0.5D; + + if (player.hasPotionEffect(PotionEffectType.JUMP)) { + for (PotionEffect effect : player.getActivePotionEffects()) { + if (effect.getType().equals(PotionEffectType.JUMP)) { + int level = effect.getAmplifier() + 1; + trigger += Math.pow(level + 4.2D, 2.0D) / 16.0D; + break; + } + } + } + + if (blocks > trigger) { + if (timeDifference > 125L) { + addOne(player); + + if(stats.getFlyAVL() > 3) { + stats.setFlyAVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Fly A", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + timeMillis = System.currentTimeMillis(); + } + } else { + timeMillis = System.currentTimeMillis(); + } + upTicks.put(player.getUniqueId(), new AbstractMap.SimpleEntry(Long.valueOf(timeMillis), Double.valueOf(blocks))); + } + } + + public static void addOne(Player player) { + PlayerStats stats = PlayerStatsHandler.getStats(player); + + stats.setFlyAVL(stats.getFlyAVL() + 1); + } + + public static void removeOne(Player player) { + PlayerStats stats = PlayerStatsHandler.getStats(player); + + if(stats.getFlyAVL() > 0) { + stats.setFlyAVL(stats.getFlyAVL() - 1); + } + } +} \ No newline at end of file diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/movement/fly/FlyB.java b/(OLD) Paik/src/secondlife/network/paik/checks/movement/fly/FlyB.java new file mode 100644 index 0000000..24afc7c --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/movement/fly/FlyB.java @@ -0,0 +1,61 @@ +package secondlife.network.paik.checks.movement.fly; + +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.data.PlayerStatsHandler; +import secondlife.network.paik.handlers.events.PlayerMoveByBlockEvent; +import secondlife.network.paik.utils.CheatUtils; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class FlyB { + + public static void handleFly(Player player, PlayerStats stats, PlayerMoveByBlockEvent event) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.flyB")) { + if(ServerUtils.isServerLagging()) { + if(!CheatHandler.ignore.isEmpty()) { + CheatHandler.ignore.clear(); + } + return; + } + + if(player.getAllowFlight() + || player.getVehicle() != null + || !CheatUtils.isInAir(player) + || CheatUtils.blocksNear(player)) + return; + + if(CheatHandler.ignore.containsKey(player.getUniqueId()) && System.currentTimeMillis() < CheatHandler.ignore.get(player.getUniqueId())) return; + + Location from = event.getFrom().clone(); + Location to = event.getTo().clone(); + + if(from.getY() == to.getY() && from.getX() != to.getX() && from.getZ() != to.getZ()) { + + if(player.getPing() > 250) { + stats.setFlyBVL(stats.getFlyBVL() + 1); + } else { + stats.setFlyBVL(stats.getFlyBVL() + 3); + } + + if(stats.getFlyBVL() > 15) { + stats.setFlyBVL(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Fly B", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + } + } + } + + public static void removeOne(Player player) { + PlayerStats stats = PlayerStatsHandler.getStats(player); + + if(stats.getFlyBVL() > 0) { + stats.setFlyBVL(stats.getFlyBVL() - 1); + } + } +} \ No newline at end of file diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/other/Crash.java b/(OLD) Paik/src/secondlife/network/paik/checks/other/Crash.java new file mode 100644 index 0000000..fd50dd5 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/other/Crash.java @@ -0,0 +1,48 @@ +package secondlife.network.paik.checks.other; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class Crash { + + public static void handleBlockPlaceCrash(Player player, PlayerStats stats) { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if(!ConfigFile.configuration.getBoolean("checks.crash")) return; + + if(stats.getBoxer2() > 500) { + stats.setBoxer2(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Crash (Place)", player.getPing(), Bukkit.spigot().getTPS()[0])); + CheatHandler.handleBan(player); + } + + if(System.currentTimeMillis() - stats.getLastBlockPacket() > 100) { + stats.setBoxer2(0); + } + + stats.setBoxer2(stats.getBoxer2() + 1); + stats.setLastBlockPacket(System.currentTimeMillis()); + } + + public static void handleAnimationCrash(Player player, PlayerStats stats) { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if(!ConfigFile.configuration.getBoolean("checks.crash")) return; + + if(stats.getBoxer1() > 500) { + stats.setBoxer1(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Crash (Animation)", player.getPing(), Bukkit.spigot().getTPS()[0])); + CheatHandler.handleBan(player); + } + + if(System.currentTimeMillis() - stats.getLastArmPacket() > 50) { + stats.setBoxer1(0); + } + + stats.setBoxer1(stats.getBoxer1() + 1); + stats.setLastArmPacket(System.currentTimeMillis()); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/other/CustomPayload.java b/(OLD) Paik/src/secondlife/network/paik/checks/other/CustomPayload.java new file mode 100644 index 0000000..66e5462 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/other/CustomPayload.java @@ -0,0 +1,56 @@ +package secondlife.network.paik.checks.other; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +import java.io.IOException; + +public class CustomPayload { + + public static void handleCustomPayload(Player player, PlayerStats stats, String message) { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if(!ConfigFile.configuration.getBoolean("checks.custompayload")) return; + + if(message.equalsIgnoreCase("LOLIMAHCKER") + || message.equalsIgnoreCase("mincraftpvphcker") + || message.equalsIgnoreCase("cock") + || message.equalsIgnoreCase("0SO1Lk2KASxzsd") + || message.equalsIgnoreCase("MCnetHandler") + || message.equalsIgnoreCase("customGuiOpenBspkrs") + || message.equalsIgnoreCase("n") // "PRIVATE" client lmao + || message.equalsIgnoreCase("lmaohax") + || message.equalsIgnoreCase("0SSxzsd")) { + + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "CrackedClient", player.getPing(), Bukkit.spigot().getTPS()[0])); + CheatHandler.handleBan(player); + return; + } + + if(message.equalsIgnoreCase("OCMC")) { + stats.setOcmc(true); + } + + if(message.startsWith("MC|") + || message.equals("REGISTER") + || message.equals("WECUI") + || message.equals("skinport") + || message.equals("WDL|INIT") + || message.equals("MorePlayerModels") + || message.equals("advancedcapes") + || message.equals("PERMISSIONSREPL") + || message.equals("world_info") + || message.equals("OCMC")) + return; + + try { + CheatHandler.logPayload(player, String.valueOf(message)); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/other/ImpossiblePitch.java b/(OLD) Paik/src/secondlife/network/paik/checks/other/ImpossiblePitch.java new file mode 100644 index 0000000..3ef5767 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/other/ImpossiblePitch.java @@ -0,0 +1,25 @@ +package secondlife.network.paik.checks.other; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class ImpossiblePitch { + + public static void handleImpossiblePitch(Player player, PlayerStats stats, float pitch) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.impossiblepitch")) { + if(Math.abs(pitch) > 90.1 && System.currentTimeMillis() - stats.getJoined() > 1500 && !ServerUtils.isServerLagging()) { + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "ImpossiblePitch", player.getPing(), Bukkit.spigot().getTPS()[0])); + + if(!ConfigFile.configuration.getBoolean("autobans") || player.hasPermission("secondlife.staff")) return; + + CheatHandler.handleBan(player); + } + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/other/InvalidInteract.java b/(OLD) Paik/src/secondlife/network/paik/checks/other/InvalidInteract.java new file mode 100644 index 0000000..2a9c20d --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/other/InvalidInteract.java @@ -0,0 +1,35 @@ +package secondlife.network.paik.checks.other; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.entity.Player; +import org.bukkit.event.block.Action; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class InvalidInteract { + + public static void handleInvalidInteract(Player player, PlayerStats stats, Action action) { + if(ConfigFile.configuration.getBoolean("enabled") && ConfigFile.configuration.getBoolean("checks.invalidinteract")) { + if (ServerUtils.isServerLagging()) return; + + if (stats.getInvalidInteract() > 50) { + stats.setInvalidInteract(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "InvalidInteract", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if (action == Action.LEFT_CLICK_BLOCK || action == Action.RIGHT_CLICK_BLOCK) { + Block block = player.getTargetBlock(null, 6); + if (System.currentTimeMillis() - stats.getJoined() > 1500 && block != null && block.getType() == Material.AIR) { + stats.setInvalidInteract(stats.getInvalidInteract() + 1); + } else { + stats.setInvalidInteract(0); + } + } + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/other/Nametags.java b/(OLD) Paik/src/secondlife/network/paik/checks/other/Nametags.java new file mode 100644 index 0000000..708fa5f --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/other/Nametags.java @@ -0,0 +1,36 @@ +package secondlife.network.paik.checks.other; + +import com.comphenix.protocol.events.PacketContainer; +import com.comphenix.protocol.events.PacketEvent; +import com.comphenix.protocol.wrappers.WrappedDataWatcher; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import secondlife.network.paik.utils.CheatUtils; + +public class Nametags { + + public static void handleHealthRandomizer(Player player, PacketEvent event) { + PacketContainer packet = event.getPacket(); + Entity entity = packet.getEntityModifier(event).read(0); + + if(entity instanceof LivingEntity + && entity.getType() == EntityType.PLAYER + && packet.getWatchableCollectionModifier().read(0) != null + && entity.getUniqueId() != player.getUniqueId()) { + packet = packet.deepClone(); + event.setPacket(packet); + + WrappedDataWatcher watcher = new WrappedDataWatcher(packet.getWatchableCollectionModifier().read(0)); + + if(watcher != null && watcher.getObject(6) != null && watcher.getFloat(6) != 0.0F) { + float hp = CheatUtils.random(1, 10); + + watcher.setObject(6, hp); + } + + packet.getWatchableCollectionModifier().write(0, watcher.getWatchableObjects()); + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/other/PingSpoof.java b/(OLD) Paik/src/secondlife/network/paik/checks/other/PingSpoof.java new file mode 100644 index 0000000..7d155d4 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/other/PingSpoof.java @@ -0,0 +1,40 @@ +package secondlife.network.paik.checks.other; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class PingSpoof { + + public static void handlePingSpoof(Player player, PlayerStats stats) { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if(!ConfigFile.configuration.getBoolean("checks.pingspoof")) return; + + if (ServerUtils.isServerLagging()) return; + + int ping = player.getPing(); + + int diff = Math.abs(ping - stats.getLastPing()); + + if(player.getPing() > 200 && stats.getPingSpoof() > 10) { + stats.setPingSpoof(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "PingSpoof", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(player.getPing() > 200 && diff > 0 && diff < 11) { + stats.setPingSpoof(stats.getPingSpoof() + 1); + } else if(player.getPing() > 200 && diff == 0) { + stats.setPingSpoof(stats.getPingSpoof() + 2); + } else { + if(stats.getPingSpoof() > 1) { + stats.setPingSpoof(stats.getPingSpoof() - 2); + } + } + + stats.setLastPing(ping); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/checks/other/Refill.java b/(OLD) Paik/src/secondlife/network/paik/checks/other/Refill.java new file mode 100644 index 0000000..badd0bc --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/checks/other/Refill.java @@ -0,0 +1,74 @@ +package secondlife.network.paik.checks.other; + +import com.comphenix.protocol.events.PacketEvent; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import org.bukkit.inventory.ItemStack; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.utils.LocationUtils; +import secondlife.network.paik.utils.ServerUtils; +import secondlife.network.paik.utils.file.ConfigFile; + +public class Refill { + + public static void handleRefill(Player player, PlayerStats stats, PacketEvent event) { + if(!ConfigFile.configuration.getBoolean("enabled")) return; + if(!ConfigFile.configuration.getBoolean("checks.refill")) return; + + if (ServerUtils.isServerLagging()) return; + + int slot = event.getPacket().getIntegers().read(1); + + if(slot >= 36) return; + + ItemStack item = event.getPacket().getItemModifier().read(0); + + if(item == null) return; + + if(item.getType() == Material.POTION || item.getType() == Material.MUSHROOM_SOUP) { + long delay = System.currentTimeMillis() - stats.getLastClick(); + + if(stats.getRefill() > 5) { + stats.setRefill(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Refill (Delay)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + if(stats.getRefillOther() > 15) { + stats.setRefillOther(0); + Bukkit.getPluginManager().callEvent(new PlayerCheatEvent(player, LocationUtils.getLocation(player), "Refill (Random)", player.getPing(), Bukkit.spigot().getTPS()[0])); + } + + int slotDiff = Math.abs(slot - stats.getLastSlot()); + + if(delay > 0 && delay <= 200) { + if(slotDiff < 3) { + stats.setRefill(stats.getRefill() + 1); + //Message.sendMessage(Color.translate("&aVerbose +1")); + } else { + stats.setRefillOther(stats.getRefillOther() + 1); + //Message.sendMessage(Color.translate("&aVerbose +1")); + + if(stats.getRefill() > 0) { + stats.setRefill(stats.getRefill() - 1); + //Message.sendMessage(Color.translate("&aVerbose -1")); + } + } + } else { + stats.setRefill(0); + + if(stats.getRefillOther() > 1) { + stats.setRefillOther(stats.getRefillOther() - 2); + //Message.sendMessage(Color.translate("&cVerbose - 2")); + } + //Message.sendMessage(Color.translate("&cVerbose 0")); + } + + //Message.sendMessage(String.valueOf(delay)); + + stats.setLastSlot(slot); + stats.setLastClick(System.currentTimeMillis()); + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/commands/KillauraCommand.java b/(OLD) Paik/src/secondlife/network/paik/commands/KillauraCommand.java new file mode 100644 index 0000000..99eeef4 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/commands/KillauraCommand.java @@ -0,0 +1,42 @@ +package secondlife.network.paik.commands; + +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import secondlife.network.paik.Paik; +import secondlife.network.paik.checks.combat.Killaura; +import secondlife.network.paik.utils.Color; + +public class KillauraCommand extends zBaseCommand { + + public KillauraCommand(Paik plugin) { + super(plugin); + + this.command = "killaura"; + this.permission = "secondlife.op"; + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(args.length == 0) { + sender.sendMessage(Color.translate("&cUsage: /killaura ")); + return; + } + + Player target = Bukkit.getPlayer(args[0]); + + if(target == null) { + sender.sendMessage(Color.translate("&cThat player isn't online!")); + return; + } + + if(PaikCommand.disabled.contains("KillAura_Bot")) { + sender.sendMessage(Color.translate("&cKillaura Bot check is currently disabled, therefore you can't use this command!")); + return; + } + + Killaura.teleportBot(target); + sender.sendMessage(Color.translate("&eSucessfully teleported Killaura Bot to &6" + target.getName())); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/commands/LogsCommand.java b/(OLD) Paik/src/secondlife/network/paik/commands/LogsCommand.java new file mode 100644 index 0000000..58a5e2e --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/commands/LogsCommand.java @@ -0,0 +1,91 @@ +package secondlife.network.paik.commands; + +import java.io.File; +import java.io.IOException; + +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import secondlife.network.paik.Paik; +import secondlife.network.paik.utils.Color; +import secondlife.network.paik.utils.Message; +import secondlife.network.paik.utils.PasteUtils; +import net.minecraft.util.org.apache.commons.io.FileUtils; + +public class LogsCommand extends zBaseCommand { + + public LogsCommand(Paik plugin) { + super(plugin); + + this.command = "logs"; + this.permission = "secondlife.staff"; + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(sender instanceof Player) { + Player player = (Player) sender; + + if(player.getName().equalsIgnoreCase("Pof") + || player.getName().equalsIgnoreCase("Crystaled") + || player.getName().equalsIgnoreCase("relaxkid") + || player.getName().equalsIgnoreCase("HiMyNameIsTechy") + || player.getName().equalsIgnoreCase("R4pexay") + || player.isOp()) { + + if(args.length == 0) { + player.sendMessage(Color.translate("&cUsage: /logs ")); + return; + } + + if(args.length == 1) { + + File log = new File(new File(this.getInstance().getDataFolder(), "logs"), args[0] + ".txt"); + + if(!log.exists()) { + player.sendMessage(Color.translate("&cThat player has no logs!")); + return; + } + + try { + + String content = FileUtils.readFileToString(log); + + player.sendMessage(Color.translate("&cLogs of player &4" + args[0] + " &cpasted at &4" + new PasteUtils(content, args[0], PasteUtils.Visibility.UNLISTED, PasteUtils.Expire.TEN_MINUTES, PasteUtils.Language.TEXT).upload())); + } catch (IOException e) { + e.printStackTrace(); + } + } + } else { + player.sendMessage(Message.COMMANDS_NO_PERMISSION_MESSAGE.toString()); + } + return; + } + + if(args.length == 0) { + sender.sendMessage(Color.translate("&cUsage: /logs ")); + return; + } + + if(args.length == 1) { + + File log = new File(new File(this.getInstance().getDataFolder(), "logs"), args[0] + ".txt"); + + if(!log.exists()) { + sender.sendMessage(Color.translate("&cThat player has no logs!")); + return; + } + + try { + + String content = FileUtils.readFileToString(log); + + sender.sendMessage(Color.translate("&cLogs of player &4" + args[0] + " &cpasted at &4" + new PasteUtils(content, args[0], PasteUtils.Visibility.UNLISTED, PasteUtils.Expire.TEN_MINUTES, PasteUtils.Language.TEXT).upload())); + } catch (IOException e) { + e.printStackTrace(); + } + } + + return; + } +} \ No newline at end of file diff --git a/(OLD) Paik/src/secondlife/network/paik/commands/OCMCCommand.java b/(OLD) Paik/src/secondlife/network/paik/commands/OCMCCommand.java new file mode 100644 index 0000000..519003d --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/commands/OCMCCommand.java @@ -0,0 +1,43 @@ +package secondlife.network.paik.commands; + +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import secondlife.network.paik.Paik; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.data.PlayerStatsHandler; +import secondlife.network.paik.utils.Color; + +public class OCMCCommand extends zBaseCommand { + + public OCMCCommand(Paik plugin) { + super(plugin); + + this.command = "ocmc"; + this.permission = "secondlife.staff"; + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(args.length == 0) { + sender.sendMessage(Color.translate("&cUsage: /ocmc ")); + return; + } + + Player target = Bukkit.getPlayer(args[0]); + + if(target == null) { + sender.sendMessage(Color.translate("&cThat player isn't online!")); + return; + } + + PlayerStats stats = PlayerStatsHandler.getStats(target); + + if(stats.isOcmc()) { + sender.sendMessage(Color.translate("&6" + target.getName() + " &eis &ausing &eOCMC!")); + } else { + sender.sendMessage(Color.translate("&6" + target.getName() + " &eis &cnot using &eOCMC!")); + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/commands/PaikBanCommand.java b/(OLD) Paik/src/secondlife/network/paik/commands/PaikBanCommand.java new file mode 100644 index 0000000..241c4c2 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/commands/PaikBanCommand.java @@ -0,0 +1,77 @@ +package secondlife.network.paik.commands; + +import java.io.IOException; +import java.text.DecimalFormat; + +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import secondlife.network.paik.Paik; +import secondlife.network.paik.handlers.CheatHandler; +import secondlife.network.paik.utils.Color; +import secondlife.network.paik.utils.LocationUtils; + +public class PaikBanCommand extends zBaseCommand { + + public PaikBanCommand(Paik plugin) { + super(plugin); + + this.command = "paikban"; + this.permission = "secondlife.op"; + } + + @Override + public void execute(CommandSender sender, String[] args) { + + if(args.length == 0) { + sender.sendMessage(Color.translate("&cUsage: /paikban ")); + return; + } + + if(sender instanceof Player) { + + Player player = (Player) sender; + + if(args.length == 1) { + + Player target = Bukkit.getPlayer(args[0]); + + if(target == null) { + player.sendMessage(Color.translate("&cThat player isn't online!")); + return; + } + + if(target.hasPermission("secondlife.staff") && !player.hasPermission("secondlife.op")) { + player.sendMessage(Color.translate("&cYou cannot ban that player!")); + return; + } + + try { + CheatHandler.log(target, "", "BANNED WITH /PAIKBAN COMMAND BY " + player.getName(), LocationUtils.getLocation(target), target.getPing(), new DecimalFormat("##.##").format(Bukkit.spigot().getTPS()[0])); + } catch (IOException e) { + e.printStackTrace(); + } + CheatHandler.handleBan(target); + } + return; + + } + + Player target = Bukkit.getPlayer(args[0]); + + if(target == null) { + sender.sendMessage(Color.translate("&cThat player isn't online!")); + return; + } + + try { + CheatHandler.log(target, "", "BANNED WITH /PAIKBAN COMMAND BY " + sender.getName(), LocationUtils.getLocation(target), target.getPing(), new DecimalFormat("##.##").format(Bukkit.spigot().getTPS()[0])); + } catch (IOException e) { + e.printStackTrace(); + } + CheatHandler.handleBan(target); + + return; + } +} \ No newline at end of file diff --git a/(OLD) Paik/src/secondlife/network/paik/commands/PaikCommand.java b/(OLD) Paik/src/secondlife/network/paik/commands/PaikCommand.java new file mode 100644 index 0000000..d743f6b --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/commands/PaikCommand.java @@ -0,0 +1,320 @@ +package secondlife.network.paik.commands; + +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import secondlife.network.paik.Paik; +import secondlife.network.paik.utils.Color; +import secondlife.network.paik.utils.file.ConfigFile; + +import java.util.ArrayList; + +public class PaikCommand extends zBaseCommand { + + public static ArrayList enabled; + public static ArrayList disabled; + + public PaikCommand(Paik plugin) { + super(plugin); + + enabled = new ArrayList(); + disabled = new ArrayList(); + + this.command = "paik"; + this.permission = "secondlife.op"; + this.forPlayerUseOnly = true; + } + + @Override + public void execute(CommandSender sender, String[] args) { + Player player = (Player) sender; + + if(args.length == 0) { + player.sendMessage(Color.translate("&cUsage: /paik ")); + return; + } + + this.getEnabledChecks(); + + if(args[0].equalsIgnoreCase("list")) { + player.sendMessage(Color.translate("&eChecks&7: &breach, autoclicker, " + + "killaura.dead, killaura.bot, killaura.packet, killaura.angle, killaura.wall" + + "fastbow, crash, custompayload, pingspoof, " + + "regen, flyA, flyB, fasteat, " + + "groundspoof, inventory.move, inventory.killaura, " + + "inventory.autopotion, noslowdown.shooting, noslowdown.eating, " + + "speed, timer.standing, timer.moving, " + + "timer.looking, crash, sneak, " + + "impossiblepitch, autoblock, refill, " + + "invalidinteract, morepackets")); + player.sendMessage(Color.translate("")); + player.sendMessage(Color.translate("")); + player.sendMessage(Color.translate("")); + player.sendMessage(Color.translate("&aEnabled&7:&e " + enabled.toString().replace("[", "").replace("]", "").replace(",", "&7,&e"))); + player.sendMessage(Color.translate("")); + player.sendMessage(Color.translate("&cDisabled&7:&e " + disabled.toString().replace("[", "").replace("]", "").replace(",", "&7,&e"))); + } + + if(args[0].equalsIgnoreCase("enable")) { + if(args.length == 1) { + player.sendMessage(Color.translate("Usage: /paik enable ")); + return; + } + + String check = args[1]; + + if(ConfigFile.configuration.getBoolean("checks." + check)) { + player.sendMessage(Color.translate("&cThat check is already enabled!")); + return; + } + + ConfigFile.configuration.set("checks." + check, true); + ConfigFile.save(); + } + + if(args[0].equalsIgnoreCase("disable")) { + if(args.length == 1) { + player.sendMessage(Color.translate("Usage: /paik disable ")); + return; + } + + String check = args[1]; + + if(!ConfigFile.configuration.getBoolean("checks." + check)) { + player.sendMessage(Color.translate("&cThat check is already disabled!")); + return; + } + + ConfigFile.configuration.set("checks." + check, false); + ConfigFile.save(); + } + + if(args[0].equalsIgnoreCase("autobans")) { + + if(ConfigFile.configuration.getBoolean("autobans")) { + ConfigFile.configuration.set("autobans", false); + player.sendMessage(Color.translate("&cYou have sucessfully &4disabled &cautobans!")); + } else { + ConfigFile.configuration.set("autobans", true); + player.sendMessage(Color.translate("&cYou have sucessfully &aenabled &cautobans!")); + } + + ConfigFile.save(); + } + + if(args[0].equalsIgnoreCase("anticheat")) { + + if(ConfigFile.configuration.getBoolean("enabled")) { + ConfigFile.configuration.set("enabled", false); + player.sendMessage(Color.translate("&cAntiCheat has been &4disabled")); + } else { + ConfigFile.configuration.set("enabled", true); + player.sendMessage(Color.translate("&cAntiCheat has been &aenabled")); + } + + ConfigFile.save(); + } + } + + public void getEnabledChecks() { + enabled.clear(); + disabled.clear(); + + if(ConfigFile.configuration.getBoolean("checks.reach")) { + enabled.add("Reach"); + } else { + disabled.add("Reach"); + } + + if(ConfigFile.configuration.getBoolean("checks.autoclicker")) { + enabled.add("AutoClicker"); + } else { + disabled.add("AutoClicker"); + } + + if(ConfigFile.configuration.getBoolean("checks.fastbow")) { + enabled.add("FastBow"); + } else { + disabled.add("FastBow"); + } + + if(ConfigFile.configuration.getBoolean("checks.killaura.dead")) { + enabled.add("KillAura_Dead"); + } else { + disabled.add("KillAura_Dead"); + } + + if(ConfigFile.configuration.getBoolean("checks.killaura.bot")) { + enabled.add("KillAura_Bot"); + } else { + disabled.add("KillAura_Bot"); + } + + if(ConfigFile.configuration.getBoolean("checks.killaura.packet")) { + enabled.add("KillAura_Packet"); + } else { + disabled.add("KillAura_Packet"); + } + + if(ConfigFile.configuration.getBoolean("checks.killaura.angle")) { + enabled.add("KillAura_Angle"); + } else { + disabled.add("KillAura_Angle"); + } + + if(ConfigFile.configuration.getBoolean("checks.killaura.wall")) { + enabled.add("KillAura_Wall"); + } else { + disabled.add("KillAura_Wall"); + } + + if(ConfigFile.configuration.getBoolean("checks.regen")) { + enabled.add("Regen"); + } else { + disabled.add("Regen"); + } + + if(ConfigFile.configuration.getBoolean("checks.flyA")) { + enabled.add("FlyA"); + } else { + disabled.add("FlyA"); + } + + if(ConfigFile.configuration.getBoolean("checks.pingspoof")) { + enabled.add("PingSpoof"); + } else { + disabled.add("PingSpoof"); + } + + if(ConfigFile.configuration.getBoolean("checks.flyB")) { + enabled.add("FlyB"); + } else { + disabled.add("FlyB"); + } + + if(ConfigFile.configuration.getBoolean("checks.fasteat")) { + enabled.add("FastEat"); + } else { + disabled.add("FastEat"); + } + + if(ConfigFile.configuration.getBoolean("checks.groundspoof")) { + enabled.add("GroundSpoof"); + } else { + disabled.add("GroundSpoof"); + } + + if(ConfigFile.configuration.getBoolean("checks.inventory.move")) { + enabled.add("Inventory_Move"); + } else { + disabled.add("Inventory_Move"); + } + + if(ConfigFile.configuration.getBoolean("checks.inventory.killaura")) { + enabled.add("Inventory_Killaura"); + } else { + disabled.add("Inventory_Killaura"); + } + + if(ConfigFile.configuration.getBoolean("checks.inventory.autopotion")) { + enabled.add("Inventory_AutoPotion"); + } else { + disabled.add("Inventory_AutoPotion"); + } + + if(ConfigFile.configuration.getBoolean("checks.noslowdown.shooting")) { + enabled.add("NoSlowdown_Shooting"); + } else { + disabled.add("NoSlowdown_Shooting"); + } + + if(ConfigFile.configuration.getBoolean("checks.noslowdown.eating")) { + enabled.add("NoSlowdown_Eating"); + } else { + disabled.add("NoSlowdown_Eating"); + } + + if(ConfigFile.configuration.getBoolean("checks.sneak")) { + enabled.add("Sneak"); + } else { + disabled.add("Sneak"); + } + + if(ConfigFile.configuration.getBoolean("checks.speed")) { + enabled.add("Speed"); + } else { + disabled.add("Speed"); + } + + if(ConfigFile.configuration.getBoolean("checks.timer.standing")) { + enabled.add("Timer_Standing"); + } else { + disabled.add("Timer_Standing"); + } + + if(ConfigFile.configuration.getBoolean("checks.timer.moving")) { + enabled.add("Timer_Moving"); + } else { + disabled.add("Timer_Moving"); + } + + if(ConfigFile.configuration.getBoolean("checks.timer.looking")) { + enabled.add("Timer_Looking"); + } else { + disabled.add("Timer_Looking"); + } + + if(ConfigFile.configuration.getBoolean("checks.crash")) { + enabled.add("Crash"); + } else { + disabled.add("Crash"); + } + + if(ConfigFile.configuration.getBoolean("checks.custompayload")) { + enabled.add("CustomPayload"); + } else { + disabled.add("CustomPayload"); + } + + if(ConfigFile.configuration.getBoolean("checks.autoblock")) { + enabled.add("AutoBlock"); + } else { + disabled.add("AutoBlock"); + } + + if(ConfigFile.configuration.getBoolean("checks.refill")) { + enabled.add("Refill"); + } else { + disabled.add("Refill"); + } + + if(ConfigFile.configuration.getBoolean("checks.impossiblepitch")) { + enabled.add("ImpossiblePitch"); + } else { + disabled.add("ImpossiblePitch"); + } + + if(ConfigFile.configuration.getBoolean("checks.morepackets")) { + enabled.add("MorePackets"); + } else { + disabled.add("MorePackets"); + } + + if(ConfigFile.configuration.getBoolean("checks.invalidinteract")) { + enabled.add("InvalidInteract"); + } else { + disabled.add("InvalidInteract"); + } + + /*if(ConfigFile.configuration.getBoolean("checks.aimassist")) { + enabled.add("AimAssist"); + } else { + disabled.add("AimAssist"); + } + + if(ConfigFile.configuration.getBoolean("checks.velocity")) { + enabled.add("Velocity"); + } else { + disabled.add("Velocity"); + }*/ + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/commands/PingCommand.java b/(OLD) Paik/src/secondlife/network/paik/commands/PingCommand.java new file mode 100644 index 0000000..f1282b8 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/commands/PingCommand.java @@ -0,0 +1,54 @@ +package secondlife.network.paik.commands; + +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import secondlife.network.paik.Paik; +import secondlife.network.paik.utils.Color; + +public class PingCommand extends zBaseCommand { + + public PingCommand(Paik plugin) { + super(plugin); + + this.command = "ping"; + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(sender instanceof Player) { + Player player = (Player) sender; + + if(args.length == 0) { + player.sendMessage(Color.translate("&eYour ping: &6" + player.getPing())); + return; + } + + Player target = Bukkit.getPlayer(args[0]); + + if(target == null) { + player.sendMessage(Color.translate("&cThat player isn't online!")); + return; + } + + player.sendMessage(Color.translate("&6" + target.getName() + "'s &eping: &6" + target.getPing())); + return; + } + + if(args.length == 0) { + sender.sendMessage(Color.translate("&cUsage: /ping ")); + return; + } + + Player target = Bukkit.getPlayer(args[0]); + + if(target == null) { + sender.sendMessage(Color.translate("&cThat player isn't online!")); + return; + } + + sender.sendMessage(Color.translate("&6" + target.getName() + "'s &eping: &6" + target.getPing())); + return; + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/commands/zBaseCommand.java b/(OLD) Paik/src/secondlife/network/paik/commands/zBaseCommand.java new file mode 100644 index 0000000..52c4fa5 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/commands/zBaseCommand.java @@ -0,0 +1,26 @@ +package secondlife.network.paik.commands; + +import org.bukkit.command.CommandSender; + +import lombok.Getter; +import secondlife.network.paik.Paik; + +public abstract class zBaseCommand { + + @Getter public Paik instance; + public boolean forPlayerUseOnly; + + public String command; + public String permission; + + public zBaseCommand(Paik plugin) { + this.instance = plugin; + + this.command = ""; + this.permission = ""; + + this.forPlayerUseOnly = false; + } + + public abstract void execute(CommandSender sender, String[] args); +} diff --git a/(OLD) Paik/src/secondlife/network/paik/handlers/AlertsHandler.java b/(OLD) Paik/src/secondlife/network/paik/handlers/AlertsHandler.java new file mode 100644 index 0000000..c085c84 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/handlers/AlertsHandler.java @@ -0,0 +1,31 @@ +package secondlife.network.paik.handlers; + +import java.util.AbstractMap; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +import org.bukkit.entity.Player; +import org.bukkit.event.Listener; + +import secondlife.network.paik.Paik; +import secondlife.network.paik.utils.Handler; + +public class AlertsHandler extends Handler implements Listener { + + public static HashMap> delays; + + public AlertsHandler(Paik plugin) { + super(plugin); + + delays = new HashMap>(); + } + + public static void applyCooldown(Player player, String check) { + delays.put(player.getUniqueId(), new AbstractMap.SimpleEntry(System.currentTimeMillis() + 1000, check)); + } + + public static boolean isActive(Player player, String check) { + return delays.containsKey(player.getUniqueId()) && System.currentTimeMillis() < delays.get(player.getUniqueId()).getKey().longValue() && check == delays.get(player.getUniqueId()).getValue(); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/handlers/CheatHandler.java b/(OLD) Paik/src/secondlife/network/paik/handlers/CheatHandler.java new file mode 100644 index 0000000..2cbe046 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/handlers/CheatHandler.java @@ -0,0 +1,428 @@ +package secondlife.network.paik.handlers; + +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Statistic; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.player.*; +import org.bukkit.event.secondlife.PlayerCheatEvent; +import org.bukkit.scheduler.BukkitRunnable; +import secondlife.network.paik.Paik; +import secondlife.network.paik.checks.movement.Speed; +import secondlife.network.paik.checks.movement.fly.FlyA; +import secondlife.network.paik.checks.movement.fly.FlyB; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.data.PlayerStatsHandler; +import secondlife.network.paik.handlers.events.PlayerMoveByBlockEvent; +import secondlife.network.paik.utils.*; +import secondlife.network.paik.utils.file.ConfigFile; + +import java.io.*; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.UUID; + +public class CheatHandler extends Handler implements Listener { + + public static HashMap ignore; + public static HashMap ignoreJump; + public static File logsDirecotry; + public static DecimalFormat dc; + public static SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy - HH:mm:ss"); + public static Date date = new Date(); + + // TEST KURAC 123 + + public CheatHandler(Paik plugin) { + super(plugin); + + ignore = new HashMap(); + ignoreJump = new HashMap(); + logsDirecotry = new File(this.getInstance().getDataFolder(), "logs"); + dc = new DecimalFormat("##.##"); + + refresh(); + + Bukkit.getPluginManager().registerEvents(this, plugin); + } + + @EventHandler + public void onPlayerCheat(PlayerCheatEvent event) { + if (!ConfigFile.configuration.getBoolean("enabled")) return; + + if (ConfigFile.configuration.getBoolean("test-mode")) { + Message.sendMessage(Color.translate("&c" + event.getPlayer().getName() + "&4 " + event.getCheck())); + event.setCancelled(true); + } + + if (event.isCancelled()) return; + + Player player = event.getPlayer(); + + if (AlertsHandler.isActive(player, event.getCheck())) return; + + AlertsHandler.applyCooldown(player, event.getCheck()); + + if ( event.getCheck().equalsIgnoreCase("PingSpoof") + || event.getCheck().equalsIgnoreCase("AutoPotion") + || event.getCheck().equalsIgnoreCase("DoubleClick") + || event.getCheck().toLowerCase().startsWith("autoblock") + || event.getCheck().toLowerCase().startsWith("timer") + || event.getCheck().toLowerCase().startsWith("refill") + || event.getCheck().toLowerCase().startsWith("inventory")) { + handleAlertNoVL(player, event.getCheck() + " (Experimental)", event.getLocation(), event.getPing(), event.getTps()); + return; + } + + try { + log(player, "", event.getCheck(), event.getLocation(), event.getPing(), dc.format(event.getTps())); + } catch (IOException e) { + e.printStackTrace(); + } + + if (event.getCheck().equalsIgnoreCase("VClip") + || event.getCheck().equalsIgnoreCase("Phase") + || event.getCheck().equalsIgnoreCase("CrackedClient") + || event.getCheck().equalsIgnoreCase("ImpossiblePitch") + || event.getCheck().toLowerCase().startsWith("autoclicker")) { + handleAlertNoVL(player, event.getCheck(), event.getLocation(), event.getPing(), event.getTps()); + return; + } + + PlayerStats stats = PlayerStatsHandler.getStats(player); + + stats.setVl(stats.getVl() + 1); + + handleAlert(player, event.getCheck(), event.getLocation(), stats.getVl(), event.getPing(), event.getTps()); + + if (!ConfigFile.configuration.getBoolean("autobans") || player.hasPermission("secondlife.staff")) return; + + if (event.getCheck().equalsIgnoreCase("Killaura (Invalid Swing)")) { + handleBan(player); + return; + } + + if (stats.getVl() > 4) { + try { + log(player, event.getCheck(), "WAS AUTOBANNED FOR", LocationUtils.getLocation(player), player.getPing(), new DecimalFormat("##.##").format(Bukkit.spigot().getTPS()[0])); + } catch (IOException e) { + e.printStackTrace(); + } + + if (player.getName().equalsIgnoreCase("Zidovcina")) return; + + handleBan(player); + } + } + + public static void handleBan(Player player) { + PlayerStats stats = PlayerStatsHandler.getStats(player); + + if (stats.isBanned()) return; + + ByteArrayOutputStream b = new ByteArrayOutputStream(); + DataOutputStream out = new DataOutputStream(b); + try { + out.writeUTF("BanChannel"); + out.writeUTF(player.getName()); + } catch (IOException e) { + e.printStackTrace(); + } + player.sendPluginMessage(Paik.getInstance(), "AutoBan", b.toByteArray()); + + Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "banip " + player.getName() + "[Paik] Unfair Advantage -s"); + + stats.setBanned(true); + } + + public static void handleAlert(Player player, String check, String location, int vl, int ping, double tps) { + ByteArrayOutputStream b = new ByteArrayOutputStream(); + DataOutputStream out = new DataOutputStream(b); + try { + out.writeUTF("AlertsChannel"); + out.writeUTF(player.getName()); + out.writeUTF(check); + out.writeUTF(location); + out.writeInt(vl); + out.writeInt(ping); + out.writeDouble(tps); + } catch (IOException e) { + e.printStackTrace(); + } + player.sendPluginMessage(Paik.getInstance(), "Alerts", b.toByteArray()); + } + + public static void handleAlertNoVL(Player player, String check, String location, int ping, double tps) { + ByteArrayOutputStream b = new ByteArrayOutputStream(); + DataOutputStream out = new DataOutputStream(b); + try { + out.writeUTF("AlertsNoVLChannel"); + out.writeUTF(player.getName()); + out.writeUTF(check); + out.writeUTF(location); + out.writeInt(ping); + out.writeDouble(tps); + } catch (IOException e) { + e.printStackTrace(); + } + player.sendPluginMessage(Paik.getInstance(), "Alerts", b.toByteArray()); + } + + @EventHandler + public void onPlayerMove(PlayerMoveEvent event) { + Player player = event.getPlayer(); + + PlayerStats stats = PlayerStatsHandler.getStats(player); + + if (stats == null) return; + + Location from = event.getFrom(); + Location to = event.getTo(); + + double horizontal = Math.sqrt(Math.pow(to.getX() - from.getX(), 2.0D) + Math.pow(to.getZ() - from.getZ(), 2.0D)); + + stats.setDelta(horizontal); + + if (from.getBlockX() == to.getBlockX() && from.getBlockY() == to.getBlockY() && from.getBlockZ() == to.getBlockZ()) return; + + Bukkit.getPluginManager().callEvent(new PlayerMoveByBlockEvent(player, to, from)); + } + + @EventHandler(priority = EventPriority.LOWEST) + public void onPlayerQuit(PlayerQuitEvent event) { + Player player = event.getPlayer(); + + if (AlertsHandler.delays.containsKey(player.getUniqueId())) { + AlertsHandler.delays.remove(player.getUniqueId()); + } + + if (FlyA.onGround.containsKey(player.getUniqueId())) { + FlyA.onGround.remove(player.getUniqueId()); + } + + if (FlyA.upTicks.containsKey(player.getUniqueId())) { + FlyA.upTicks.remove(player.getUniqueId()); + } + + if (ignoreJump.containsKey(player.getUniqueId())) { + ignoreJump.remove(player.getUniqueId()); + } + + if (ignore.containsKey(player.getUniqueId())) { + ignore.remove(player.getUniqueId()); + } + + // lOGGING + + PlayerStats stats = PlayerStatsHandler.getStats(player); + + if(stats != null && !stats.getLogs().isEmpty()) { + File log = new File(logsDirecotry, player.getName() + ".txt"); + + if(!log.exists()) { + try { + log.createNewFile(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + try { + FileWriter fw = new FileWriter(log, false); + BufferedWriter bw = new BufferedWriter(fw); + + for(String string : stats.getLogs()) { + bw.write(string); + bw.newLine(); + } + + bw.close(); + fw.close(); + stats.getLogs().clear(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + @EventHandler + public void onBlockBreak(BlockBreakEvent event) { + PlayerStats stats = PlayerStatsHandler.getStats(event.getPlayer()); + + stats.setLastBlockBreak(System.currentTimeMillis()); + } + + @EventHandler + public void onPlayerJoin(PlayerJoinEvent event) { + this.clearList(); + + Player player = event.getPlayer(); + + PlayerStats stats = PlayerStatsHandler.getStats(player); + + stats.setJoined(System.currentTimeMillis()); + + this.ignore(player); + } + + @EventHandler + public void onPlayerTeleport(PlayerTeleportEvent event) { + this.clearList(); + this.ignore(event.getPlayer()); + } + + @EventHandler + public void onPlayerWorldChanged(PlayerChangedWorldEvent event) { + this.clearList(); + + Player player = event.getPlayer(); + + this.ignore(player); + + player.setSneaking(false); + } + + @EventHandler + public void onBlockPlace(BlockPlaceEvent event) { + this.clearList(); + + Player player = event.getPlayer(); + + this.ignore(player); + + PlayerStats stats = PlayerStatsHandler.getStats(player); + + stats.setLastBlockPlace(System.currentTimeMillis()); + } + + @EventHandler(priority = EventPriority.MONITOR) + public void onEntityDamageByEntityEvent(EntityDamageByEntityEvent event) { + this.clearList(); + + if (event.isCancelled()) return; + + if (!(event.getEntity() instanceof Player)) return; + + Player player = (Player) event.getEntity(); + + this.ignore(player); + } + + @EventHandler + public void onEntityDamage(EntityDamageEvent event) { + this.clearList(); + + if (event.isCancelled()) return; + + if (!(event.getEntity() instanceof Player)) return; + + Player player = (Player) event.getEntity(); + + this.ignore(player); + } + + @EventHandler + public void onPlayerToggleFlight(PlayerToggleFlightEvent event) { + this.clearList(); + this.ignore(event.getPlayer()); + } + + @EventHandler + public void onPlayerStatisticIncreamentEvent(PlayerStatisticIncrementEvent event) { + this.clearList(); + + if (event.getStatistic() != Statistic.JUMP) return; + + Player player = event.getPlayer(); + + Speed.removeJumpOne(player); + ignoreJump.put(player.getUniqueId(), System.currentTimeMillis() + 1000); + } + + public void clearList() { + if (ServerUtils.isServerLagging()) { + if (!ignore.isEmpty()) { + ignore.clear(); + } + if (!ignoreJump.isEmpty()) { + ignoreJump.clear(); + } + return; + } + } + + public void ignore(Player player) { + Speed.removeOne(player); + FlyA.removeOne(player); + FlyB.removeOne(player); + ignore.put(player.getUniqueId(), System.currentTimeMillis() + 3000); + } + + public static void log(Player player, String message, String check, String location, int ping, String tps) throws IOException { + PlayerStats stats = PlayerStatsHandler.getStats(player); + + if(stats == null) return; + + String line = sdf.format(date) + " " + player.getName() + " " + check.toUpperCase() + " " + message + " LOCATION: " + location + " PING: " + ping + " TPS: " + tps; + + stats.getLogs().add(line); + } + + public static void logPayload(Player player, String message) throws IOException { + File log = new File(Paik.getInstance().getDataFolder(), "payload.txt"); + + if (!log.exists()) { + try { + log.createNewFile(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + BufferedWriter bw = new BufferedWriter(new FileWriter(log, true)); + try { + bw.write(sdf.format(date) + " " + player.getName() + ": " + message); + bw.newLine(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + bw.flush(); + bw.close(); + } + } + + public static void clear() { + AlertsHandler.delays.clear(); + + CommandHandler.commands.clear(); + + FlyA.onGround.clear(); + FlyA.upTicks.clear(); + ignoreJump.clear(); + ignore.clear(); + } + + public static void clearNormal() { + AlertsHandler.delays.clear(); + + FlyA.onGround.clear(); + FlyA.upTicks.clear(); + } + + public static void refresh() { + new BukkitRunnable() { + public void run() { + clearNormal(); + } + }.runTaskTimerAsynchronously(Paik.getInstance(), 3600L, 3600L); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/handlers/CommandHandler.java b/(OLD) Paik/src/secondlife/network/paik/handlers/CommandHandler.java new file mode 100644 index 0000000..52e0ed8 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/handlers/CommandHandler.java @@ -0,0 +1,60 @@ +package secondlife.network.paik.handlers; + +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; + +import secondlife.network.paik.Paik; +import secondlife.network.paik.commands.KillauraCommand; +import secondlife.network.paik.commands.LogsCommand; +import secondlife.network.paik.commands.OCMCCommand; +import secondlife.network.paik.commands.PaikBanCommand; +import secondlife.network.paik.commands.PaikCommand; +import secondlife.network.paik.commands.PingCommand; +import secondlife.network.paik.commands.zBaseCommand; +import secondlife.network.paik.utils.Handler; +import secondlife.network.paik.utils.Message; + +public class CommandHandler extends Handler implements CommandExecutor { + + public static List commands; + + public CommandHandler(Paik plugin) { + super(plugin); + + commands = new ArrayList(); + + commands.add(new KillauraCommand(plugin)); + commands.add(new LogsCommand(plugin)); + commands.add(new OCMCCommand(plugin)); + commands.add(new PaikBanCommand(plugin)); + commands.add(new PaikCommand(plugin)); + commands.add(new PingCommand(plugin)); + + for (zBaseCommand command : commands) { + this.getInstance().getCommand(command.command).setExecutor(this); + } + } + + public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { + for (zBaseCommand command : commands) { + if (cmd.getName().equalsIgnoreCase(command.command)) { + if (((sender instanceof ConsoleCommandSender)) && (command.forPlayerUseOnly)) { + sender.sendMessage(Message.COMMANDS_FOR_PLAYER_USE_ONLY.toString()); + return true; + } + if ((!sender.hasPermission(command.permission)) && (!command.permission.equals(""))) { + sender.sendMessage(Message.COMMANDS_NO_PERMISSION_MESSAGE.toString()); + return true; + } + command.execute(sender, args); + return true; + } + } + return true; + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/handlers/PacketHandler.java b/(OLD) Paik/src/secondlife/network/paik/handlers/PacketHandler.java new file mode 100644 index 0000000..b235d52 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/handlers/PacketHandler.java @@ -0,0 +1,217 @@ +package secondlife.network.paik.handlers; + +import com.comphenix.protocol.PacketType; +import com.comphenix.protocol.events.ListenerPriority; +import com.comphenix.protocol.events.PacketAdapter; +import com.comphenix.protocol.events.PacketEvent; +import com.comphenix.protocol.wrappers.EnumWrappers; +import com.comphenix.protocol.wrappers.EnumWrappers.EntityUseAction; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import secondlife.network.paik.Paik; +import secondlife.network.paik.checks.combat.AutoBlock; +import secondlife.network.paik.checks.combat.Killaura; +import secondlife.network.paik.checks.combat.Reach; +import secondlife.network.paik.checks.movement.Inventory; +import secondlife.network.paik.checks.movement.Sneak; +import secondlife.network.paik.checks.movement.Timer; +import secondlife.network.paik.checks.other.*; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.data.PlayerStatsHandler; + +public class PacketHandler extends PacketAdapter { + + public PacketHandler(Paik plugin) { + super(plugin, ListenerPriority.HIGH, new PacketType[] { + PacketType.Play.Client.USE_ENTITY, PacketType.Play.Client.KEEP_ALIVE, PacketType.Play.Client.CLOSE_WINDOW, + PacketType.Play.Client.CUSTOM_PAYLOAD, PacketType.Play.Client.BLOCK_PLACE, PacketType.Play.Client.BLOCK_DIG, + PacketType.Play.Client.LOOK, PacketType.Play.Client.POSITION_LOOK, PacketType.Play.Client.ARM_ANIMATION, + PacketType.Play.Client.POSITION, PacketType.Play.Client.FLYING, PacketType.Play.Client.WINDOW_CLICK, + PacketType.Play.Client.ENTITY_ACTION, + + PacketType.Play.Server.ENTITY_METADATA }); + } + + public void onPacketReceiving(PacketEvent event) { + Player player = event.getPlayer(); + if(player == null) return; + + PlayerStats stats = PlayerStatsHandler.getStats(player); + if(stats == null) return; + + PacketType PACKET_TYPE = event.getPacketType(); + + if(PACKET_TYPE == PacketType.Play.Client.ENTITY_ACTION) { + this.handleEntityActionPacket(player, stats, event); + } + + if(PACKET_TYPE == PacketType.Play.Client.USE_ENTITY) { + this.handleUseEntityPacket(player, stats, event); + } + + if(PACKET_TYPE == PacketType.Play.Client.KEEP_ALIVE) { + this.handleKeepAlivePacket(player, stats); + } + + if(PACKET_TYPE == PacketType.Play.Client.CLOSE_WINDOW) { + this.handleWindowClosePacket(player, stats); + } + + if(PACKET_TYPE == PacketType.Play.Client.CUSTOM_PAYLOAD) { + this.handleCustomPayloadPacket(player, stats, event); + } + + if(PACKET_TYPE == PacketType.Play.Client.BLOCK_PLACE) { + this.handleBlockPlacePacket(player, stats); + } + + if(PACKET_TYPE == PacketType.Play.Client.BLOCK_DIG) { + this.handleBlockDigPacket(player, stats); + } + + if(PACKET_TYPE == PacketType.Play.Client.LOOK) { + this.handleLookAndPositionLookPacket(player, stats, event); + this.handlePositionLookPacket(player, stats); + } + + if(PACKET_TYPE == PacketType.Play.Client.POSITION_LOOK) { + this.handleLookAndPositionLookPacket(player, stats, event); + this.handlePositionLookPacket(player, stats); + } + + if(PACKET_TYPE == PacketType.Play.Client.POSITION) { + this.handlePositionPacket(player, stats); + } + + if(PACKET_TYPE == PacketType.Play.Client.FLYING) { + this.handleFlyingPacket(player, stats); + } + + if(PACKET_TYPE == PacketType.Play.Client.ARM_ANIMATION) { + this.handleArmAnimationPacket(player, stats); + } + + if(PACKET_TYPE == PacketType.Play.Client.WINDOW_CLICK) { + this.handleWindowClickPacket(player, stats, event); + } + } + + public void onPacketSending(PacketEvent event) { + Player player = event.getPlayer(); + if(player == null) return; + + PlayerStats stats = PlayerStatsHandler.getStats(player); + if(stats == null) return; + + PacketType PACKET_TYPE = event.getPacketType(); + + if(PACKET_TYPE == PacketType.Play.Server.ENTITY_METADATA) { + this.handleEntityMetadataPacket(player, event); + } + } + + public void handleWindowClosePacket(Player player, PlayerStats stats) { + Inventory.handleInventoryClose(player, stats); + } + + public void handleUseEntityPacket(Player player, PlayerStats stats, PacketEvent event) { + EnumWrappers.EntityUseAction type; + try { + type = event.getPacket().getEntityUseActions().read(0); + } catch (Exception ex) { + return; + } + + if(type != EntityUseAction.ATTACK) return; + + int entityID = event.getPacket().getIntegers().read(0); + + stats.setLastUseEntityPacket(System.currentTimeMillis()); + + Reach.handleReachCheck(player, stats, entityID); + Killaura.handleKillauraBotCheck(player, entityID); + + Entity hit = null; + + if(player.getWorld().getEntities().size() > 0) { + for(Entity entity : player.getWorld().getEntities()) { + if(entity.getEntityId() == entityID) { + hit = entity; + } + } + } + + if(hit == null) return; + + stats.setLastEntity(hit); + } + + public void handleKeepAlivePacket(Player player, PlayerStats stats) { + PingSpoof.handlePingSpoof(player, stats); + } + + public void handleCustomPayloadPacket(Player player, PlayerStats stats, PacketEvent event) { + String message = event.getPacket().getStrings().read(0); + + CustomPayload.handleCustomPayload(player, stats, message); + } + + public void handleBlockPlacePacket(Player player, PlayerStats stats) { + stats.setLastBlockPlacePacket(System.currentTimeMillis()); + stats.setAutoblock2(stats.getAutoblock2() + 1); + + AutoBlock.handleAutoBlockPlace(player, stats); + Crash.handleBlockPlaceCrash(player, stats); + } + + public void handleBlockDigPacket(Player player, PlayerStats stats) { + stats.setLastBlockDigPacket(System.currentTimeMillis()); + stats.setAutoblock2(stats.getAutoblock2() + 1); + + AutoBlock.handleAutoBlockDig(player, stats); + AutoBlock.handleAutoBlock(player, stats); + } + + public void handleLookAndPositionLookPacket(Player player, PlayerStats stats, PacketEvent event) { + float yaw = event.getPacket().getFloat().read(0); + float pitch = event.getPacket().getFloat().read(1); + + ImpossiblePitch.handleImpossiblePitch(player, stats, pitch); + Killaura.handleKillauraAngle(player, stats, yaw, pitch); + } + + public void handlePositionLookPacket(Player player, PlayerStats stats) { + Timer.handleTimerPositionLook(player, stats); + } + + public void handlePositionPacket(Player player, PlayerStats stats) { + stats.setMorePackets(stats.getMorePackets() + 1); + + Timer.handleTimerPosition(player, stats); + } + + public void handleFlyingPacket(Player player, PlayerStats stats) { + Timer.handleTimerFlying(player, stats); + } + + public void handleArmAnimationPacket(Player player, PlayerStats stats) { + Crash.handleAnimationCrash(player, stats); + Killaura.handleKillauraWall(player, stats); + } + + public void handleWindowClickPacket(Player player, PlayerStats stats, PacketEvent event) { + Refill.handleRefill(player, stats, event); + } + + public void handleEntityActionPacket(Player player, PlayerStats stats, PacketEvent event) { + int actionId = event.getPacket().getIntegers().read(1); + + if(actionId == 1 || actionId == 2) { + Sneak.handleSneak(player, stats); + } + } + + public void handleEntityMetadataPacket(Player player, PacketEvent event) { + Nametags.handleHealthRandomizer(player, event); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/handlers/PlayerHandler.java b/(OLD) Paik/src/secondlife/network/paik/handlers/PlayerHandler.java new file mode 100644 index 0000000..cd97a44 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/handlers/PlayerHandler.java @@ -0,0 +1,180 @@ +package secondlife.network.paik.handlers; + +import org.bukkit.Achievement; +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.entity.Arrow; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.entity.*; +import org.bukkit.event.inventory.InventoryOpenEvent; +import org.bukkit.event.player.*; +import secondlife.network.paik.Paik; +import secondlife.network.paik.checks.combat.*; +import secondlife.network.paik.checks.movement.GroundSpoof; +import secondlife.network.paik.checks.movement.Inventory; +import secondlife.network.paik.checks.movement.NoSlowdown; +import secondlife.network.paik.checks.movement.Speed; +import secondlife.network.paik.checks.movement.fly.FlyA; +import secondlife.network.paik.checks.movement.fly.FlyB; +import secondlife.network.paik.checks.other.InvalidInteract; +import secondlife.network.paik.handlers.data.PlayerStats; +import secondlife.network.paik.handlers.data.PlayerStatsHandler; +import secondlife.network.paik.handlers.events.PlayerMoveByBlockEvent; +import secondlife.network.paik.utils.Handler; +import secondlife.network.paik.utils.ServerUtils; + +public class PlayerHandler extends Handler implements Listener { + + public PlayerHandler(Paik plugin) { + super(plugin); + + Bukkit.getPluginManager().registerEvents(this, plugin); + } + + @EventHandler + public void onPlayerInteract(PlayerInteractEvent event) { + Player player = event.getPlayer(); + PlayerStats stats = PlayerStatsHandler.getStats(player); + Action action = event.getAction(); + + AutoClicker.handleAutoClickInteract(player, stats, action); + FastBow.handleFastBowInteract(player, stats); + InvalidInteract.handleInvalidInteract(player, stats, action); + } + + @EventHandler + public void onEntityShootBow(EntityShootBowEvent event) { + if(event.isCancelled()) return; + if(!(event.getEntity() instanceof Player)) return; + + Arrow arrow = (Arrow) event.getProjectile(); + Player player = (Player) arrow.getShooter(); + PlayerStats stats = PlayerStatsHandler.getStats(player); + + double power = arrow.getVelocity().length(); + + FastBow.handleFastBowShoot(player, stats, power); + NoSlowdown.handleNoSlowdownShooting(player, stats); + } + @EventHandler + public void onPlayerItemConsume(PlayerItemConsumeEvent event) { + if(event.isCancelled()) return; + + Player player = event.getPlayer(); + PlayerStats stats = PlayerStatsHandler.getStats(player); + + FastEat.handleFastEat(player, stats); + NoSlowdown.handleNoSlowdownEating(player, stats); + } + + @EventHandler(priority = EventPriority.MONITOR) + public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { + if(!(event.getDamager() instanceof Player)) return; + + Player player = (Player) event.getDamager(); + PlayerStats stats = PlayerStatsHandler.getStats(player); + + Killaura.handleKillaura(player, stats); + } + + @EventHandler + public void onEntityRegainHealth(EntityRegainHealthEvent event) { + if(event.isCancelled() + || event.getEntityType() != EntityType.PLAYER + || event.getRegainReason() != EntityRegainHealthEvent.RegainReason.SATIATED) + return; + + Player player = (Player) event.getEntity(); + PlayerStats stats = PlayerStatsHandler.getStats(player); + + Regen.handleRegen(player, stats); + } + + @EventHandler + public void onPlayerMoveByBlockEvent(PlayerMoveByBlockEvent event) { + Player player = event.getPlayer(); + PlayerStats stats = PlayerStatsHandler.getStats(player); + + FlyA.handleFly(player, stats, event); + FlyB.handleFly(player, stats, event); + GroundSpoof.handleGroundSpoof(player, stats, event); + Inventory.handleInventoryMove(player, stats, event); + Speed.handleSpeed(player, stats, event); + } + + @EventHandler + public void onPlayerJoin(PlayerJoinEvent event) { + Player player = event.getPlayer(); + + if(!player.hasAchievement(Achievement.OPEN_INVENTORY)) return; + + player.removeAchievement(Achievement.OPEN_INVENTORY); + } + + @EventHandler + public void onPlayerDeath(PlayerDeathEvent event) { + PlayerStats stats = PlayerStatsHandler.getStats(event.getEntity()); + + stats.setInventoryOpen(false); + } + + @EventHandler + public void onPlayerAchievementAwarded(PlayerAchievementAwardedEvent event) { + if(event.getAchievement() != Achievement.OPEN_INVENTORY) return; + + event.setCancelled(true); + + Player player = event.getPlayer(); + + if(ServerUtils.isServerLagging() + || player.getGameMode() == GameMode.CREATIVE + || player.getAllowFlight()) + return; + + PlayerStats stats = PlayerStatsHandler.getStats(player); + + stats.setInventoryOpen(true); + + Killaura.teleportBot(player); + } + + @EventHandler + public void onInventoryOpen(InventoryOpenEvent event) { + Player player = (Player) event.getPlayer(); + PlayerStats stats = PlayerStatsHandler.getStats(player); + + stats.setInventoryOpen(true); + } + + @EventHandler + public void onPlayerWorldChange(PlayerChangedWorldEvent event) { + PlayerStats stats = PlayerStatsHandler.getStats(event.getPlayer()); + + stats.setInventoryOpen(false); + } + + @EventHandler + public void onPlayerTeleport(PlayerTeleportEvent event) { + if(event.getCause() == PlayerTeleportEvent.TeleportCause.ENDER_PEARL) return; + + PlayerStats stats = PlayerStatsHandler.getStats(event.getPlayer()); + + stats.setInventoryOpen(false); + } + + @EventHandler + public void onPotionSplash(PotionSplashEvent event) { + if(event.isCancelled()) return; + if(!(event.getEntity() instanceof Player)) return; + + Player player = (Player) event.getEntity(); + PlayerStats stats = PlayerStatsHandler.getStats(player); + + Inventory.handleAutoPotion(player, stats); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/handlers/data/PlayerStats.java b/(OLD) Paik/src/secondlife/network/paik/handlers/data/PlayerStats.java new file mode 100644 index 0000000..cbb0293 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/handlers/data/PlayerStats.java @@ -0,0 +1,119 @@ +package secondlife.network.paik.handlers.data; + +import java.util.ArrayList; +import java.util.UUID; + +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class PlayerStats { + + private UUID uuid; + + private ArrayList logs = new ArrayList(); + + private Entity lastEntity; + + private int leftClickCPS = 0; + private int autoclickerVL = 0; + private int constantCPS = 0; + private int doubleclick = 0; + + private long click1 = 0; + private long click2 = 0; + + private int regenVL = 0; + + private long bowVL = 0; + private long pull; + + private int swingAngle = 0; + private int botHits = 0; + private int hits = 0; + private long lastUseEntityPacket; + private int hitsInvalidPacket = 0; + private int hitsWhileDead = 0; + private int noSwingDamageVL = 0; + + private int reachVL; + private double delta; + + private long lastRegen; + + private int flyAVL = 0; + private int flyBVL = 0; + + private int fastEatVL = 0; + private long lastEat; + + private boolean inventoryOpen = false; + private int movesWhileInventoryClosed = 0; + private int hitsWhileInventoryOpen = 0; + private int potionsSplashedWhileInventoryOpen = 0; + + private int nofallVL = 0; + + private int noslowFoodVl = 0; + private int noslowBowVl = 0; + + private long sneak1; + private long sneak2; + private int sneakVL = 0; + + private int speedVL = 0; + private int speedJumpVL = 0; + private int speedOtherVL = 0; + private int speedSlowhopVL = 0; + private int speedFast = 0; + + private int morePackets = 0; + private int flyingPackets = 0; + private int positionPackets = 0; + private int positionLookPackets = 0; + private int timerAVL = 0; + private int timerBVL = 0; + private int timerCVL = 0; + + private int boxer1 = 0; + private int boxer2 = 0; + + private int lastPing; + private int pingSpoof = 0; + + private long lastClick; + private int refill; + private int refillOther; + private int lastSlot; + + private int autoblock = 0; + private int autoblock2 = 0; + + private float lastYaw; + private float lastPitch; + private int angle; + + private int invalidInteract = 0; + + private long joined; + private long lastBlockPlace; + private long lastBlockBreak; + private long lastBlockPlacePacket; + private long lastArmPacket = 0; + private long lastBlockPacket = 0; + private long lastBlockDigPacket = 0; + + private int vl = 0; + + private boolean ocmc = false; + private boolean banned = false; + + + public PlayerStats(Player player) { + this.uuid = player.getUniqueId(); + } +} \ No newline at end of file diff --git a/(OLD) Paik/src/secondlife/network/paik/handlers/data/PlayerStatsHandler.java b/(OLD) Paik/src/secondlife/network/paik/handlers/data/PlayerStatsHandler.java new file mode 100644 index 0000000..87ee9e3 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/handlers/data/PlayerStatsHandler.java @@ -0,0 +1,57 @@ +package secondlife.network.paik.handlers.data; + +import java.util.HashMap; +import java.util.UUID; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerQuitEvent; + +import secondlife.network.paik.Paik; +import secondlife.network.paik.utils.Handler; + +public class PlayerStatsHandler extends Handler implements Listener { + + public static HashMap statsMap; + + public PlayerStatsHandler(Paik plugin) { + super(plugin); + + statsMap = new HashMap(); + + for(Player player : Bukkit.getOnlinePlayers()) { + addStats(player); + } + + Bukkit.getPluginManager().registerEvents(this, plugin); + } + + @EventHandler + public void onPlayerJoin(PlayerJoinEvent event) { + Player player = event.getPlayer(); + + addStats(player); + } + + @EventHandler + public void onPlayerQuit(PlayerQuitEvent event) { + Player player = event.getPlayer(); + + destroyStats(player); + } + + public static void addStats(Player player) { + statsMap.put(player.getUniqueId(), new PlayerStats(player)); + } + + public static void destroyStats(Player player) { + statsMap.remove(player.getUniqueId()); + } + + public static PlayerStats getStats(Player player) { + return statsMap.get(player.getUniqueId()); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/handlers/events/PlayerMoveByBlockEvent.java b/(OLD) Paik/src/secondlife/network/paik/handlers/events/PlayerMoveByBlockEvent.java new file mode 100644 index 0000000..3b8cf4e --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/handlers/events/PlayerMoveByBlockEvent.java @@ -0,0 +1,36 @@ +package secondlife.network.paik.handlers.events; + +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.event.Event; +import org.bukkit.event.HandlerList; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class PlayerMoveByBlockEvent extends Event { + + private Player player; + private Location to; + private Location from; + + private boolean cancelled; + + public PlayerMoveByBlockEvent(Player player, Location to, Location from) { + this.player = player; + this.to = to; + this.from = from; + } + + private static final HandlerList handlers = new HandlerList(); + + public HandlerList getHandlers() { + return handlers; + } + + public static HandlerList getHandlerList() { + return handlers; + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/handlers/fixes/BookExploitHandler.java b/(OLD) Paik/src/secondlife/network/paik/handlers/fixes/BookExploitHandler.java new file mode 100644 index 0000000..608db3f --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/handlers/fixes/BookExploitHandler.java @@ -0,0 +1,52 @@ +package secondlife.network.paik.handlers.fixes; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerEditBookEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; + +import secondlife.network.paik.Paik; +import secondlife.network.paik.utils.Handler; + +public class BookExploitHandler extends Handler implements Listener { + + public BookExploitHandler(Paik plugin) { + super(plugin); + + Bukkit.getPluginManager().registerEvents(this, plugin); + } + + @EventHandler + public void onPlayerInteract(PlayerInteractEvent event) { + Player player = event.getPlayer(); + ItemStack item = player.getItemInHand(); + + if(item == null) return; + if((item.getType() != Material.BOOK_AND_QUILL) && (item.getType() != Material.WRITTEN_BOOK)) return; + + if(item.getEnchantments().size() > 0) { + for(Enchantment enchant : item.getEnchantments().keySet()) { + item.removeEnchantment(enchant); + } + + event.setCancelled(true); + player.getInventory().removeItem(new ItemStack[] { item }); + } + } + + @EventHandler + public void onPlayerEditBook(PlayerEditBookEvent event) { + if (event.getNewBookMeta().getEnchants().size() > 0) { + event.setCancelled(true); + + Player player = event.getPlayer(); + + player.getInventory().remove(Material.BOOK_AND_QUILL); + } + } +} \ No newline at end of file diff --git a/(OLD) Paik/src/secondlife/network/paik/handlers/fixes/FenceGlitchHandler.java b/(OLD) Paik/src/secondlife/network/paik/handlers/fixes/FenceGlitchHandler.java new file mode 100644 index 0000000..b86a2f0 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/handlers/fixes/FenceGlitchHandler.java @@ -0,0 +1,63 @@ +package secondlife.network.paik.handlers.fixes; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; + +import secondlife.network.paik.Paik; +import secondlife.network.paik.utils.Handler; + +public class FenceGlitchHandler extends Handler implements Listener { + + public static Material[] materials; + + public FenceGlitchHandler(Paik plugin) { + super(plugin); + + materials = new Material[] { + Material.POTION, + Material.GOLDEN_APPLE, + Material.DIAMOND_SWORD, + Material.GOLD_SWORD, + Material.IRON_SWORD, + Material.STONE_SWORD, + Material.WOOD_SWORD, + Material.COOKED_BEEF, + Material.RAW_BEEF, + Material.COOKED_CHICKEN, + Material.RAW_CHICKEN, + Material.BAKED_POTATO, + Material.GOLDEN_CARROT, + Material.PORK, + Material.GRILLED_PORK, + Material.PUMPKIN_PIE, + Material.BOW }; + + Bukkit.getPluginManager().registerEvents(this, plugin); + } + + @EventHandler + public void onPlayerInteract(PlayerInteractEvent event) { + if(event.isCancelled()) return; + + Player player = event.getPlayer(); + ItemStack item = player.getItemInHand(); + + if(item == null) return; + + Block block = event.getClickedBlock(); + + if(block.getType() == Material.FENCE || block.getType() == Material.NETHER_FENCE || block.getType() == Material.CAULDRON) { + for(Material material : materials) { + if(item.getType() == material) { + event.setCancelled(true); + } + } + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/CheatUtils.java b/(OLD) Paik/src/secondlife/network/paik/utils/CheatUtils.java new file mode 100644 index 0000000..e61ccc5 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/CheatUtils.java @@ -0,0 +1,260 @@ +package secondlife.network.paik.utils; + +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Player; + +import java.util.ArrayList; +import java.util.Random; + +public class CheatUtils { + + public static int random(int min, int max) { + Random rand = new Random(); + int randomNum = rand.nextInt(max - min + 1) + min; + return randomNum; + } + + public static boolean isOnIce(Player player) { + + Location location = player.getLocation(); + location.setY(location.getY() - 1.0); + + if(location.getBlock().getType() == Material.ICE && location.subtract(0, 1, 0).getBlock().getType() == Material.ICE) { + return true; + } + + if(location.getBlock().getType() == Material.PACKED_ICE && location.subtract(0, 1, 0).getBlock().getType() == Material.PACKED_ICE) { + return true; + } + + return false; + } + + public static boolean isOnSolidBlock(Player player) { + + Location location = player.getLocation(); + + if(location.getBlock().getType().isSolid()) { + return true; + } + + location.setY(location.getY() - 1.0); + + if(location.getBlock().getType().isSolid()) { + return true; + } + return false; + } + + public static boolean isOnSnow(Player player) { + + Location location = player.getLocation(); + location.setY(location.getY() - 0.1); + + if(location.getBlock().getType() == Material.SNOW) { + return true; + } + return false; + } + + public static boolean isInAir(Player player) { + + Location location = player.getLocation(); + location.setY(location.getY() - 1); + + if(location.getBlock().getType() == Material.AIR && location.subtract(0, 1, 0).getBlock().getType() == Material.AIR) { + return true; + } + return false; + } + + public static boolean isOnHalfBlocks(Player player) { + + Location location = player.getLocation(); + location.setY(location.getY() - 0.5); + + if(location.getBlock().getType() == Material.STEP + || location.getBlock().getType() == Material.WOOD_STEP + || location.getBlock().getType() == Material.TRAP_DOOR + || location.getBlock().getType() == Material.DAYLIGHT_DETECTOR + || location.getBlock().getType() == Material.SNOW) { + return true; + } + return false; + } + + public static Byte direction(Player player) { + double rotation = (player.getLocation().getYaw() - 90) % 360; + if (rotation < 0) { + rotation += 360.0; + } + if (0 <= rotation && rotation < 22.5) { + return 0xC; // S > E + } else if (22.5 <= rotation && rotation < 67.5) { + return 0xE; // SW > SE + } else if (67.5 <= rotation && rotation < 112.5) { + return 0x0; // W > E + } else if (112.5 <= rotation && rotation < 157.5) { + return 0x2; // NW > SW + } else if (157.5 <= rotation && rotation < 202.5) { + return 0x4; // N > W + } else if (202.5 <= rotation && rotation < 247.5) { + return 0x6; // NE > NW + } else if (247.5 <= rotation && rotation < 292.5) { + return 0x8; // E > N + } else if (292.5 <= rotation && rotation < 337.5) { + return 0xA; // SE > NE + } else if (337.5 <= rotation && rotation < 360.0) { + return 0xC; // S > E + } else { + return null; + } + } + + public static boolean isInLiquid(Player player) { + + Location location = player.getLocation(); + + if(location.getBlock().getType() == Material.WATER + || location.getBlock().getType() == Material.STATIONARY_WATER + || location.getBlock().getType() == Material.LAVA + || location.getBlock().getType() == Material.STATIONARY_LAVA) { + return true; + } + return false; + } + + public static boolean isOnSolidBlocks(Player player) { + + Location location = player.getLocation(); + location.setY(location.getY() - 1); + + if(location.getBlock().getType() == Material.ACACIA_STAIRS || location.getBlock().getType() == Material.BIRCH_WOOD_STAIRS + || location.getBlock().getType() == Material.BRICK_STAIRS || location.getBlock().getType() == Material.COBBLESTONE_STAIRS + || location.getBlock().getType() == Material.DARK_OAK_STAIRS || location.getBlock().getType() == Material.JUNGLE_WOOD_STAIRS + || location.getBlock().getType() == Material.NETHER_BRICK_STAIRS || location.getBlock().getType() == Material.QUARTZ_STAIRS + || location.getBlock().getType() == Material.SANDSTONE_STAIRS || location.getBlock().getType() == Material.SMOOTH_STAIRS + || location.getBlock().getType() == Material.SPRUCE_WOOD_STAIRS || location.getBlock().getType() == Material.WOOD_STAIRS + || location.getBlock().getType() == Material.CHEST || location.getBlock().getType() == Material.TRAPPED_CHEST + || location.getBlock().getType() == Material.FENCE || location.getBlock().getType() == Material.IRON_FENCE + || location.getBlock().getType() == Material.NETHER_FENCE || location.getBlock().getType() == Material.FENCE_GATE + || location.getBlock().getType() == Material.SIGN_POST || location.getBlock().getType() == Material.WALL_SIGN + || location.getBlock().getType() == Material.COBBLE_WALL || location.getBlock().getType() == Material.ENCHANTMENT_TABLE + || location.getBlock().getType() == Material.ENDER_PORTAL_FRAME || location.getBlock().getType() == Material.ENDER_CHEST + || location.getBlock().getType() == Material.BREWING_STAND || location.getBlock().getType() == Material.CAULDRON + || location.getBlock().getType() == Material.HOPPER || location.getBlock().getType() == Material.ANVIL + || location.getBlock().getType() == Material.BED_BLOCK || location.getBlock().getType() == Material.SOUL_SAND + || location.getBlock().getType() == Material.STAINED_GLASS_PANE || location.getBlock().getType() == Material.THIN_GLASS + || location.getBlock().getType() == Material.CACTUS || location.getBlock().getType() == Material.DRAGON_EGG + || location.getBlock().getType() == Material.WEB) { + return false; + } + return true; + } + + public static boolean isUnderBlock(Player player) { + + Location location = player.getLocation(); + location.setY(location.getY() + 2.0); + + if (location.getBlock().getType() != Material.AIR) { + return true; + } + return false; + } + + public static boolean blocksNear(Player player) { + return blocksNear(player.getLocation()); + } + + public static boolean blocksNear(Location location) { + + boolean nearBlocks = false; + + for (Block block : getSurrounding(location.getBlock(), true)) { + if (block.getType() != Material.AIR) { + nearBlocks = true; + break; + } + } + + for (Block block : getSurrounding(location.getBlock(), false)) { + if (block.getType() != Material.AIR) { + nearBlocks = true; + break; + } + } + + location.setY(location.getY() - 0.5D); + + if (location.getBlock().getType() != Material.AIR) { + nearBlocks = true; + } + + if (isBlock(location.getBlock().getRelative(BlockFace.DOWN), new Material[] { Material.FENCE, Material.FENCE_GATE, Material.COBBLE_WALL, Material.LADDER })) { + nearBlocks = true; + } + + return nearBlocks; + } + + public static ArrayList getSurrounding(Block block, boolean diagonals) { + ArrayList blocks = new ArrayList(); + if (diagonals) { + for (int x = -1; x <= 1; x++) { + for (int y = -1; y <= 1; y++) { + for (int z = -1; z <= 1; z++) { + if ((x != 0) || (y != 0) || (z != 0)) { + blocks.add(block.getRelative(x, y, z)); + } + } + } + } + } else { + blocks.add(block.getRelative(BlockFace.UP)); + blocks.add(block.getRelative(BlockFace.DOWN)); + blocks.add(block.getRelative(BlockFace.NORTH)); + blocks.add(block.getRelative(BlockFace.SOUTH)); + blocks.add(block.getRelative(BlockFace.EAST)); + blocks.add(block.getRelative(BlockFace.WEST)); + } + return blocks; + } + + public static ArrayList getSurroundingXZ(Block block) { + ArrayList blocks = new ArrayList(); + blocks.add(block.getRelative(BlockFace.NORTH)); + blocks.add(block.getRelative(BlockFace.NORTH_EAST)); + blocks.add(block.getRelative(BlockFace.NORTH_WEST)); + blocks.add(block.getRelative(BlockFace.SOUTH)); + blocks.add(block.getRelative(BlockFace.SOUTH_EAST)); + blocks.add(block.getRelative(BlockFace.SOUTH_WEST)); + blocks.add(block.getRelative(BlockFace.EAST)); + blocks.add(block.getRelative(BlockFace.WEST)); + return blocks; + } + + public static boolean isBlock(Block block, Material[] materials) { + Material type = block.getType(); + for (Material m : materials) { + if (m == type) { + return true; + } + } + return false; + } + + public static double getHorizontalDistance(Location to, Location from) { + double x = Math.abs(Math.abs(to.getX()) - Math.abs(from.getX())); + double z = Math.abs(Math.abs(to.getZ()) - Math.abs(from.getZ())); + + return Math.sqrt(x * x + z * z); + } + + public static double getYDifference(Location to, Location from) { + return Math.abs(to.getY() - from.getY()); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/Color.java b/(OLD) Paik/src/secondlife/network/paik/utils/Color.java new file mode 100644 index 0000000..c16360a --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/Color.java @@ -0,0 +1,10 @@ +package secondlife.network.paik.utils; + +import org.bukkit.ChatColor; + +public class Color { + + public static String translate(String text) { + return ChatColor.translateAlternateColorCodes('&', text); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/DirectoryUtils.java b/(OLD) Paik/src/secondlife/network/paik/utils/DirectoryUtils.java new file mode 100644 index 0000000..659e213 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/DirectoryUtils.java @@ -0,0 +1,19 @@ +package secondlife.network.paik.utils; + +import java.io.File; + +import secondlife.network.paik.Paik; + +public class DirectoryUtils { + + public static void registerDirectory() { + if(!Paik.getInstance().getDataFolder().exists()) { + Paik.getInstance().getDataFolder().mkdir(); + } + + File logs = new File(Paik.getInstance().getDataFolder(), "logs"); + if(!logs.exists()) { + logs.mkdir(); + } + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/Handler.java b/(OLD) Paik/src/secondlife/network/paik/utils/Handler.java new file mode 100644 index 0000000..d9f7e03 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/Handler.java @@ -0,0 +1,13 @@ +package secondlife.network.paik.utils; + +import lombok.Getter; +import secondlife.network.paik.Paik; + +public class Handler { + + @Getter private Paik instance; + + public Handler(Paik instance) { + this.instance = instance; + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/LocationUtils.java b/(OLD) Paik/src/secondlife/network/paik/utils/LocationUtils.java new file mode 100644 index 0000000..d3fe5e3 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/LocationUtils.java @@ -0,0 +1,10 @@ +package secondlife.network.paik.utils; + +import org.bukkit.entity.Player; + +public class LocationUtils { + + public static String getLocation(Player player) { + return player.getWorld().getName() + ", " + player.getLocation().getBlockX() + ", " + player.getLocation().getBlockY() + ", " + player.getLocation().getBlockZ(); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/Message.java b/(OLD) Paik/src/secondlife/network/paik/utils/Message.java new file mode 100644 index 0000000..63ed349 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/Message.java @@ -0,0 +1,25 @@ +package secondlife.network.paik.utils; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; + +@SuppressWarnings("deprecation") +public class Message { + + public static String COMMANDS_FOR_PLAYER_USE_ONLY = Color.translate("&cSorry. For Player use only!"); + public static String COMMANDS_NO_PERMISSION_MESSAGE = Color.translate("&cNo Permission!"); + + public static void sendMessage(String message) { + for(Player online : Bukkit.getOnlinePlayers()) { + online.sendMessage(message); + } + } + + public static void sendMessage(String message, String permission) { + for(Player online : Bukkit.getOnlinePlayers()) { + if(online.hasPermission(permission)) { + online.sendMessage(message); + } + } + } +} \ No newline at end of file diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/PasteUtils.java b/(OLD) Paik/src/secondlife/network/paik/utils/PasteUtils.java new file mode 100644 index 0000000..0c0823b --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/PasteUtils.java @@ -0,0 +1,582 @@ +package secondlife.network.paik.utils; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.HashMap; +import java.util.Map; + +public class PasteUtils { + + private final static String POST_URL = "http://pastebin.com/api/api_post.php"; + private final static String USER_AGENT = "Mozilla/5.0"; + private static String developer_key = "Set your key there!"; + + private String code = ""; + private String fileName = ""; + private Expire expire; + private Visibility visibility; + private Language language; + + /** + * Create new paste + * + * @param code + * Text inside the paste + * @param fileName + * Paste text + * @param visibility + * Paste visibility + * @param expire + * Paste expire time + * @param language + * Paste language + */ + public PasteUtils(String code, String fileName, Visibility visibility, Expire expire, Language language) { + this.code = code; + this.fileName = fileName; + this.visibility = visibility; + this.expire = expire; + this.language = language; + } + + /** + * Upload the paste with all info into pastebin.com + * + * @return {@link PasteResult} + * @throws IOException + * @see {@link PasteResult} + */ + public PasteResult upload() throws IOException { + String response = ""; + URL url = new URL(POST_URL); + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + + conn.setRequestMethod("POST"); + conn.setRequestProperty("User-Agent", USER_AGENT); + conn.setRequestProperty("Accept-Language", "en-US,en;q=0.5"); + + conn.setDoOutput(true); + DataOutputStream wr = new DataOutputStream(conn.getOutputStream()); + wr.writeBytes(getURLParameters()); + wr.flush(); + wr.close(); + + BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); + String line; + while ((line = in.readLine()) != null) { + response += line; + } + in.close(); + if (response.contains("pastebin.com")) { + return new PasteResult("", response, true); + } + return new PasteResult(response, "", false); + } + + /** + * Get final url parameters + * + *
+ * + * POST URL: + * http://pastebin.com/api/api_post.php?{@link Paste#getURLParameters()} + * + * @return + */ + public String getURLParameters() { + String param = "api_option=paste" + "&api_dev_key=" + developer_key + "" + "&api_paste_private=" + visibility.id + + "" + "&api_paste_name=" + fileName + "" + "&api_paste_format=" + language.apiName + "" + + "&api_paste_code=" + code; + + if (expire != Expire.NEVER) { + param += "&api_expire_date=" + expire.apiName; + } + + return param; + } + + /** + * Set paste format + * + * @return + */ + public Language getLanguage() { + return language; + } + + /** + * Set paste format + * + * @param language + */ + public void setLanguage(Language language) { + this.language = language; + } + + /** + * Set visibility + * + * @return + */ + public Visibility getVisibility() { + return visibility; + } + + /** + * Set visibility + * + * @param visibility + */ + public void setVisibility(Visibility visibility) { + this.visibility = visibility; + } + + /** + * Get expire time + * + * @return + */ + public Expire getExpire() { + return expire; + } + + /** + * Set expire time + * + * @param expire + */ + public void setExpire(Expire expire) { + this.expire = expire; + } + + /** + * Get the paste name + * + * @return + */ + public String getFileName() { + return fileName; + } + + /** + * Set the paste name + * + * @param fileName + */ + public void setFileName(String fileName) { + this.fileName = fileName; + } + + /** + * Get the paste + * + * @return + */ + public String getCode() { + return code; + } + + /** + * Set the text in your paste + * + *
+ * + * Use: \n for line break + * + * @param code + */ + public void setCode(String code) { + this.code = code; + } + + /** + * Set the text in your paste + * + * @param code + * File to paste + * @throws IOException + */ + public void setCode(File code) throws IOException { + BufferedReader reader = new BufferedReader(new FileReader(code)); + String ln; + while ((ln = reader.readLine()) != null) { + this.code += ln + "\n"; + } + reader.close(); + } + + /** + * Set your static developer key + * + * @param developerKey + * Developer key generated there: http://pastebin.com/api (You + * have to login and then copy the text on "Your Unique Developer + * API Key") + */ + public static void setDeveloperKey(String developerKey) { + developer_key = developerKey; + } + + /** + * Paste Language + * + * @author rodel77 + */ + public enum Language { + CS("4cs"), ACME("6502acme"), KICKASS("6502kickass"), TASM("6502tasm"), ABAP("abap"), ACTIONSCRIPT( + "actionscript"), ACTIONSCRIPT3("actionscript3"), ADA("ada"), AIMMS("aimms"), ALGOL68("algol68"), APACHE( + "apache"), APPLESCRIPT("applescript"), APT_SOURCES("apt_sources"), ARM("arm"), ASM("asm"), ASP( + "asp"), ASYMPTOTE("asymptote"), AUTOCONF("autoconf"), AUTOHOTKEY("autohotkey"), AUTOIT( + "autoit"), AVISYNTH("avisynth"), AWK("awk"), BASCOMAVR("bascomavr"), BASH( + "bash"), BASIC4GL("basic4gl"), DOS("dos"), BIBTEX("bibtex"), BLITZBASIC( + "blitzbasic"), B3D("b3d"), BMX("bmx"), BNF("bnf"), BOO( + "boo"), BF("bf"), C("c"), C_WINAPI("c_winapi"), C_MAC( + "c_mac"), CIL("cil"), CSHARP("csharp"), CPP( + "cpp"), CPPWINAPI("cpp-winapi"), CPPQT( + "cpp-qt"), C_LOADRUNNER( + "c_loadrunner"), CADDCL( + "caddcl"), CADLISP( + "cadlisp"), CEYLON( + "ceylon"), CFDG( + "cfdg"), CHAISCRIPT( + "chaiscript"), CHAPEL( + "chapel"), CLOJURE( + "clojure"), KLONEC( + "klonec"), KLONECPP( + "klonecpp"), CMAKE( + "cmake"), COBOL( + "cobol"), COFFEESCRIPT( + "coffeescript"), CFM( + "cfm"), CSS( + "css"), CUESHEET( + "cuesheet"), D( + "d"), DART( + "dart"), DCL( + "dcl"), DCPU16( + "dcpu16"), DCS( + "dcs"), DELPHI( + "delphi"), OXYGENE( + "oxygene"), DIFF( + "diff"), DIV( + "div"), DOT( + "dot"), E( + "e"), EZT( + "ezt"), ECMASCRIPT( + "ecmascript"), EIFFEL( + "eiffel"), EMAIL( + "email"), EPC( + "epc"), ERLANG( + "erlang"), EUPHORIA( + "euphoria"), FSHARP( + "fsharp"), FALCON( + "falcon"), FILEMAKER( + "filemaker"), FO( + "fo"), F1( + "f1"), FORTRAN( + "fortran"), FREEBASIC( + "freebasic"), FREESWITCH( + "freeswitch"), GAMBAS( + "gambas"), GML( + "gml"), GDB( + "gdb"), GENERO( + "genero"), GENIE( + "genie"), GETTEXT( + "gettext"), GO( + "go"), GROOVY( + "groovy"), GWBASIC( + "gwbasic"), HASKELL( + "haskell"), HAXE( + "haxe"), HICEST( + "hicest"), HQ9PLUS( + "hq9plus"), HTML4STRICT( + "html4strict"), HTML5( + "html5"), ICON( + "icon"), IDL( + "idl"), INI( + "ini"), INNO( + "inno"), INTERCAL( + "intercal"), IO( + "io"), ISPFPANEL( + "ispfpanel"), J( + "j"), JAVA( + "java"), JAVA5( + "java5"), JAVASCRIPT( + "javascript"), JCL( + "jcl"), JQUERY( + "jquery"), JSON( + "json"), JULIA( + "julia"), KIXTART( + "kixtart"), KOTLIN( + "kotlin"), LATEX( + "latex"), LDIF( + "ldif"), LB( + "lb"), LSL2( + "lsl2"), LISP( + "lisp"), LLVM( + "llvm"), LOCOBASIC( + "locobasic"), LOGTALK( + "logtalk"), LOLCODE( + "lolcode"), LOTUSFORMULAS( + "lotusformulas"), LOTUSSCRIPT( + "lotusscript"), LSCRIPT( + "lscript"), LUA( + "lua"), M68K( + "m68k"), MAGIKSF( + "magiksf"), MAKE( + "make"), MAPBASIC( + "mapbasic"), MARKDOWN( + "markdown"), MATLAB( + "matlab"), MIRC( + "mirc"), MMIX( + "mmix"), MODULA2( + "modula2"), MODULA3( + "modula3"), EVPAC( + "68000devpac"), MPASM( + "mpasm"), MXML( + "mxml"), MYSQL( + "mysql"), NAGIOS( + "nagios"), NETREXX( + "netrexx"), NEWLISP( + "newlisp"), NGINX( + "nginx"), NIMROD( + "nimrod"), TEXT( + "text"), NSIS( + "nsis"), OBERON2( + "oberon2"), OBJECK( + "objeck"), OBJC( + "objc"), OCAMLBRIEF( + "ocaml-brief"), OCAML( + "ocaml"), OCTAVE( + "octave"), OOREXX( + "oorexx"), PF( + "pf"), GLSL( + "glsl"), OOBAS( + "oobas"), ORACLE11( + "oracle11"), ORACLE8( + "oracle8"), OZ( + "oz"), PARASAIL( + "parasail"), PARIGP( + "parigp"), PASCAL( + "pascal"), PAWN( + "pawn"), PCRE( + "pcre"), PER( + "per"), PERL( + "perl"), PERL6( + "perl6"), PHP( + "php"), PHPBRIEF( + "php-brief"), PIC16( + "pic16"), PIKE( + "pike"), PIXELBENDER( + "pixelbender"), PLI( + "pli"), PLSQL( + "plsql"), POSTGRESQL( + "postgresql"), POSTSCRIPT( + "postscript"), POVRAY( + "povray"), POWERSHELL( + "powershell"), POWERBUILDER( + "powerbuilder"), PROFTPD( + "proftpd"), PROGRESS( + "progress"), PROLOG( + "prolog"), PROPERTIES( + "properties"), PROVIDEX( + "providex"), PUPPET( + "puppet"), PUREBASIC( + "purebasic"), PYCON( + "pycon"), PYTHON( + "python"), PYS60( + "pys60"), Q( + "q"), QBASIC( + "qbasic"), QML( + "qml"), RSPLUS( + "rsplus"), RACKET( + "racket"), RAILS( + "rails"), RBS( + "rbs"), REBOL( + "rebol"), REG( + "reg"), REXX( + "rexx"), ROBOTS( + "robots"), RPMSPEC( + "rpmspec"), RUBY( + "ruby"), GNUPLOT( + "gnuplot"), RUST( + "rust"), SAS( + "sas"), SCALA( + "scala"), SCHEME( + "scheme"), SCILAB( + "scilab"), SCL( + "scl"), SDLBASIC( + "sdlbasic"), SMALLTALK( + "smalltalk"), SMARTY( + "smarty"), SPARK( + "spark"), SPARQL( + "sparql"), SQF( + "sqf"), SQL( + "sql"), STANDARDML( + "standardml"), STONESCRIPT( + "stonescript"), SCLANG( + "sclang"), SWIFT( + "swift"), SYSTEMVERILOG( + "systemverilog"), TSQL( + "tsql"), TCL( + "tcl"), TERATERM( + "teraterm"), THINBASIC( + "thinbasic"), TYPOSCRIPT( + "typoscript"), UNICON( + "unicon"), USCRIPT( + "uscript"), UPC( + "upc"), URBI( + "urbi"), VALA( + "vala"), VBNET( + "vbnet"), VBSCRIPT( + "vbscript"), VEDIT( + "vedit"), VERILOG( + "verilog"), VHDL( + "vhdl"), VIM( + "vim"), VISUALPROLOG( + "visualprolog"), VB( + "vb"), VISUALFOXPRO( + "visualfoxpro"), WHITESPACE( + "whitespace"), WHOIS( + "whois"), WINBATCH( + "winbatch"), XBASIC( + "xbasic"), XML( + "xml"), XORG_CONF( + "xorg_conf"), XPP( + "xpp"), YAML( + "yaml"), Z80( + "z80"), ZXBASIC( + "zxbasic"); + + private String apiName; + + private Language(String apiName) { + this.apiName = apiName; + } + + public String getAPIName() { + return apiName; + } + } + + /** + * Paste Visibility + * + * @author rodel77 + */ + public enum Visibility { + PUBLIC(0), UNLISTED(1), PRIVATE(2); + + private int id; + + private Visibility(int id) { + this.id = id; + } + + public int getID() { + return id; + } + } + + /** + * Paste expire + * + * @author rodel77 + */ + public enum Expire { + NEVER("N"), TEN_MINUTES("10M"), ONE_HOUR("1H"), ONE_DAY("1D"), ONE_WEEK("1W"), TWO_WEEKS("2W"), ONE_MONTH("1M"); + + private String apiName; + + private Expire(String apiName) { + this.apiName = apiName; + } + + public String getAPIName() { + return apiName; + } + } + + /** + * Paste Result + * + * @author rodel77 + */ + public class PasteResult { + private String errorMessage = ""; + private String pasteURL = ""; + private boolean valid = false; + + /** + * Create PasteResult (Only for internal API) + * + * @param errorMessage + * @param pasteURL + * @param valid + */ + public PasteResult(String errorMessage, String pasteURL, boolean valid) { + this.errorMessage = errorMessage; + this.pasteURL = pasteURL; + this.valid = valid; + } + + /** + * Get error message
+ * Note: First check {@link PasteResult#isValid()} + * + * @return + */ + public String getErrorMessage() { + return errorMessage; + } + + /** + * Get paste URL
+ * Note: First check {@link PasteResult#isValid()} + * + * @return + */ + public String getPasteURL() { + return pasteURL; + } + + /** + * Check if valid + * + * @return + */ + public boolean isValid() { + return valid; + } + + /** + * If valid return paste url otherwise error message + * + * @return + */ + @Override + public String toString() { + if (valid) { + return pasteURL; + } else { + return errorMessage; + } + } + } + + @Override + public String toString() { + Map vals = new HashMap<>(); + vals.put("code", code); + vals.put("name", fileName); + vals.put("expire", expire.name()); + vals.put("visibility", visibility.name()); + vals.put("language", language.name()); + return "Pastebin" + vals.toString(); + } +} \ No newline at end of file diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/PlayerUtils.java b/(OLD) Paik/src/secondlife/network/paik/utils/PlayerUtils.java new file mode 100644 index 0000000..7f95d69 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/PlayerUtils.java @@ -0,0 +1,13 @@ +package secondlife.network.paik.utils; + +import org.bukkit.entity.Player; + +public class PlayerUtils { + + public static boolean isPlayerBypassing(Player player) { + if(player.hasPermission("secondlife.staff")) { + return true; + } + return false; + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/ServerUtils.java b/(OLD) Paik/src/secondlife/network/paik/utils/ServerUtils.java new file mode 100644 index 0000000..bf234fa --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/ServerUtils.java @@ -0,0 +1,10 @@ +package secondlife.network.paik.utils; + +import org.bukkit.Bukkit; + +public class ServerUtils { + + public static boolean isServerLagging() { + return Bukkit.spigot().getTPS()[0] < 18.5; + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/file/ConfigFile.java b/(OLD) Paik/src/secondlife/network/paik/utils/file/ConfigFile.java new file mode 100644 index 0000000..880d1f7 --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/file/ConfigFile.java @@ -0,0 +1,92 @@ +package secondlife.network.paik.utils.file; + +import lombok.Getter; +import secondlife.network.paik.Paik; +import org.bukkit.ChatColor; +import org.bukkit.configuration.file.YamlConfiguration; +import secondlife.network.paik.utils.Handler; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +@Getter +public class ConfigFile extends Handler { + + public static File file; + public static YamlConfiguration configuration; + + public ConfigFile(Paik plugin) { + super(plugin); + + file = new File(plugin.getDataFolder(), "config.yml"); + + if(!file.exists()) { + plugin.saveResource("config.yml", false); + } + + configuration = YamlConfiguration.loadConfiguration(file); + } + + public static void load() { + file = new File(Paik.getInstance().getDataFolder(), "config.yml"); + + if(!file.exists()) { + Paik.getInstance().saveResource("config.yml", false); + } + + configuration = YamlConfiguration.loadConfiguration(file); + } + + public static void save() { + try { + configuration.save(file); + } catch(IOException e) { + e.printStackTrace(); + } + + } + + public static double getDouble(String path) { + if(configuration.contains(path)) { + return configuration.getDouble(path); + } + + return 0.0; + } + + public static int getInt(String path) { + if (configuration.contains(path)) { + return configuration.getInt(path); + } + return 0; + } + + public static boolean getBoolean(String path) { + return configuration.contains(path) && configuration.getBoolean(path); + } + + public static String getString(String path) { + if(configuration.contains(path)) { + return ChatColor.translateAlternateColorCodes('&', configuration.getString(path)); + } + + return "String at path: " + path + " not found!"; + } + + public static List getStringList(String path) { + if(configuration.contains(path)) { + ArrayList strings = new ArrayList(); + + for(String string : configuration.getStringList(path)) { + strings.add(ChatColor.translateAlternateColorCodes('&', string)); + } + + return strings; + } + + return Arrays.asList("String List at path: " + path + " not found!"); + } +} diff --git a/(OLD) Paik/src/secondlife/network/paik/utils/file/LogFile.java b/(OLD) Paik/src/secondlife/network/paik/utils/file/LogFile.java new file mode 100644 index 0000000..1da5cff --- /dev/null +++ b/(OLD) Paik/src/secondlife/network/paik/utils/file/LogFile.java @@ -0,0 +1,89 @@ +package secondlife.network.paik.utils.file; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.plugin.java.JavaPlugin; + +import secondlife.network.paik.Paik; + +public class LogFile { + + private File file; + private String name; + private List lines = new ArrayList(); + + public LogFile(JavaPlugin plugin, String path, String name) { + this.file = new File(Paik.getInstance().getDataFolder() + path, name + ".txt"); + try { + this.file.createNewFile(); + } catch (IOException e) { + } + this.name = name; + + readTxtFile(); + } + + public void clear() { + this.lines.clear(); + } + + public void addLine(String line) { + this.lines.add(line); + } + + public void write() { + try { + FileWriter fw = new FileWriter(this.file, false); + BufferedWriter bw = new BufferedWriter(fw); + for (String line : this.lines) { + bw.write(line); + bw.newLine(); + } + bw.close(); + fw.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public void readTxtFile() { + this.lines.clear(); + try { + FileReader fr = new FileReader(this.file); + BufferedReader br = new BufferedReader(fr); + String line; + while ((line = br.readLine()) != null) { + this.lines.add(line); + } + br.close(); + fr.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public String getName() { + return this.name; + } + + public String getText() { + String text = ""; + for (int i = 0; i < this.lines.size(); i++) { + String line = (String) this.lines.get(i); + + text = text + line + (this.lines.size() - 1 == i ? "" : "\n"); + } + return text; + } + + public List getLines() { + return this.lines; + } +} \ No newline at end of file diff --git a/Bungee/.classpath b/Bungee/.classpath new file mode 100644 index 0000000..5980f19 --- /dev/null +++ b/Bungee/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Bungee/.project b/Bungee/.project new file mode 100644 index 0000000..5b1701b --- /dev/null +++ b/Bungee/.project @@ -0,0 +1,17 @@ + + + SL - Bungee + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/Bungee/.settings/org.eclipse.jdt.core.prefs b/Bungee/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..3a21537 --- /dev/null +++ b/Bungee/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bungee/bin/META-INF/MANIFEST.MF b/Bungee/bin/META-INF/MANIFEST.MF new file mode 100644 index 0000000..4be0ab2 --- /dev/null +++ b/Bungee/bin/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: Bungee + diff --git a/Bungee/bin/config.yml b/Bungee/bin/config.yml new file mode 100644 index 0000000..63596f1 --- /dev/null +++ b/Bungee/bin/config.yml @@ -0,0 +1,13 @@ +whitelisted: false + +server_motd: "&5&lSecondLife Network" + +auto_message: + active_messages: + - msg1 + - msg2 + messages: + msg1: + message: "If you find a hacker kill him idiot!" + msg2: + message: "If you are staff kill your self because this is bullshit server!" \ No newline at end of file diff --git a/Bungee/bin/plugin.yml b/Bungee/bin/plugin.yml new file mode 100644 index 0000000..36c54a4 --- /dev/null +++ b/Bungee/bin/plugin.yml @@ -0,0 +1,4 @@ +name: Bungee +version: 1.0 +author: SecondLife Development Team +main: secondlife.network.bungee.Bungee \ No newline at end of file diff --git a/Bungee/bin/secondlife/network/bungee/Bungee$1.class b/Bungee/bin/secondlife/network/bungee/Bungee$1.class new file mode 100644 index 0000000..33015e7 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/Bungee$1.class differ diff --git a/Bungee/bin/secondlife/network/bungee/Bungee$2.class b/Bungee/bin/secondlife/network/bungee/Bungee$2.class new file mode 100644 index 0000000..30550b9 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/Bungee$2.class differ diff --git a/Bungee/bin/secondlife/network/bungee/Bungee$3.class b/Bungee/bin/secondlife/network/bungee/Bungee$3.class new file mode 100644 index 0000000..881cb3c Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/Bungee$3.class differ diff --git a/Bungee/bin/secondlife/network/bungee/Bungee.class b/Bungee/bin/secondlife/network/bungee/Bungee.class new file mode 100644 index 0000000..6764064 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/Bungee.class differ diff --git a/Bungee/bin/secondlife/network/bungee/antibot/AntiBotUtils.class b/Bungee/bin/secondlife/network/bungee/antibot/AntiBotUtils.class new file mode 100644 index 0000000..b87c343 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/antibot/AntiBotUtils.class differ diff --git a/Bungee/bin/secondlife/network/bungee/antibot/BotAttack$1.class b/Bungee/bin/secondlife/network/bungee/antibot/BotAttack$1.class new file mode 100644 index 0000000..44163a1 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/antibot/BotAttack$1.class differ diff --git a/Bungee/bin/secondlife/network/bungee/antibot/BotAttack.class b/Bungee/bin/secondlife/network/bungee/antibot/BotAttack.class new file mode 100644 index 0000000..f1f57f5 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/antibot/BotAttack.class differ diff --git a/Bungee/bin/secondlife/network/bungee/antibot/BotBoth.class b/Bungee/bin/secondlife/network/bungee/antibot/BotBoth.class new file mode 100644 index 0000000..1562764 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/antibot/BotBoth.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/ABNatureCommand.class b/Bungee/bin/secondlife/network/bungee/commands/ABNatureCommand.class new file mode 100644 index 0000000..a771925 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/ABNatureCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/ABVisualCommand.class b/Bungee/bin/secondlife/network/bungee/commands/ABVisualCommand.class new file mode 100644 index 0000000..a13c7ae Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/ABVisualCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/GListCommand.class b/Bungee/bin/secondlife/network/bungee/commands/GListCommand.class new file mode 100644 index 0000000..1d91687 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/GListCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/HubCommand.class b/Bungee/bin/secondlife/network/bungee/commands/HubCommand.class new file mode 100644 index 0000000..131583a Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/HubCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/JoinCommand.class b/Bungee/bin/secondlife/network/bungee/commands/JoinCommand.class new file mode 100644 index 0000000..e88f40b Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/JoinCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/MaintenanceCommand.class b/Bungee/bin/secondlife/network/bungee/commands/MaintenanceCommand.class new file mode 100644 index 0000000..3c29451 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/MaintenanceCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/MotdCommand.class b/Bungee/bin/secondlife/network/bungee/commands/MotdCommand.class new file mode 100644 index 0000000..20e88b9 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/MotdCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/ReloadCommand.class b/Bungee/bin/secondlife/network/bungee/commands/ReloadCommand.class new file mode 100644 index 0000000..b1df7aa Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/ReloadCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/ReportCommand.class b/Bungee/bin/secondlife/network/bungee/commands/ReportCommand.class new file mode 100644 index 0000000..d13051d Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/ReportCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/RequestCommand.class b/Bungee/bin/secondlife/network/bungee/commands/RequestCommand.class new file mode 100644 index 0000000..21c9438 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/RequestCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/SilentCommand.class b/Bungee/bin/secondlife/network/bungee/commands/SilentCommand.class new file mode 100644 index 0000000..9c25bc7 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/SilentCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/StaffChatCommand.class b/Bungee/bin/secondlife/network/bungee/commands/StaffChatCommand.class new file mode 100644 index 0000000..f1b21ea Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/StaffChatCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/commands/StaffListCommand.class b/Bungee/bin/secondlife/network/bungee/commands/StaffListCommand.class new file mode 100644 index 0000000..bf11759 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/commands/StaffListCommand.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/AnnounceHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/AnnounceHandler.class new file mode 100644 index 0000000..1ffcea6 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/AnnounceHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/AntiBotHandler$1.class b/Bungee/bin/secondlife/network/bungee/handlers/AntiBotHandler$1.class new file mode 100644 index 0000000..b673f6e Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/AntiBotHandler$1.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/AntiBotHandler$2.class b/Bungee/bin/secondlife/network/bungee/handlers/AntiBotHandler$2.class new file mode 100644 index 0000000..96911e1 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/AntiBotHandler$2.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/AntiBotHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/AntiBotHandler.class new file mode 100644 index 0000000..efcb574 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/AntiBotHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/AutoMessageHandler$1.class b/Bungee/bin/secondlife/network/bungee/handlers/AutoMessageHandler$1.class new file mode 100644 index 0000000..a5e3d29 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/AutoMessageHandler$1.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/AutoMessageHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/AutoMessageHandler.class new file mode 100644 index 0000000..4904698 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/AutoMessageHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/MaintenanceHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/MaintenanceHandler.class new file mode 100644 index 0000000..6bb6cb1 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/MaintenanceHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/MotdHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/MotdHandler.class new file mode 100644 index 0000000..61ee8a3 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/MotdHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/PlayerHandler$1.class b/Bungee/bin/secondlife/network/bungee/handlers/PlayerHandler$1.class new file mode 100644 index 0000000..6aa3ea7 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/PlayerHandler$1.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/PlayerHandler$2.class b/Bungee/bin/secondlife/network/bungee/handlers/PlayerHandler$2.class new file mode 100644 index 0000000..3cafb15 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/PlayerHandler$2.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/PlayerHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/PlayerHandler.class new file mode 100644 index 0000000..92feec4 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/PlayerHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/PluginMessageHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/PluginMessageHandler.class new file mode 100644 index 0000000..ab32d59 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/PluginMessageHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/ReportHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/ReportHandler.class new file mode 100644 index 0000000..154a5c8 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/ReportHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/RequestHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/RequestHandler.class new file mode 100644 index 0000000..3468914 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/RequestHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/SilentHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/SilentHandler.class new file mode 100644 index 0000000..f166393 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/SilentHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/handlers/StaffChatHandler.class b/Bungee/bin/secondlife/network/bungee/handlers/StaffChatHandler.class new file mode 100644 index 0000000..b622adf Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/handlers/StaffChatHandler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/utils/Color.class b/Bungee/bin/secondlife/network/bungee/utils/Color.class new file mode 100644 index 0000000..32f888b Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/utils/Color.class differ diff --git a/Bungee/bin/secondlife/network/bungee/utils/Handler.class b/Bungee/bin/secondlife/network/bungee/utils/Handler.class new file mode 100644 index 0000000..888238a Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/utils/Handler.class differ diff --git a/Bungee/bin/secondlife/network/bungee/utils/Message.class b/Bungee/bin/secondlife/network/bungee/utils/Message.class new file mode 100644 index 0000000..77a16ee Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/utils/Message.class differ diff --git a/Bungee/bin/secondlife/network/bungee/utils/NumberUtils.class b/Bungee/bin/secondlife/network/bungee/utils/NumberUtils.class new file mode 100644 index 0000000..5ce4b53 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/utils/NumberUtils.class differ diff --git a/Bungee/bin/secondlife/network/bungee/utils/StringUtils.class b/Bungee/bin/secondlife/network/bungee/utils/StringUtils.class new file mode 100644 index 0000000..30f9561 Binary files /dev/null and b/Bungee/bin/secondlife/network/bungee/utils/StringUtils.class differ diff --git a/Bungee/out/production/Bungee/config.yml b/Bungee/out/production/Bungee/config.yml new file mode 100644 index 0000000..63596f1 --- /dev/null +++ b/Bungee/out/production/Bungee/config.yml @@ -0,0 +1,13 @@ +whitelisted: false + +server_motd: "&5&lSecondLife Network" + +auto_message: + active_messages: + - msg1 + - msg2 + messages: + msg1: + message: "If you find a hacker kill him idiot!" + msg2: + message: "If you are staff kill your self because this is bullshit server!" \ No newline at end of file diff --git a/Bungee/out/production/Bungee/plugin.yml b/Bungee/out/production/Bungee/plugin.yml new file mode 100644 index 0000000..36c54a4 --- /dev/null +++ b/Bungee/out/production/Bungee/plugin.yml @@ -0,0 +1,4 @@ +name: Bungee +version: 1.0 +author: SecondLife Development Team +main: secondlife.network.bungee.Bungee \ No newline at end of file diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee$1.class b/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee$1.class new file mode 100644 index 0000000..33015e7 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee$1.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee$2.class b/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee$2.class new file mode 100644 index 0000000..30550b9 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee$2.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee$3.class b/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee$3.class new file mode 100644 index 0000000..881cb3c Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee$3.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee.class b/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee.class new file mode 100644 index 0000000..5c599f3 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/Bungee.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/AntiBotUtils.class b/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/AntiBotUtils.class new file mode 100644 index 0000000..b87c343 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/AntiBotUtils.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/BotAttack$1.class b/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/BotAttack$1.class new file mode 100644 index 0000000..44163a1 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/BotAttack$1.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/BotAttack.class b/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/BotAttack.class new file mode 100644 index 0000000..f1f57f5 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/BotAttack.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/BotBoth.class b/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/BotBoth.class new file mode 100644 index 0000000..1562764 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/antibot/BotBoth.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ABNatureCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ABNatureCommand.class new file mode 100644 index 0000000..a771925 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ABNatureCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ABVisualCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ABVisualCommand.class new file mode 100644 index 0000000..59781d1 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ABVisualCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/GListCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/GListCommand.class new file mode 100644 index 0000000..1d91687 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/GListCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/HubCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/HubCommand.class new file mode 100644 index 0000000..131583a Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/HubCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/JoinCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/JoinCommand.class new file mode 100644 index 0000000..72dcf4f Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/JoinCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/MaintenanceCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/MaintenanceCommand.class new file mode 100644 index 0000000..3c29451 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/MaintenanceCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/MotdCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/MotdCommand.class new file mode 100644 index 0000000..20e88b9 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/MotdCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ReloadCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ReloadCommand.class new file mode 100644 index 0000000..b1df7aa Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ReloadCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ReportCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ReportCommand.class new file mode 100644 index 0000000..13f19f5 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/ReportCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/RequestCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/RequestCommand.class new file mode 100644 index 0000000..9d3a88e Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/RequestCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/SilentCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/SilentCommand.class new file mode 100644 index 0000000..2400bbb Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/SilentCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/StaffChatCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/StaffChatCommand.class new file mode 100644 index 0000000..c49ae34 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/StaffChatCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/commands/StaffListCommand.class b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/StaffListCommand.class new file mode 100644 index 0000000..bf11759 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/commands/StaffListCommand.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AnnounceHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AnnounceHandler.class new file mode 100644 index 0000000..2ed615f Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AnnounceHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AntiBotHandler$1.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AntiBotHandler$1.class new file mode 100644 index 0000000..b673f6e Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AntiBotHandler$1.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AntiBotHandler$2.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AntiBotHandler$2.class new file mode 100644 index 0000000..96911e1 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AntiBotHandler$2.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AntiBotHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AntiBotHandler.class new file mode 100644 index 0000000..efcb574 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AntiBotHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AutoMessageHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AutoMessageHandler.class new file mode 100644 index 0000000..441316c Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/AutoMessageHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/MaintenanceHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/MaintenanceHandler.class new file mode 100644 index 0000000..6bb6cb1 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/MaintenanceHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/MotdHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/MotdHandler.class new file mode 100644 index 0000000..61ee8a3 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/MotdHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PlayerHandler$1.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PlayerHandler$1.class new file mode 100644 index 0000000..9092c9a Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PlayerHandler$1.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PlayerHandler$2.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PlayerHandler$2.class new file mode 100644 index 0000000..f486e37 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PlayerHandler$2.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PlayerHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PlayerHandler.class new file mode 100644 index 0000000..143c2a4 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PlayerHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PluginMessageHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PluginMessageHandler.class new file mode 100644 index 0000000..3f86183 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/PluginMessageHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/ReportHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/ReportHandler.class new file mode 100644 index 0000000..154a5c8 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/ReportHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/RequestHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/RequestHandler.class new file mode 100644 index 0000000..3468914 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/RequestHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/SilentHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/SilentHandler.class new file mode 100644 index 0000000..f166393 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/SilentHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/StaffChatHandler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/StaffChatHandler.class new file mode 100644 index 0000000..b622adf Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/handlers/StaffChatHandler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/utils/Color.class b/Bungee/out/production/Bungee/secondlife/network/bungee/utils/Color.class new file mode 100644 index 0000000..32f888b Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/utils/Color.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/utils/Handler.class b/Bungee/out/production/Bungee/secondlife/network/bungee/utils/Handler.class new file mode 100644 index 0000000..888238a Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/utils/Handler.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/utils/Message.class b/Bungee/out/production/Bungee/secondlife/network/bungee/utils/Message.class new file mode 100644 index 0000000..77a16ee Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/utils/Message.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/utils/NumberUtils.class b/Bungee/out/production/Bungee/secondlife/network/bungee/utils/NumberUtils.class new file mode 100644 index 0000000..5ce4b53 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/utils/NumberUtils.class differ diff --git a/Bungee/out/production/Bungee/secondlife/network/bungee/utils/StringUtils.class b/Bungee/out/production/Bungee/secondlife/network/bungee/utils/StringUtils.class new file mode 100644 index 0000000..30f9561 Binary files /dev/null and b/Bungee/out/production/Bungee/secondlife/network/bungee/utils/StringUtils.class differ diff --git a/Bungee/out/production/BungeeCore/META-INF/MANIFEST.MF b/Bungee/out/production/BungeeCore/META-INF/MANIFEST.MF new file mode 100644 index 0000000..4be0ab2 --- /dev/null +++ b/Bungee/out/production/BungeeCore/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: Bungee + diff --git a/Bungee/out/production/BungeeCore/config.yml b/Bungee/out/production/BungeeCore/config.yml new file mode 100644 index 0000000..63596f1 --- /dev/null +++ b/Bungee/out/production/BungeeCore/config.yml @@ -0,0 +1,13 @@ +whitelisted: false + +server_motd: "&5&lSecondLife Network" + +auto_message: + active_messages: + - msg1 + - msg2 + messages: + msg1: + message: "If you find a hacker kill him idiot!" + msg2: + message: "If you are staff kill your self because this is bullshit server!" \ No newline at end of file diff --git a/Bungee/out/production/BungeeCore/plugin.yml b/Bungee/out/production/BungeeCore/plugin.yml new file mode 100644 index 0000000..36c54a4 --- /dev/null +++ b/Bungee/out/production/BungeeCore/plugin.yml @@ -0,0 +1,4 @@ +name: Bungee +version: 1.0 +author: SecondLife Development Team +main: secondlife.network.bungee.Bungee \ No newline at end of file diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee$1.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee$1.class new file mode 100644 index 0000000..33015e7 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee$1.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee$2.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee$2.class new file mode 100644 index 0000000..30550b9 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee$2.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee$3.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee$3.class new file mode 100644 index 0000000..881cb3c Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee$3.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee.class new file mode 100644 index 0000000..6764064 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/Bungee.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/AntiBotUtils.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/AntiBotUtils.class new file mode 100644 index 0000000..b87c343 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/AntiBotUtils.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/BotAttack$1.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/BotAttack$1.class new file mode 100644 index 0000000..44163a1 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/BotAttack$1.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/BotAttack.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/BotAttack.class new file mode 100644 index 0000000..f1f57f5 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/BotAttack.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/BotBoth.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/BotBoth.class new file mode 100644 index 0000000..1562764 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/antibot/BotBoth.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ABNatureCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ABNatureCommand.class new file mode 100644 index 0000000..a771925 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ABNatureCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ABVisualCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ABVisualCommand.class new file mode 100644 index 0000000..59781d1 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ABVisualCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/GListCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/GListCommand.class new file mode 100644 index 0000000..1d91687 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/GListCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/HubCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/HubCommand.class new file mode 100644 index 0000000..131583a Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/HubCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/JoinCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/JoinCommand.class new file mode 100644 index 0000000..e88f40b Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/JoinCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/MaintenanceCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/MaintenanceCommand.class new file mode 100644 index 0000000..3c29451 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/MaintenanceCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/MotdCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/MotdCommand.class new file mode 100644 index 0000000..20e88b9 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/MotdCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ReloadCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ReloadCommand.class new file mode 100644 index 0000000..b1df7aa Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ReloadCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ReportCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ReportCommand.class new file mode 100644 index 0000000..13f19f5 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/ReportCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/RequestCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/RequestCommand.class new file mode 100644 index 0000000..21c9438 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/RequestCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/SilentCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/SilentCommand.class new file mode 100644 index 0000000..9c25bc7 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/SilentCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/StaffChatCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/StaffChatCommand.class new file mode 100644 index 0000000..f1b21ea Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/StaffChatCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/StaffListCommand.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/StaffListCommand.class new file mode 100644 index 0000000..bf11759 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/commands/StaffListCommand.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AnnounceHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AnnounceHandler.class new file mode 100644 index 0000000..1ffcea6 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AnnounceHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AntiBotHandler$1.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AntiBotHandler$1.class new file mode 100644 index 0000000..b673f6e Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AntiBotHandler$1.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AntiBotHandler$2.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AntiBotHandler$2.class new file mode 100644 index 0000000..96911e1 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AntiBotHandler$2.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AntiBotHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AntiBotHandler.class new file mode 100644 index 0000000..efcb574 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AntiBotHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AutoMessageHandler$1.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AutoMessageHandler$1.class new file mode 100644 index 0000000..a5e3d29 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AutoMessageHandler$1.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AutoMessageHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AutoMessageHandler.class new file mode 100644 index 0000000..4904698 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/AutoMessageHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/MaintenanceHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/MaintenanceHandler.class new file mode 100644 index 0000000..6bb6cb1 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/MaintenanceHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/MotdHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/MotdHandler.class new file mode 100644 index 0000000..61ee8a3 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/MotdHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PlayerHandler$1.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PlayerHandler$1.class new file mode 100644 index 0000000..9092c9a Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PlayerHandler$1.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PlayerHandler$2.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PlayerHandler$2.class new file mode 100644 index 0000000..f486e37 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PlayerHandler$2.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PlayerHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PlayerHandler.class new file mode 100644 index 0000000..4a2ede5 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PlayerHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PluginMessageHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PluginMessageHandler.class new file mode 100644 index 0000000..ab32d59 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/PluginMessageHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/ReportHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/ReportHandler.class new file mode 100644 index 0000000..154a5c8 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/ReportHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/RequestHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/RequestHandler.class new file mode 100644 index 0000000..3468914 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/RequestHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/SilentHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/SilentHandler.class new file mode 100644 index 0000000..f166393 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/SilentHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/StaffChatHandler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/StaffChatHandler.class new file mode 100644 index 0000000..b622adf Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/handlers/StaffChatHandler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/Color.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/Color.class new file mode 100644 index 0000000..32f888b Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/Color.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/Handler.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/Handler.class new file mode 100644 index 0000000..888238a Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/Handler.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/Message.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/Message.class new file mode 100644 index 0000000..77a16ee Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/Message.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/NumberUtils.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/NumberUtils.class new file mode 100644 index 0000000..5ce4b53 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/NumberUtils.class differ diff --git a/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/StringUtils.class b/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/StringUtils.class new file mode 100644 index 0000000..30f9561 Binary files /dev/null and b/Bungee/out/production/BungeeCore/secondlife/network/bungee/utils/StringUtils.class differ diff --git a/Bungee/src/META-INF/MANIFEST.MF b/Bungee/src/META-INF/MANIFEST.MF new file mode 100644 index 0000000..4be0ab2 --- /dev/null +++ b/Bungee/src/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: Bungee + diff --git a/Bungee/src/config.yml b/Bungee/src/config.yml new file mode 100644 index 0000000..63596f1 --- /dev/null +++ b/Bungee/src/config.yml @@ -0,0 +1,13 @@ +whitelisted: false + +server_motd: "&5&lSecondLife Network" + +auto_message: + active_messages: + - msg1 + - msg2 + messages: + msg1: + message: "If you find a hacker kill him idiot!" + msg2: + message: "If you are staff kill your self because this is bullshit server!" \ No newline at end of file diff --git a/Bungee/src/plugin.yml b/Bungee/src/plugin.yml new file mode 100644 index 0000000..36c54a4 --- /dev/null +++ b/Bungee/src/plugin.yml @@ -0,0 +1,4 @@ +name: Bungee +version: 1.0 +author: SecondLife Development Team +main: secondlife.network.bungee.Bungee \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/Bungee.java b/Bungee/src/secondlife/network/bungee/Bungee.java new file mode 100644 index 0000000..410a4cf --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/Bungee.java @@ -0,0 +1,151 @@ +package secondlife.network.bungee; + +import lombok.Getter; +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.plugin.Plugin; +import net.md_5.bungee.config.Configuration; +import net.md_5.bungee.config.ConfigurationProvider; +import net.md_5.bungee.config.YamlConfiguration; +import secondlife.network.bungee.antibot.BotBoth; +import secondlife.network.bungee.commands.*; +import secondlife.network.bungee.handlers.*; +import secondlife.network.bungee.utils.Handler; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.CopyOption; +import java.nio.file.Files; +import java.util.concurrent.TimeUnit; + +public class Bungee extends Plugin { + + @Getter public static Bungee instance; + + public static String incomingBungeeBroadcastChannel = "BungeeBroadcast"; + public static String incomingAnnounceChannel = "Announce"; + public static String incomingFilterChannel = "Filter"; + public static String incomingCommandChannel = "Command"; + public static String incomingBanChannel = "AutoBan"; + public static String incomingAlertsChannel = "Alerts"; + public static String incomingAuthChannel = "Auth"; + public static String incomingPermissionsChannel = "Permissions"; + public static String outgoingPremiumChannel = "Premium"; + + public static Configuration configuration; + + @Override + public void onEnable() { + instance = this; + + loadConfig(); + + BotBoth.load(this.getDataFolder()); + + setupBoth(); + clearBots(); + + new AnnounceHandler(this); + new AutoMessageHandler(this); + new MaintenanceHandler(this); + new AntiBotHandler(this); + new MotdHandler(this); + new PlayerHandler(this); + new PluginMessageHandler(this); + new ReportHandler(this); + new RequestHandler(this); + new SilentHandler(this); + new StaffChatHandler(this); + + ProxyServer.getInstance().getPluginManager().registerCommand(this, new ABNatureCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new ABVisualCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new GListCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new HubCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new JoinCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new MaintenanceCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new MotdCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new ReloadCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new ReportCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new RequestCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new SilentCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new StaffChatCommand()); + ProxyServer.getInstance().getPluginManager().registerCommand(this, new StaffListCommand()); + + ProxyServer.getInstance().registerChannel(incomingBungeeBroadcastChannel); + ProxyServer.getInstance().registerChannel(incomingAnnounceChannel); + ProxyServer.getInstance().registerChannel(incomingFilterChannel); + ProxyServer.getInstance().registerChannel(incomingCommandChannel); + ProxyServer.getInstance().registerChannel(incomingBanChannel); + ProxyServer.getInstance().registerChannel(incomingAlertsChannel); + ProxyServer.getInstance().registerChannel(incomingAuthChannel); + ProxyServer.getInstance().registerChannel(incomingPermissionsChannel); + ProxyServer.getInstance().registerChannel(outgoingPremiumChannel); + } + + @Override + public void onDisable() { + Handler.clear(); + } + + private void loadConfig() { + if(!this.getDataFolder().exists()) this.getDataFolder().mkdir(); + + File file = new File(this.getDataFolder(), "config.yml"); + + if(!file.exists()) { + try(InputStream in = this.getResourceAsStream("config.yml")) { + Files.copy(in, file.toPath(), new CopyOption[0]); + } catch(IOException e) { + e.printStackTrace(); + } + } try { + configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(this.getDataFolder(), "config.yml")); + } catch(IOException e) { + e.printStackTrace(); + } + } + + public void saveConfig() { + try { + ConfigurationProvider.getProvider(YamlConfiguration.class).save(configuration, new File(this.getDataFolder(), "config.yml")); + } catch(IOException e) { + throw new RuntimeException("Unable to save configuration", e); + } + } + + public void reloadConfig() { + try { + configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(this.getDataFolder(), "config.yml")); + } catch(IOException e) { + throw new RuntimeException("Unable to load configuration", e); + } + } + + + public void clearBots() { + this.getProxy().getScheduler().schedule(this, new Runnable() { + public void run() { + BotBoth.attacks.clear(); + BotBoth.pings.clear(); + } + }, 1L, 1L, TimeUnit.MINUTES); + } + + public void setupBoth() { + this.getProxy().getScheduler().schedule(this, new Runnable() { + public void run() { + BotBoth.joins = 0; + } + }, 0L, 1L, TimeUnit.SECONDS); + + this.getProxy().getScheduler().runAsync(this, new Runnable() { + public void run() { + try { + Thread.sleep(AntiBotHandler.startup_time * 1000); + } catch (InterruptedException e) {} + + AntiBotHandler.startup_multiplier = 1; + } + }); + } +} diff --git a/Bungee/src/secondlife/network/bungee/antibot/AntiBotUtils.java b/Bungee/src/secondlife/network/bungee/antibot/AntiBotUtils.java new file mode 100644 index 0000000..c9694f3 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/antibot/AntiBotUtils.java @@ -0,0 +1,17 @@ +package secondlife.network.bungee.antibot; + +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import secondlife.network.bungee.handlers.AntiBotHandler; +import secondlife.network.bungee.utils.Color; + +public class AntiBotUtils { + + public static void sendMessage(String message) { + for(ProxiedPlayer staff : ProxyServer.getInstance().getPlayers()) { + if(staff.hasPermission("secondlife.op") && !AntiBotHandler.ignore.contains(staff)) { + staff.sendMessage(Color.translate(message)); + } + } + } +} diff --git a/Bungee/src/secondlife/network/bungee/antibot/BotAttack.java b/Bungee/src/secondlife/network/bungee/antibot/BotAttack.java new file mode 100644 index 0000000..00ff847 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/antibot/BotAttack.java @@ -0,0 +1,98 @@ +package secondlife.network.bungee.antibot; + +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +public class BotAttack { + + private boolean pinging; + private boolean nevv; + private String nicktype; + private int length; + private int bots; + private int legit; + private long name; + + public BotAttack(long name, boolean pinging, boolean nevv, String nicktype, int length) { + this.length = 0; + this.bots = 0; + this.legit = 0; + this.pinging = pinging; + this.nevv = nevv; + this.nicktype = nicktype; + this.name = name; + this.length = length; + + ExecutorService exe = Executors.newCachedThreadPool(); + + exe.submit(new Runnable() { + public void run() { + while(true) { + try { + Thread.sleep(1000L); + } catch (InterruptedException e) {} + + if(BotAttack.this.bots == 0) { + BotAttack this$0 = BotAttack.this; + BotAttack.access1(this$0, this$0.legit + 1); + + if(BotAttack.this.legit > BotBoth.timeout) break; + + continue; + } else { + BotAttack.access2(BotAttack.this, 0); + BotAttack.access1(BotAttack.this, 0); + } + } + + BotBoth.cancelAttack(name); + } + }); + } + + private String getNickType(String name) { + if(name.length() == this.length) return "length"; + + if(BotBoth.nicks.contains(name)) { + return "nicks"; + } + + return "null"; + } + + public long getName() { + return this.name; + } + + public boolean handleLogin(boolean b, String name, String IP) { + if(this.pinging) { + if(this.nevv == BotBoth.isNew(name) && this.nicktype.equals(this.getNickType(name))) { + if(b) { + BotBoth.log(name, IP); + + ++this.bots; + } + + return true; + } + } else if(this.pinging == BotBoth.pingedServer(IP) && this.nevv == BotBoth.isNew(name) && this.nicktype.equals(this.getNickType(name))) { + if(b) { + BotBoth.log(name, IP); + + ++this.bots; + } + + return true; + } + + return false; + } + + public static void access1(BotAttack attack, int legit) { + attack.legit = legit; + } + + public static void access2(BotAttack attack, int bots) { + attack.bots = bots; + } +} diff --git a/Bungee/src/secondlife/network/bungee/antibot/BotBoth.java b/Bungee/src/secondlife/network/bungee/antibot/BotBoth.java new file mode 100644 index 0000000..c312ad9 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/antibot/BotBoth.java @@ -0,0 +1,253 @@ +package secondlife.network.bungee.antibot; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.net.URL; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.ArrayList; +import java.util.List; + +public class BotBoth { + + public static ArrayList starts = new ArrayList(); + public static ArrayList ends = new ArrayList(); + public static ArrayList nicks = new ArrayList(); + public static ArrayList pings = new ArrayList(); + public static ArrayList players = new ArrayList(); + public static ArrayList attacks = new ArrayList(); + + public static File f; + public static File Log; + public static File nickfile; + public static int joins; + public static int timeout; + + public static boolean isFakeNickname(String name) { + if(starts(name) != null) { + name = name.substring(starts(name).length()); + + if(starts(name) != null) { + name = name.substring(starts(name).length()); + + for(String s : BotBoth.ends) { + if(name.equals(s)) return true; + } + } + } + + return false; + } + + private static String starts(String what) { + for(String s : BotBoth.starts) { + if(what.startsWith(s)) return s; + } + + return null; + } + + public static String getTime() { + LocalTime lt = LocalTime.now(); + String h; + + if(lt.getHour() < 10) { + h = "0" + lt.getHour(); + } else { + h = new StringBuilder(String.valueOf(lt.getHour())).toString(); + } + + String m; + + if(lt.getMinute() < 10) { + m = "0" + lt.getMinute(); + } else { + m = new StringBuilder(String.valueOf(lt.getMinute())).toString(); + } + + String s; + + if(lt.getSecond() < 10) { + s = "0" + lt.getSecond(); + } else { + s = new StringBuilder(String.valueOf(lt.getSecond())).toString(); + } + + String t = String.valueOf(String.valueOf(h)) + ":" + m + ":" + s; + + return t; + } + + public static void log(String name, String IP) { + try { + BufferedWriter buf = new BufferedWriter(new FileWriter(BotBoth.Log, true)); + LocalDate date = LocalDate.now(); + + buf.write(String.valueOf(String.valueOf(date.getDayOfMonth())) + "." + date.getMonth() + "." + date.getYear() + " " + getTime() + " - " + name + " - " + IP); + buf.write(System.getProperty("line.separator")); + buf.close(); + } catch (Exception e) {} + } + + public static void load(File file) { + file.mkdirs(); + + BotBoth.f = new File(file, "players.yml"); + BotBoth.Log = new File(file, "Connections.log"); + BotBoth.nickfile = new File(file, "nicks.txt"); + + if(!BotBoth.Log.exists()) { + try { + BotBoth.Log.createNewFile(); + } catch (Exception e) {} + } + + if(!BotBoth.f.exists()) { + try { + BotBoth.f.createNewFile(); + } catch (Exception e) {} + } try { + URL website = new URL("http://craftplex.eu/download/nicks.txt"); + ReadableByteChannel rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream("plugins/AntiBot/nicks.txt"); + fos.getChannel().transferFrom(rbc, 0L, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } catch (Exception ex3) {} + + try { + BufferedReader br = new BufferedReader(new FileReader(BotBoth.nickfile)); + + while(true) { + String line = br.readLine(); + + if(line == null || line.isEmpty()) break; + + BotBoth.nicks.add(line); + } + + br.close(); + } catch (Exception e) {} + + try { + BufferedReader br = new BufferedReader(new FileReader(BotBoth.f)); + + while(true) { + String line = br.readLine(); + + if(line == null || line.isEmpty()) break; + + BotBoth.players.add(line); + } + + br.close(); + } catch (Exception ex5) {} + + BotBoth.nickfile.delete(); + + BotBoth.starts.add("_Itz"); + BotBoth.starts.add("Actor"); + BotBoth.starts.add("Beach"); + BotBoth.starts.add("Build"); + BotBoth.starts.add("Craft"); + BotBoth.starts.add("Crazy"); + BotBoth.starts.add("Elder"); + BotBoth.starts.add("Games"); + BotBoth.starts.add("Hello"); + BotBoth.starts.add("Hyder"); + BotBoth.starts.add("Hydra"); + BotBoth.starts.add("Hydro"); + BotBoth.starts.add("Hyper"); + BotBoth.starts.add("Kills"); + BotBoth.starts.add("Nitro"); + BotBoth.starts.add("Plays"); + BotBoth.starts.add("Slime"); + BotBoth.starts.add("Super"); + BotBoth.starts.add("Tower"); + BotBoth.starts.add("Worms"); + + BotBoth.ends.add("11"); + BotBoth.ends.add("50"); + BotBoth.ends.add("69"); + BotBoth.ends.add("99"); + BotBoth.ends.add("HD"); + BotBoth.ends.add("LP"); + BotBoth.ends.add("XD"); + BotBoth.ends.add("YT"); + } + + public static int getLength(List list) { + for(int i = 1; i < 17; ++i) { + int num = 0; + + for(String s : list) { + if(s.length() == i) ++num; + } + + if(num > 2) return i; + } + + return 0; + } + + public static String getNickType(List list) { + int nicks = 0; + + for(String s : list) { + if(getNickType(s).equals("nicks")) { + ++nicks; + } + } + + if(nicks > 2) { + return "nicks"; + } + + return "null"; + } + + public static String getNickType(String name) { + if(BotBoth.nicks.contains(name)) { + return "nicks"; + } + + return "null"; + } + + public static void addPlayer(String p) { + if(!BotBoth.players.contains(p)) { + try { + BufferedWriter buf = new BufferedWriter(new FileWriter(BotBoth.f, true)); + + buf.write(p); + buf.write(System.getProperty("line.separator")); + + buf.close(); + } catch (Exception e) {} + + BotBoth.players.add(p); + } + } + + public static boolean isNew(String p) { + return BotBoth.players.contains(p); + } + + public static boolean pingedServer(String ip) { + return BotBoth.pings.contains(ip); + } + + public static void cancelAttack(long name) { + for(BotAttack a : BotBoth.attacks) { + if(a.getName() == name) BotBoth.attacks.remove(a); + } + + if(BotBoth.attacks.isEmpty()) BotBoth.pings.clear(); + } +} diff --git a/Bungee/src/secondlife/network/bungee/commands/ABNatureCommand.java b/Bungee/src/secondlife/network/bungee/commands/ABNatureCommand.java new file mode 100644 index 0000000..a56044a --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/ABNatureCommand.java @@ -0,0 +1,86 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.handlers.PlayerHandler; +import secondlife.network.bungee.utils.Color; + +public class ABNatureCommand extends Command { + + public ABNatureCommand() { + super("antibotnature", "secondlife.op", "ab"); + } + + @Override + public void execute(CommandSender sender, String[] args) { + + if(args.length == 0) { + sender.sendMessage(Color.translate("&cUsage: /antibot ")); + return; + } + + if(args[0].equalsIgnoreCase("spam")) { + if(PlayerHandler.spam) { + PlayerHandler.spam = false; + sender.sendMessage(Color.translate("&cAntiBot spam disabled!")); + } else { + PlayerHandler.spam = true; + sender.sendMessage(Color.translate("&cAntiBot spam enabled!")); + } + } + + if(args[0].equalsIgnoreCase("length")) { + if(args.length == 1) { + sender.sendMessage(Color.translate("&cUsage: /antibot length ")); + return; + } + + int length = Integer.parseInt(args[1]); + + if(length > 16 || length < 4) { + sender.sendMessage(Color.translate("&cMust be between 3-16")); + return; + } + + PlayerHandler.blockLengh = length; + sender.sendMessage(Color.translate("&cSucessfully set lenght to " + length)); + } + + if(args[0].equalsIgnoreCase("lengthedo")) { + if(args.length == 1) { + sender.sendMessage(Color.translate("&cUsage: /antibot length ")); + return; + } + + int length = Integer.parseInt(args[1]); + + if(length > 16 || length < 4) { + sender.sendMessage(Color.translate("&cMust be between 3-16")); + return; + } + + PlayerHandler.block = length; + sender.sendMessage(Color.translate("&cSucessfully set lenght to " + length)); + } + + if(args[0].equalsIgnoreCase("fully")) { + if(PlayerHandler.enabled) { + PlayerHandler.enabled = false; + sender.sendMessage(Color.translate("&cAntiBot fully disabled!")); + } else { + PlayerHandler.enabled = true; + sender.sendMessage(Color.translate("&cAntiBot fully enabled!")); + } + } + + if(args[0].equalsIgnoreCase("edo")) { + if(PlayerHandler.edo) { + PlayerHandler.edo = false; + sender.sendMessage(Color.translate("&cAntiBot fully disabled!")); + } else { + PlayerHandler.edo = true; + sender.sendMessage(Color.translate("&cAntiBot fully enabled!")); + } + } + } +} diff --git a/Bungee/src/secondlife/network/bungee/commands/ABVisualCommand.java b/Bungee/src/secondlife/network/bungee/commands/ABVisualCommand.java new file mode 100644 index 0000000..2c68956 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/ABVisualCommand.java @@ -0,0 +1,61 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Command; +import net.md_5.bungee.config.ConfigurationProvider; +import net.md_5.bungee.config.YamlConfiguration; +import secondlife.network.bungee.antibot.BotBoth; +import secondlife.network.bungee.handlers.AntiBotHandler; +import secondlife.network.bungee.utils.Color; + +public class ABVisualCommand extends Command { + + public ABVisualCommand() { + super("antibotvisual", "secondlife.op"); + } + + public void execute(CommandSender sender, String[] args) { + if(!sender.hasPermission("secondlife.op")) { + sender.sendMessage(Color.translate("&cNo permission.")); + return; + } + + if(args.length == 0) { + sender.sendMessage(Color.translate("&eThis server is running &dSecondLife Network &eantibot system!")); + } else { + if(args[0].equalsIgnoreCase("reload")) { + + BotBoth.attacks.clear(); + BotBoth.pings.clear(); + + try { + AntiBotHandler.config = ConfigurationProvider.getProvider(YamlConfiguration.class).load(AntiBotHandler.f); + } catch (Exception e) { + e.printStackTrace(); + } + + AntiBotHandler.limit = 3; + BotBoth.timeout = 7; + } else if(args[0].equalsIgnoreCase("on")) { + + if(AntiBotHandler.ignore.contains(sender)) { + AntiBotHandler.ignore.remove(sender); + + sender.sendMessage(Color.translate("&fAntiBot has been turned &aON&f!")); + } else { + sender.sendMessage(Color.translate("&fAntiBot is already turned &aON&f!")); + } + } else if(args[0].equalsIgnoreCase("off")) { + + if(!AntiBotHandler.ignore.contains(sender)) { + AntiBotHandler.ignore.add((ProxiedPlayer) sender); + + sender.sendMessage(Color.translate("&fAntiBot has been turned &cOFF&f!")); + } else { + sender.sendMessage(Color.translate("&fAntiBot is already turned &cOFF&f!")); + } + } + } + } +} diff --git a/Bungee/src/secondlife/network/bungee/commands/GListCommand.java b/Bungee/src/secondlife/network/bungee/commands/GListCommand.java new file mode 100644 index 0000000..e85f00a --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/GListCommand.java @@ -0,0 +1,38 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.config.ServerInfo; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.utils.Color; + +public class GListCommand extends Command { + + public GListCommand() { + super("glist", "", "gplayers", "gp", "players", "sllist", "slglist"); + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(args.length == 1) { + if(!args[0].equalsIgnoreCase("all")) { + sender.sendMessage(Color.translate("&cUsage: /glist or /glist all")); + return; + } + + for(ServerInfo server : ProxyServer.getInstance().getServers().values()) { + sender.sendMessage(Color.translate("&9[&b" + server.getName() + "&9] &6- &c" + server.getPlayers().size())); + } + sender.sendMessage(Color.translate("&aTotal online &6- &c" + ProxyServer.getInstance().getOnlineCount())); + return; + } + + for(ServerInfo server : ProxyServer.getInstance().getServers().values()) { + + if(server.getPlayers().size() != 0) { + sender.sendMessage(Color.translate("&9[&b" + server.getName() + "&9] &6- &c" + server.getPlayers().size())); + } + } + sender.sendMessage(Color.translate("&aTotal online &6- &c" + ProxyServer.getInstance().getOnlineCount())); + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/commands/HubCommand.java b/Bungee/src/secondlife/network/bungee/commands/HubCommand.java new file mode 100644 index 0000000..268bbc5 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/HubCommand.java @@ -0,0 +1,34 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.chat.TextComponent; +import net.md_5.bungee.api.config.ServerInfo; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.utils.Color; + +public class HubCommand extends Command { + + public HubCommand() { + super("hub", "", "lobby" ); + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(!(sender instanceof ProxiedPlayer)) { + sender.sendMessage(Color.translate("&cPlayer use only!")); + return; + } + + ProxiedPlayer player = (ProxiedPlayer) sender; + + if(player.getServer().getInfo().getName().equalsIgnoreCase("Hub")) { + player.sendMessage(Color.translate("&cYou are already connected to the hub!")); + return; + } + + ServerInfo target = ProxyServer.getInstance().getServerInfo("Hub"); + player.connect(target); + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/commands/JoinCommand.java b/Bungee/src/secondlife/network/bungee/commands/JoinCommand.java new file mode 100644 index 0000000..74681b1 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/JoinCommand.java @@ -0,0 +1,56 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.chat.TextComponent; +import net.md_5.bungee.api.config.ServerInfo; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.utils.Color; + +public class JoinCommand extends Command { + + public JoinCommand() { + super("join", "", "play" ); + } + + @Override + public void execute(CommandSender sender, String[] args) { + + if(!(sender instanceof ProxiedPlayer)) { + sender.sendMessage(Color.translate("&cPlayer use only!")); + return; + } + + ProxiedPlayer player = (ProxiedPlayer) sender; + + if(player.getServer().getInfo().getName().equalsIgnoreCase("Hub")) { + player.sendMessage(Color.translate("&cThis command is disabled in hub!")); + return; + } + + if(args.length == 0) { + player.sendMessage(Color.translate("&cUsage: /join ")); + player.sendMessage(Color.translate("&cThis command is used to connect to UHCMeetup servers! (UHCMeetup-1, UHCMeetup-2...)")); + return; + } + + if(args.length == 1) { + + ServerInfo target = ProxyServer.getInstance().getServerInfo(args[0]); + + if(target == null) { + player.sendMessage(Color.translate("&cThat server doesn't exist!")); + return; + } + + if(!args[0].toLowerCase().contains("uhcmeetup-")) { + player.sendMessage(Color.translate("&cYou can only connect to UHCMeetup servers with this command!")); + return; + } + + player.connect(target); + return; + } + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/commands/MaintenanceCommand.java b/Bungee/src/secondlife/network/bungee/commands/MaintenanceCommand.java new file mode 100644 index 0000000..34fcd55 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/MaintenanceCommand.java @@ -0,0 +1,35 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Color; + +/** + * Created by Marko on 09.04.2018. + */ +public class MaintenanceCommand extends Command { + + public MaintenanceCommand() { + super("maintenance", "secondlife.op", "globalwl", "globalwhitelist"); + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(args.length == 0) { + sender.sendMessage(Color.translate("&cUsage: /maintenance ")); + } else { + if(args[0].equalsIgnoreCase("on")) { + Bungee.configuration.set("whitelisted", true); + Bungee.getInstance().saveConfig(); + + sender.sendMessage(Color.translate("&aYou have enabled maintenance mode!")); + } else if(args[0].equalsIgnoreCase("off")) { + Bungee.configuration.set("whitelisted", false); + Bungee.getInstance().saveConfig(); + + sender.sendMessage(Color.translate("&cYou have disabled maintenance mode!")); + } + } + } +} diff --git a/Bungee/src/secondlife/network/bungee/commands/MotdCommand.java b/Bungee/src/secondlife/network/bungee/commands/MotdCommand.java new file mode 100644 index 0000000..fb9e6ca --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/MotdCommand.java @@ -0,0 +1,34 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Color; + +/** + * Created by Marko on 09.04.2018. + */ +public class MotdCommand extends Command { + + public MotdCommand() { + super("motd", "secondlife.op", "setmotd"); + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(args.length == 0) { + sender.sendMessage(Color.translate("&cUsage: /motd - {nl} new line")); + } else { + StringBuilder message = new StringBuilder(); + + for(int i = 0; i < args.length; i++) { + message.append(args[i]).append(" "); + } + + Bungee.configuration.set("server_motd", message.toString()); + Bungee.getInstance().saveConfig(); + + sender.sendMessage(Color.translate("&eYou have updated motd to: " + Color.translate(message.toString()))); + } + } +} diff --git a/Bungee/src/secondlife/network/bungee/commands/ReloadCommand.java b/Bungee/src/secondlife/network/bungee/commands/ReloadCommand.java new file mode 100644 index 0000000..d11d6b3 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/ReloadCommand.java @@ -0,0 +1,23 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Color; + +/** + * Created by Marko on 09.04.2018. + */ +public class ReloadCommand extends Command { + + public ReloadCommand() { + super("configreload", "secondlife.op", "cr", "creload", "configr"); + } + + @Override + public void execute(CommandSender sender, String[] args) { + Bungee.getInstance().reloadConfig(); + + sender.sendMessage(Color.translate("&aYou have reloaded the configuration file!")); + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/commands/ReportCommand.java b/Bungee/src/secondlife/network/bungee/commands/ReportCommand.java new file mode 100644 index 0000000..7dfe0c4 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/ReportCommand.java @@ -0,0 +1,83 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.BungeeCord; +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.config.ServerInfo; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.handlers.ReportHandler; +import secondlife.network.bungee.handlers.RequestHandler; +import secondlife.network.bungee.handlers.SilentHandler; +import secondlife.network.bungee.utils.Color; +import secondlife.network.bungee.utils.StringUtils; + +public class ReportCommand extends Command { + + public ReportCommand() { + super("report", "", "hacker"); + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(!(sender instanceof ProxiedPlayer)) { + sender.sendMessage(Color.translate("&cPlayer use only!")); + return; + } + + ProxiedPlayer player = (ProxiedPlayer) sender; + ServerInfo server = player.getServer().getInfo(); + + if(server.getName().equalsIgnoreCase("Hub")) { + player.sendMessage(Color.translate("&cReport is disabled on this server.")); + return; + } + + if(args.length < 2) { + player.sendMessage(Color.translate("&cUsage: /report ")); + } else { + if(ReportHandler.isActive(player)) { + player.sendMessage(Color.translate("&cYou can't use this command for another &l" + StringUtils.formatMilisecondsToMinutes(ReportHandler.getMillisecondsLeft(player)))); + } else { + + ProxiedPlayer target = ProxyServer.getInstance().getPlayer(args[0]); + + if(target == null) { + sender.sendMessage(Color.translate("&cThat player is not online!")); + return; + } + + ServerInfo serverTarget = target.getServer().getInfo(); + + if(serverTarget == null) { + sender.sendMessage(Color.translate("&cThat player is not online!")); + return; + } + + if(target == player) { + player.sendMessage(Color.translate("&cYou can't report yourself!")); + return; + } + + ReportHandler.applyCooldown(player); + StringBuilder message = new StringBuilder(); + + for(int i = 1; i < args.length; i++) { + message.append(args[i]).append(" "); + } + + player.sendMessage(Color.translate("&aYou have reported &c" + target.getName() + " &aand all staff is now alerted!")); + + for(ProxiedPlayer online : BungeeCord.getInstance().getPlayers()) { + if(online.hasPermission("secondlife.staff")) { + if(!SilentHandler.silent.contains(online.getUniqueId())) { + online.sendMessage(Color.translate("&4[Report] &7[" + serverTarget.getName().toUpperCase() + "] &c" + player.getName() + " &7reported player named &c&l" + target.getName() + "&7!")); + online.sendMessage(Color.translate("&4Reason: &7" + message)); + //online.sendMessage(Color.translate("&8(&9Report&8) &8(&9" + serverTarget.getName().toUpperCase() + "&8) &9" + player.getName() + " &bhas reported &c" + target.getName() + " &bfor&7: &f" + message)); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/commands/RequestCommand.java b/Bungee/src/secondlife/network/bungee/commands/RequestCommand.java new file mode 100644 index 0000000..1e37b1c --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/RequestCommand.java @@ -0,0 +1,100 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.BungeeCord; +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.config.ServerInfo; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.handlers.RequestHandler; +import secondlife.network.bungee.handlers.SilentHandler; +import secondlife.network.bungee.utils.Color; +import secondlife.network.bungee.utils.StringUtils; + +public class RequestCommand extends Command { + + public RequestCommand() { + super("request", "", "helpop", "staffhelp"); + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(!(sender instanceof ProxiedPlayer)) { + sender.sendMessage(Color.translate("&cPlayer use only!")); + return; + } + + ProxiedPlayer player = (ProxiedPlayer) sender; + ServerInfo server = player.getServer().getInfo(); + + if(server.getName().equalsIgnoreCase("Hub")) { + player.sendMessage(Color.translate("&cRequest is disabled on this server.")); + return; + } + + if(args.length == 0) { + player.sendMessage(Color.translate("&cUsage: /request ")); + } else { + if(RequestHandler.isActive(player)) { + player.sendMessage(Color.translate("&cYou can't use this command for another &l" + StringUtils.formatMilisecondsToMinutes(RequestHandler.getMillisecondsLeft(player)))); + } else { + + RequestHandler.applyCooldown(player); + StringBuilder message = new StringBuilder(); + + for(int i = 0; i < args.length; i++) { + message.append(args[i]).append(" "); + } + + if(server.getName().equalsIgnoreCase("UHC-1") || server.getName().equalsIgnoreCase("UHC-2")) { + if(message.toString().toLowerCase().contains("heal") && message.toString().toLowerCase().contains("time")) { + player.sendMessage(Color.translate("&cYou can see heal time in /config")); + return; + } + if(message.toString().toLowerCase().contains("heal") && message.toString().toLowerCase().contains("final")) { + player.sendMessage(Color.translate("&cYou can see heal time in /config")); + return; + } + if(message.toString().toLowerCase().contains("pvp") && message.toString().toLowerCase().contains("time")) { + player.sendMessage(Color.translate("&cYou can see pvp time in /config")); + return; + } + if(message.toString().toLowerCase().contains("shrink")) { + player.sendMessage(Color.translate("&cYou can see border shirnk time in /config")); + return; + } + if(message.toString().toLowerCase().contains("apple") && message.toString().toLowerCase().contains("rate")) { + player.sendMessage(Color.translate("&cApple rate is 2%")); + return; + } + if(message.toString().toLowerCase().contains("scenario") || message.toString().toLowerCase().contains("scenarios")) { + player.sendMessage(Color.translate("&ccYou can see current scenarios by doing /scenarios")); + return; + } + if(message.toString().toLowerCase().contains("shear") || message.toString().toLowerCase().contains("shears")) { + player.sendMessage(Color.translate("&cShears are enabled, apple rate while using shears is 1%")); + return; + } + if(message.toString().toLowerCase().contains("nether")) { + player.sendMessage(Color.translate("&cYou can check if nether is enabled in /config")); + return; + } + if(message.toString().toLowerCase().contains("cross")) { + player.sendMessage(Color.translate("&cCross teaming is allowed in team games")); + return; + } + } + + player.sendMessage(Color.translate("&aUspjesno si zatrazio pomoc i staff je obavijesten!")); + + for(ProxiedPlayer online : BungeeCord.getInstance().getPlayers()) { + if(!SilentHandler.silent.contains(online.getUniqueId())) { + if(online.hasPermission("secondlife.staff")) { + online.sendMessage(Color.translate("&2[Request] &7[" + player.getServer().getInfo().getName().toUpperCase() + "] &a" + player.getName() + " &7requested staff help:")); + online.sendMessage(Color.translate("&2Reason: &7" + message)); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/commands/SilentCommand.java b/Bungee/src/secondlife/network/bungee/commands/SilentCommand.java new file mode 100644 index 0000000..1227bdd --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/SilentCommand.java @@ -0,0 +1,35 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.chat.TextComponent; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.handlers.SilentHandler; +import secondlife.network.bungee.utils.Color; + +public class SilentCommand extends Command { + + public SilentCommand() { + super("silent", "secondlife.op", "filter"); + } + + @Override + public void execute(CommandSender sender, String[] args) { + + if(!(sender instanceof ProxiedPlayer)) { + sender.sendMessage(new TextComponent(Color.translate("&cPlayer use only!"))); + return; + } + + ProxiedPlayer player = (ProxiedPlayer) sender; + + if(SilentHandler.silent.contains(player.getUniqueId())) { + SilentHandler.silent.remove(player.getUniqueId()); + player.sendMessage(new TextComponent(Color.translate("&eYou have &cCisabled &esilent mode."))); + return; + } + + SilentHandler.silent.add(player.getUniqueId()); + player.sendMessage(new TextComponent(Color.translate("&eYou have &aEnabled &esilent mode."))); + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/commands/StaffChatCommand.java b/Bungee/src/secondlife/network/bungee/commands/StaffChatCommand.java new file mode 100644 index 0000000..4110748 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/StaffChatCommand.java @@ -0,0 +1,43 @@ +package secondlife.network.bungee.commands; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.handlers.StaffChatHandler; +import secondlife.network.bungee.utils.Color; + +public class StaffChatCommand extends Command { + + public StaffChatCommand() { + super("staffchat", "secondlife.staff", "sc", "schat", "ac"); + } + + @Override + public void execute(CommandSender sender, String[] args) { + + if(!(sender instanceof ProxiedPlayer)) { + sender.sendMessage(Color.translate("&cPlayer use only!")); + return; + } + + ProxiedPlayer player = (ProxiedPlayer) sender; + + if(!player.hasPermission("secondlife.staff")) { + player.sendMessage(Color.translate("&cNo Permission")); + return; + } + + /*if(player.getServer().getInfo().getName().equalsIgnoreCase("Hub")) { + player.sendMessage(Color.translate("&cStaff Chat is disabled on this server.")); + return; + }*/ + + if(StaffChatHandler.staff.contains(player.getUniqueId())) { + StaffChatHandler.staff.remove(player.getUniqueId()); + player.sendMessage(Color.translate("&eStaff Chat has been &cDisabled&e.")); + } else { + StaffChatHandler.staff.add(player.getUniqueId()); + player.sendMessage(Color.translate("&eStaff Chat has been &aEnabled&e.")); + } + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/commands/StaffListCommand.java b/Bungee/src/secondlife/network/bungee/commands/StaffListCommand.java new file mode 100644 index 0000000..ccb5d44 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/commands/StaffListCommand.java @@ -0,0 +1,65 @@ +package secondlife.network.bungee.commands; + +import java.util.HashMap; + +import net.md_5.bungee.api.CommandSender; +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.config.ServerInfo; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Command; +import secondlife.network.bungee.utils.Color; + +public class StaffListCommand extends Command { + + private int total = 0; + private HashMap staff = new HashMap<>(); + + public StaffListCommand() { + super("stafflist", "secondlife.staff", "staffl"); + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(!sender.hasPermission("secondlife.staff")) { + sender.sendMessage(Color.translate("&cNo Permission")); + return; + } + + if(args.length == 0) { + + total = 0; + + if(!staff.isEmpty()) { + staff.clear(); + } + + for(ProxiedPlayer online : ProxyServer.getInstance().getPlayers()) { + if(online.hasPermission("secondlife.staff")) { + if(online.getServer() != null && online != null) { + if(staff.containsKey(online.getServer().getInfo().getName())) { + staff.put(online.getServer().getInfo().getName(), staff.get(online.getServer().getInfo().getName()) + " " + online.getName()); + } else { + staff.put(online.getServer().getInfo().getName(), online.getName() + " "); + } + total++; + } + } + } + + if(staff.isEmpty()) { + sender.sendMessage(Color.translate("&cThere is no staff online!")); + return; + } + + sender.sendMessage(Color.translate("&aStaff Online&7:")); + + for(ServerInfo server : ProxyServer.getInstance().getServers().values()) { + if(this.staff.containsKey(server.getName())) { + sender.sendMessage(Color.translate("&9[&b" + server.getName() + "&9] &6- &c" + staff.get(server.getName().toString()))); + } + } + + sender.sendMessage(Color.translate("&aTotal Staff&7: &c" + total)); + } + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/handlers/AnnounceHandler.java b/Bungee/src/secondlife/network/bungee/handlers/AnnounceHandler.java new file mode 100644 index 0000000..7536848 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/AnnounceHandler.java @@ -0,0 +1,50 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Listener; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Color; +import secondlife.network.bungee.utils.Handler; +import secondlife.network.bungee.utils.StringUtils; + +import java.util.HashMap; +import java.util.Map; + +public class AnnounceHandler extends Handler implements Listener { + + public static Map cooldowns = new HashMap<>(); + + public AnnounceHandler(Bungee plugin) { + super(plugin); + + ProxyServer.getInstance().getPluginManager().registerListener(plugin, this); + } + + public static void disable() { cooldowns.clear(); } + + public static void applyCooldown(String server) { + cooldowns.put(server, System.currentTimeMillis() + (20 * 1000)); + } + + public static boolean isActive(String server) { + return cooldowns.containsKey(server) && System.currentTimeMillis() < cooldowns.get(server); + } + + public static long getMillisecondsLeft(String server) { + if(cooldowns.containsKey(server)) { + return Math.max(cooldowns.get(server) - System.currentTimeMillis(), 0L); + } + return 0L; + } + + public static void handle(ProxiedPlayer player, String server) { + if(isActive(server)) { + player.sendMessage(Color.translate("&cYou can't use this command for another &l" + StringUtils.formatMilisecondsToMinutes(getMillisecondsLeft(server)))); + return; + } + + applyCooldown(server); + player.sendMessage(Color.translate("&eYou have announced this meetup!")); + } +} diff --git a/Bungee/src/secondlife/network/bungee/handlers/AntiBotHandler.java b/Bungee/src/secondlife/network/bungee/handlers/AntiBotHandler.java new file mode 100644 index 0000000..578df73 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/AntiBotHandler.java @@ -0,0 +1,160 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.event.PostLoginEvent; +import net.md_5.bungee.api.event.PreLoginEvent; +import net.md_5.bungee.api.event.ProxyPingEvent; +import net.md_5.bungee.api.plugin.Listener; +import net.md_5.bungee.config.Configuration; +import net.md_5.bungee.event.EventHandler; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.antibot.AntiBotUtils; +import secondlife.network.bungee.antibot.BotAttack; +import secondlife.network.bungee.antibot.BotBoth; +import secondlife.network.bungee.utils.Color; +import secondlife.network.bungee.utils.Handler; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +public class AntiBotHandler extends Handler implements Listener { + + public static String[] st; + public static int i; + public static File f; + public static Configuration config; + public static int limit; + public static int startup_multiplier; + public static int startup_time; + public static List ignore = new ArrayList<>(); + public static String declining; + public static String accepting; + + public AntiBotHandler(Bungee plugin) { + super(plugin); + + i = 0; + limit = 3; + BotBoth.timeout = 7; + startup_multiplier = 10; + startup_time = 30; + declining = Color.translate("&4[AB-VISUAL_] &cDeclining connection of &f%PLAYER%"); + accepting = Color.translate("&2[AB-VISUAL_] &aAccepting connection of &f%PLAYER%"); + + st = new String[limit + 2]; + + ProxyServer.getInstance().getPluginManager().registerListener(this.getPlugin(), this); + } + + @EventHandler + public void onProxyPing(ProxyPingEvent event) { + String ip = event.getConnection().getAddress().getAddress().getHostAddress(); + + if(!BotBoth.pings.contains(ip)) BotBoth.pings.add(ip); + } + + @EventHandler(priority = -64) + public void onPreLogin(PreLoginEvent event) { + if(BotBoth.joins > limit * startup_multiplier) { + int ping = 0; + int nevv = 0; + int length = 0; + + boolean pinging = false; + boolean nevv2 = false; + + List list = new ArrayList<>(); + String[] st; + + for(int x = (st = AntiBotHandler.st).length, i = 0; i < x; ++i) { + String s = st[i]; + + if(s != null) { + if(Boolean.parseBoolean(s.split(" ")[0])) ++ping; + if(Boolean.parseBoolean(s.split(" ")[1])) ++nevv; + + + list.add(s.split(" ")[2]); + } + } + + String type = BotBoth.getNickType(list); + + if(type.equals("null")) { + length = BotBoth.getLength(list); + + if(length != 0) type = "length"; + } + + if(ping > limit) pinging = true; + if(nevv > limit) nevv2 = true; + + BotBoth.attacks.add(new BotAttack(System.currentTimeMillis(), pinging, nevv2, type, length)); + BotBoth.joins = 0; + } + + String name = event.getConnection().getName(); + String ip = event.getConnection().getAddress().getAddress().getHostAddress(); + + for(BotAttack a : BotBoth.attacks) { + if(!event.isCancelled() && a.handleLogin(true, name, ip)) { + AntiBotUtils.sendMessage(declining.replace("%PLAYER%", name)); + + event.setCancelled(true); + return; + } + } + + ++BotBoth.joins; + ++i; + + if(i > limit + 1) i = 0; + + String s2 = String.valueOf(String.valueOf(BotBoth.pingedServer(ip))) + " " + BotBoth.isNew(name) + " " + name; + st[i] = s2; + + if(BotBoth.isFakeNickname(name)) { + event.setCancelled(true); + return; + } + + event.registerIntent(this.getPlugin()); + + this.getPlugin().getProxy().getScheduler().runAsync(this.getPlugin(), new Runnable() { + public void run() { + try { + Thread.sleep(1000L); + } catch (InterruptedException e) {} + + for(BotAttack a : BotBoth.attacks) { + if(a.handleLogin(false, name, ip)) { + event.setCancelled(true); + event.completeIntent(Bungee.getInstance()); + return; + } + } + + event.completeIntent(Bungee.getInstance()); + } + }); + + if(!BotBoth.attacks.isEmpty()) AntiBotUtils.sendMessage(accepting.replace("%PLAYER%", name)); + } + + @EventHandler + public void onPostLogin(PostLoginEvent event) { + this.getPlugin().getProxy().getScheduler().runAsync(this.getPlugin(), new Runnable() { + public void run() { + try { + Thread.sleep(30000L); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + if(event.getPlayer().isConnected()) BotBoth.addPlayer(event.getPlayer().getName()); + } + }); + } +} diff --git a/Bungee/src/secondlife/network/bungee/handlers/AutoMessageHandler.java b/Bungee/src/secondlife/network/bungee/handlers/AutoMessageHandler.java new file mode 100644 index 0000000..cfdb0ba --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/AutoMessageHandler.java @@ -0,0 +1,46 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.plugin.Listener; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Color; +import secondlife.network.bungee.utils.Handler; +import secondlife.network.bungee.utils.Message; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; +import java.util.concurrent.TimeUnit; + +/** + * Created by Marko on 09.04.2018. + */ +public class AutoMessageHandler extends Handler implements Listener { + + public static ArrayList msglist = new ArrayList<>(); + public static Random random = new Random(); + + public AutoMessageHandler(Bungee plugin) { + super(plugin); + + setup(); + + ProxyServer.getInstance().getPluginManager().registerListener(plugin, this); + } + + public void setup() { + List messages = Bungee.configuration.getStringList("auto_message.active_messages"); + + for(String msg : messages) { + String message = Bungee.configuration.getString("auto_message.messages." + msg + ".message"); + + msglist.add(Color.translate("&8[&5&l" + '✇' + "&8] &d" + message)); + } + + ProxyServer.getInstance().getScheduler().schedule(Bungee.getInstance(), () -> { + Message.sendMessage(""); + Message.sendMessage(Color.translate(msglist.get(Math.abs(random.nextInt() % msglist.size())))); + Message.sendMessage(""); + },2, 2, TimeUnit.MINUTES); + } +} diff --git a/Bungee/src/secondlife/network/bungee/handlers/MaintenanceHandler.java b/Bungee/src/secondlife/network/bungee/handlers/MaintenanceHandler.java new file mode 100644 index 0000000..870c1f3 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/MaintenanceHandler.java @@ -0,0 +1,48 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.ServerPing; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.event.PreLoginEvent; +import net.md_5.bungee.api.event.ProxyPingEvent; +import net.md_5.bungee.api.plugin.Listener; +import net.md_5.bungee.event.EventHandler; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Color; +import secondlife.network.bungee.utils.Handler; + +/** + * Created by Marko on 09.04.2018. + */ +public class MaintenanceHandler extends Handler implements Listener { + + public MaintenanceHandler(Bungee plugin) { + super(plugin); + + ProxyServer.getInstance().getPluginManager().registerListener(plugin, this); + } + + @EventHandler + public void onProxyPing(ProxyPingEvent event) { + if(!Bungee.configuration.getBoolean("whitelisted")) return; + + ServerPing response = event.getResponse(); + ServerPing.Protocol protocol = new ServerPing.Protocol("Maintenance", response.getVersion().getProtocol() - 1); + + response.setVersion(protocol); + event.setResponse(response); + } + + @EventHandler + public void onPreLogin(PreLoginEvent event) { + if(!Bungee.configuration.getBoolean("whitelisted")) return; + + ProxiedPlayer player = ProxyServer.getInstance().getPlayer(event.getConnection().getUniqueId()); + + if(player == null) return; + if(player.hasPermission("secondlife.op")) return; + + event.setCancelReason(Color.translate("&cThe network is currently undergoing maintenance, check back soon!")); + event.setCancelled(true); + } +} diff --git a/Bungee/src/secondlife/network/bungee/handlers/MotdHandler.java b/Bungee/src/secondlife/network/bungee/handlers/MotdHandler.java new file mode 100644 index 0000000..b1ce8a9 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/MotdHandler.java @@ -0,0 +1,35 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.ServerPing; +import net.md_5.bungee.api.event.ProxyPingEvent; +import net.md_5.bungee.api.plugin.Listener; +import net.md_5.bungee.event.EventHandler; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Color; +import secondlife.network.bungee.utils.Handler; + +/** + * Created by Marko on 09.04.2018. + */ +public class MotdHandler extends Handler implements Listener { + + public MotdHandler(Bungee plugin) { + super(plugin); + + ProxyServer.getInstance().getPluginManager().registerListener(plugin, this); + } + + @EventHandler(priority = 64) + public void onServerListPing(ProxyPingEvent event) { + if(Bungee.configuration.getString("server_motd") == null) return; + + ServerPing ping = event.getResponse(); + + String motd = Color.translate(Bungee.configuration.getString("server_motd")); + motd = motd.replace("{nl}", "\n"); + + ping.setDescription(motd); + event.setResponse(ping); + } +} diff --git a/Bungee/src/secondlife/network/bungee/handlers/PlayerHandler.java b/Bungee/src/secondlife/network/bungee/handlers/PlayerHandler.java new file mode 100644 index 0000000..4aa70c4 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/PlayerHandler.java @@ -0,0 +1,179 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.config.ServerInfo; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.event.*; +import net.md_5.bungee.api.plugin.Listener; +import net.md_5.bungee.event.EventHandler; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Color; +import secondlife.network.bungee.utils.Handler; +import secondlife.network.bungee.utils.Message; +import secondlife.network.bungee.utils.StringUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +public class PlayerHandler extends Handler implements Listener { + + public static int blockLengh = 16; + public static int block = 16; + public static boolean enabled = false; + public static List bots = new ArrayList<>(); + public static boolean spam = false; + public static int blocked = 0; + public static boolean edo = false; + public static List bridge = new ArrayList<>(); + + public PlayerHandler(Bungee plugin) { + super(plugin); + + this.resetSpam(); + this.resetFully(); + + ProxyServer.getInstance().getPluginManager().registerListener(plugin, this); + } + + @EventHandler(priority=-64) + public void onLog(PreLoginEvent event) { + String name = event.getConnection().getName(); + + if(edo && name.length() >= blockLengh) { + event.setCancelled(true); + blocked++; + return; + } + + if(name.length() == blockLengh) { + if(enabled || spam) { + event.setCancelled(true); + blocked++; + return; + } + + if(!bots.contains(name)) { + bots.add(name); + } + + if(bots.size() > 100) { + spam = true; + Message.sendMessage(Color.translate("&cAntiBot has ben automatically &aenabled"), "secondlife.op"); + bots.clear(); + } + } + } + + @EventHandler(priority=64) + public void onPreLogin(PreLoginEvent event) { + if(event.isCancelled()) return; + + String name = event.getConnection().getName(); + + if(StringUtils.isPremium(name)) { + event.getConnection().setOnlineMode(true); + } + + PluginMessageHandler.sendPremiumInfo(event.getConnection().getName(), event.getConnection().isOnlineMode() ? true : false); + } + + @EventHandler + public void onPostLogin(PostLoginEvent event) { + if(bridge.contains(event.getPlayer().getUniqueId())) bridge.remove(event.getPlayer().getUniqueId()); + + // TODO remove + //bridge.add(event.getPlayer().getUniqueId()); + } + + @EventHandler(priority=64) + public void onServerConnect(ServerConnectEvent event) { + if(event.isCancelled()) return; + + PluginMessageHandler.sendPremiumInfo(event.getPlayer().getName(), event.getPlayer().getPendingConnection().isOnlineMode() ? true : false); + } + + public void resetSpam() { + ProxyServer.getInstance().getScheduler().schedule(Bungee.getInstance(), new Runnable() { + @Override + public void run() { + if(spam) { + ProxyServer.getInstance().getConsole().sendMessage("!!! BLOCKED " + blocked + " CONNECTIONS !!!"); + ProxyServer.getInstance().getConsole().sendMessage("!!! BLOCKED " + blocked + " CONNECTIONS !!!"); + ProxyServer.getInstance().getConsole().sendMessage("!!! BLOCKED " + blocked + " CONNECTIONS !!!"); + blocked = 0; + spam = false; + Message.sendMessage(Color.translate("&cAntiBot has ben automatically &cdisabled"), "secondlife.op"); + } + } + }, 1, 1, TimeUnit.MINUTES); + } + + public void resetFully() { + ProxyServer.getInstance().getScheduler().schedule(Bungee.getInstance(), new Runnable() { + @Override + public void run() { + enabled = false; + } + }, 5, 5, TimeUnit.MINUTES); + } + + @EventHandler + public void onPlayerJoin(ServerSwitchEvent event) { + ProxiedPlayer player = event.getPlayer(); + + if(!player.hasPermission("secondlife.staff")) return; + + ServerInfo server = player.getServer().getInfo(); + + if(server.getName().equalsIgnoreCase("UHC-1") || server.getName().equalsIgnoreCase("UHC-2")) { + player.connect(server); + } + + Message.sendMessage("&9[Staff] &f" + player.getName() + " &bhas joined &f" + server.getName() + "&b.", "secondlife.staff"); + } + + @EventHandler + public void onPlayerDisconnect(PlayerDisconnectEvent event) { + ProxiedPlayer player = event.getPlayer(); + + if(!player.hasPermission("secondlife.staff")) return; + + Message.sendMessage("&9[Staff] &f" + player.getName() + " &bhas left the server.", "secondlife.staff"); + } + + @EventHandler + public void onChat(ChatEvent event) { + if(!(event.getSender() instanceof ProxiedPlayer)) return; + + ProxiedPlayer player = (ProxiedPlayer) event.getSender(); + ServerInfo server = player.getServer().getInfo(); + + String message = event.getMessage().toLowerCase(); + + if(!bridge.contains(player.getUniqueId()) && message.startsWith("/")) { + if(message.startsWith("/l ") + || message.startsWith("/login") + || message.startsWith("/reg ") + || message.startsWith("/register") + || message.startsWith("/auth") + || message.startsWith("/securityregister") + || message.startsWith("/code")) return; + player.sendMessage(Color.translate("&dPlease authenticate before using commands!")); + event.setCancelled(true); + } + + if(server.getName().equalsIgnoreCase("Hub")) { + if(event.getMessage().equalsIgnoreCase("/HCF") + || event.getMessage().equalsIgnoreCase("/Factions") + || event.getMessage().equalsIgnoreCase("/UHC") + || event.getMessage().equalsIgnoreCase("/Minigames") + || event.getMessage().equalsIgnoreCase("/Practice") + || event.getMessage().equalsIgnoreCase("/KitMap")) { + event.setCancelled(true); + player.sendMessage(Color.translate("&cPlease connect to that server trough hub! To go to the hub use /hub or /lobby")); + } + } + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/handlers/PluginMessageHandler.java b/Bungee/src/secondlife/network/bungee/handlers/PluginMessageHandler.java new file mode 100644 index 0000000..fd53008 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/PluginMessageHandler.java @@ -0,0 +1,209 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.BungeeCord; +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.chat.ClickEvent; +import net.md_5.bungee.api.chat.ComponentBuilder; +import net.md_5.bungee.api.chat.HoverEvent; +import net.md_5.bungee.api.chat.TextComponent; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.event.PluginMessageEvent; +import net.md_5.bungee.api.plugin.Listener; +import net.md_5.bungee.event.EventHandler; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Color; +import secondlife.network.bungee.utils.Handler; +import secondlife.network.bungee.utils.Message; + +import java.io.*; +import java.text.DecimalFormat; + +public class PluginMessageHandler extends Handler implements Listener { + + public PluginMessageHandler(Bungee plugin) { + super(plugin); + + ProxyServer.getInstance().getPluginManager().registerListener(plugin, this); + } + + @EventHandler + public void onPluginMessage(PluginMessageEvent event) { + if(event.isCancelled()) return; + + try { + if(event.getTag().equalsIgnoreCase(Bungee.incomingAnnounceChannel)) { + event.setCancelled(true); + DataInputStream in = new DataInputStream(new ByteArrayInputStream(event.getData())); + + String channel = in.readUTF(); + if(!channel.equals("Meetup")) return; + + ProxiedPlayer player = ProxyServer.getInstance().getPlayer(in.readUTF()); + String server = in.readUTF(); + + broadcast(player, server); + } + + if(event.getTag().equalsIgnoreCase(Bungee.incomingBungeeBroadcastChannel)) { + DataInputStream in = new DataInputStream(new ByteArrayInputStream(event.getData())); + + String channel = in.readUTF(); + String message = in.readUTF(); + + switch(channel) { + case "BroadcastChannel": + Message.sendMessage(Color.translate(message)); + break; + case "BroadcastPChannel": + String permission = in.readUTF(); + + Message.sendMessage(Color.translate(message), permission); + break; + } + } + + if(event.getTag().equalsIgnoreCase(Bungee.incomingFilterChannel)) { + DataInputStream in = new DataInputStream(new ByteArrayInputStream(event.getData())); + + String channel = in.readUTF(); + + if(!channel.equals("Filtered")) return; + + ProxiedPlayer player = ProxyServer.getInstance().getPlayer(in.readUTF()); + String server = in.readUTF(); + String message = in.readUTF(); + + broadcastFilter(player, server, message); + } + + if(event.getTag().equalsIgnoreCase(Bungee.incomingCommandChannel)) { + DataInputStream in = new DataInputStream(new ByteArrayInputStream(event.getData())); + + String channel = in.readUTF(); + + if(!channel.equals("BungeeCommands")) return; + + String command = in.readUTF(); + + ProxyServer.getInstance().getPluginManager().dispatchCommand(ProxyServer.getInstance().getConsole(), command); + } + + if(event.getTag().equalsIgnoreCase(Bungee.incomingAlertsChannel)) { + DataInputStream in = new DataInputStream(new ByteArrayInputStream(event.getData())); + + String channel = in.readUTF(); + + if(channel.equals("AlertsChannel")) { + ProxiedPlayer player = ProxyServer.getInstance().getPlayer(in.readUTF()); + + String check = in.readUTF(); + String location = in.readUTF(); + int ping = in.readInt(); + double tps = in.readDouble(); + + alert(player, check, location, ping, tps); + } + } + + if(event.getTag().equalsIgnoreCase(Bungee.incomingBanChannel)) { + DataInputStream in = new DataInputStream(new ByteArrayInputStream(event.getData())); + + String channel = in.readUTF(); + + if(!channel.equals("BanChannel")) return; + + ProxiedPlayer player = ProxyServer.getInstance().getPlayer(in.readUTF()); + + ban(player); + } + + if(event.getTag().equalsIgnoreCase(Bungee.incomingPermissionsChannel)) { + DataInputStream in = new DataInputStream(new ByteArrayInputStream(event.getData())); + + String channel = in.readUTF(); + + if(!channel.equals("PermissionsChannel")) return; + + ProxiedPlayer player = ProxyServer.getInstance().getPlayer(in.readUTF()); + String permission = in.readUTF(); + + player.setPermission(permission, true); + } + + if(event.getTag().equalsIgnoreCase(Bungee.incomingAuthChannel)) { + DataInputStream in = new DataInputStream(new ByteArrayInputStream(event.getData())); + + String channel = in.readUTF(); + + if(!channel.equals("AuthChannel")) return; + + ProxiedPlayer player = ProxyServer.getInstance().getPlayer(in.readUTF()); + + PlayerHandler.bridge.add(player.getUniqueId()); + } + } catch (IOException ex) { + ex.printStackTrace(); + } + } + + public static void broadcast(ProxiedPlayer player, String server) { + AnnounceHandler.handle(player, server); + + TextComponent clicktoconnect = new TextComponent(Color.translate("&8[&4Alert&8] &d" + player.getDisplayName() + "&7: &b" + server + " &bis starting soon! &bClick here to join &f" + server)); + + clicktoconnect.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/play " + server)); + clicktoconnect.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("Click here to join " + server).create())); + + for(ProxiedPlayer online : BungeeCord.getInstance().getPlayers()) { + if(!online.getServer().getInfo().getName().equalsIgnoreCase("Hub")) { + online.sendMessage(clicktoconnect); + } + } + } + + public static void broadcastFilter(ProxiedPlayer player, String server, String message) { + TextComponent clicktoconnect = new TextComponent(Color.translate("&8(&6Filtered&8) (&6" + server + "&8) &6" + player.getName() + "&7: &f" + message)); + + for(ProxiedPlayer online : BungeeCord.getInstance().getPlayers()) { + if(online.hasPermission("secondlife.staff")) { + if(!SilentHandler.silent.contains(online.getUniqueId())) { + online.sendMessage(clicktoconnect); + } + } + } + } + + public void alert(ProxiedPlayer player, String check, String location, int ping, double tps) { + TextComponent a = new TextComponent(Color.translate("&8[&4!&8] &8(&c" + player.getServer().getInfo().getName().toUpperCase() + "&8) &4" + player.getName() + " &cfailed &4" + check.toUpperCase())); + a.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(Color.translate("&c Player: &4" + player.getName() + "\n &cCheck: &4" + check + "\n &cLocation: &4" + location + "\n &cPing: &4" + ping + "\n &cTPS: &4" + new DecimalFormat("##.##").format(tps))).create())); + + for(ProxiedPlayer online : BungeeCord.getInstance().getPlayers()) { + if(online.hasPermission("secondlife.staff")) { + if(!SilentHandler.silent.contains(online.getUniqueId())) { + online.sendMessage(a); + } + } + } + } + + public void ban(ProxiedPlayer player) { + Message.sendMessage(Color.translate("&c&m----------------------------------------")); + Message.sendMessage(Color.translate("&ePaik detected &c" + player.getName() + " &echeating!")); + Message.sendMessage(Color.translate("&c&m----------------------------------------")); + } + + public static void sendPremiumInfo(String name, boolean isPremium) { + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + DataOutputStream out = new DataOutputStream(stream); + + try { + out.writeUTF("Auth"); + out.writeUTF(name); + out.writeBoolean(isPremium); + + ProxyServer.getInstance().getServerInfo("Hub").sendData(Bungee.outgoingPremiumChannel, stream.toByteArray()); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/Bungee/src/secondlife/network/bungee/handlers/ReportHandler.java b/Bungee/src/secondlife/network/bungee/handlers/ReportHandler.java new file mode 100644 index 0000000..841418d --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/ReportHandler.java @@ -0,0 +1,38 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Listener; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Handler; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +public class ReportHandler extends Handler implements Listener { + + public static Map reportCooldowns = new HashMap<>(); + + public ReportHandler(Bungee plugin) { + super(plugin); + } + + public static void disable() { + reportCooldowns.clear(); + } + + public static void applyCooldown(ProxiedPlayer player) { + reportCooldowns.put(player.getUniqueId(), System.currentTimeMillis() + (180 * 1000)); + } + + public static boolean isActive(ProxiedPlayer player) { + return reportCooldowns.containsKey(player.getUniqueId()) && System.currentTimeMillis() < reportCooldowns.get(player.getUniqueId()); + } + + public static long getMillisecondsLeft(ProxiedPlayer player) { + if(reportCooldowns.containsKey(player.getUniqueId())) { + return Math.max(reportCooldowns.get(player.getUniqueId()) - System.currentTimeMillis(), 0L); + } + return 0L; + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/handlers/RequestHandler.java b/Bungee/src/secondlife/network/bungee/handlers/RequestHandler.java new file mode 100644 index 0000000..46b3519 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/RequestHandler.java @@ -0,0 +1,38 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.plugin.Listener; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Handler; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +public class RequestHandler extends Handler implements Listener { + + public static Map requestCooldowns = new HashMap<>(); + + public RequestHandler(Bungee plugin) { + super(plugin); + } + + public static void disable() { + requestCooldowns.clear(); + } + + public static void applyCooldown(ProxiedPlayer player) { + requestCooldowns.put(player.getUniqueId(), System.currentTimeMillis() + (180 * 1000)); + } + + public static boolean isActive(ProxiedPlayer player) { + return requestCooldowns.containsKey(player.getUniqueId()) && System.currentTimeMillis() < requestCooldowns.get(player.getUniqueId()); + } + + public static long getMillisecondsLeft(ProxiedPlayer player) { + if(requestCooldowns.containsKey(player.getUniqueId())) { + return Math.max(requestCooldowns.get(player.getUniqueId()) - System.currentTimeMillis(), 0L); + } + return 0L; + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/handlers/SilentHandler.java b/Bungee/src/secondlife/network/bungee/handlers/SilentHandler.java new file mode 100644 index 0000000..703b5c3 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/SilentHandler.java @@ -0,0 +1,18 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.api.plugin.Listener; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Handler; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +public class SilentHandler extends Handler implements Listener { + + public static List silent = new ArrayList<>(); + + public SilentHandler(Bungee plugin) { + super(plugin); + } +} diff --git a/Bungee/src/secondlife/network/bungee/handlers/StaffChatHandler.java b/Bungee/src/secondlife/network/bungee/handlers/StaffChatHandler.java new file mode 100644 index 0000000..6c85d68 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/handlers/StaffChatHandler.java @@ -0,0 +1,62 @@ +package secondlife.network.bungee.handlers; + +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.config.ServerInfo; +import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.event.ChatEvent; +import net.md_5.bungee.api.event.PlayerDisconnectEvent; +import net.md_5.bungee.api.plugin.Listener; +import net.md_5.bungee.event.EventHandler; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.utils.Color; +import secondlife.network.bungee.utils.Handler; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +public class StaffChatHandler extends Handler implements Listener { + + public static List staff = new ArrayList<>(); + + public StaffChatHandler(Bungee plugin) { + super(plugin); + + ProxyServer.getInstance().getPluginManager().registerListener(plugin, this); + } + + @EventHandler + public void onPlayerDisconnect(PlayerDisconnectEvent event) { + ProxiedPlayer player = event.getPlayer(); + + if(staff.contains(player.getUniqueId())) { + staff.remove(player.getUniqueId()); + } + } + + @EventHandler + public void onChat(ChatEvent event) { + if(event.getSender() instanceof ProxiedPlayer) { + ProxiedPlayer player = (ProxiedPlayer) event.getSender(); + ServerInfo server = player.getServer().getInfo(); + + if(event.getMessage().startsWith("/")) return; + + if(staff.contains(player.getUniqueId())) { + if(player.hasPermission("secondlife.staff")) { + for(ProxiedPlayer online : ProxyServer.getInstance().getPlayers()) { + if(online.hasPermission("secondlife.staff")) { + if(!SilentHandler.silent.contains(online.getUniqueId())) { + online.sendMessage(Color.translate("&5[Staff Chat] &7[" + server.getName() + "] &d" + player.getName() + "&7: &f" + event.getMessage())); + //online.sendMessage(Color.translate("&8(&dStaff Chat&8) &8(&d" + server.getName() + "&8) &d" + player.getName() + "&7: &f" + event.getMessage())); + event.setCancelled(true); + } + } + } + } else { + staff.remove(player.getUniqueId()); + } + } + } + } +} \ No newline at end of file diff --git a/Bungee/src/secondlife/network/bungee/utils/Color.java b/Bungee/src/secondlife/network/bungee/utils/Color.java new file mode 100644 index 0000000..a287701 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/utils/Color.java @@ -0,0 +1,10 @@ +package secondlife.network.bungee.utils; + +import net.md_5.bungee.api.ChatColor; + +public class Color { + + public static String translate(String text) { + return ChatColor.translateAlternateColorCodes('&', text); + } +} diff --git a/Bungee/src/secondlife/network/bungee/utils/Handler.java b/Bungee/src/secondlife/network/bungee/utils/Handler.java new file mode 100644 index 0000000..f748870 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/utils/Handler.java @@ -0,0 +1,22 @@ +package secondlife.network.bungee.utils; + +import lombok.Getter; +import secondlife.network.bungee.Bungee; +import secondlife.network.bungee.handlers.AnnounceHandler; +import secondlife.network.bungee.handlers.ReportHandler; +import secondlife.network.bungee.handlers.RequestHandler; + +public class Handler { + + @Getter private Bungee plugin; + + public Handler(Bungee plugin) { + this.plugin = plugin; + } + + public static void clear() { + AnnounceHandler.disable(); + RequestHandler.disable(); + ReportHandler.disable(); + } +} diff --git a/Bungee/src/secondlife/network/bungee/utils/Message.java b/Bungee/src/secondlife/network/bungee/utils/Message.java new file mode 100644 index 0000000..11e64be --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/utils/Message.java @@ -0,0 +1,22 @@ +package secondlife.network.bungee.utils; + +import net.md_5.bungee.BungeeCord; +import net.md_5.bungee.api.connection.ProxiedPlayer; + +public class Message { + + public static void sendMessage(String message) { + for(ProxiedPlayer online : BungeeCord.getInstance().getPlayers()) { + online.sendMessage(Color.translate(message)); + } + } + + public static void sendMessage(String message, String permission) { + for(ProxiedPlayer online : BungeeCord.getInstance().getPlayers()) { + + if(online.hasPermission(permission)) { + online.sendMessage(Color.translate(message)); + } + } + } +} diff --git a/Bungee/src/secondlife/network/bungee/utils/NumberUtils.java b/Bungee/src/secondlife/network/bungee/utils/NumberUtils.java new file mode 100644 index 0000000..49139f2 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/utils/NumberUtils.java @@ -0,0 +1,13 @@ +package secondlife.network.bungee.utils; + +public class NumberUtils { + + public static boolean isInteger(String value) { + try { + Integer.parseInt(value); + } catch (NumberFormatException e) { + return false; + } + return true; + } +} diff --git a/Bungee/src/secondlife/network/bungee/utils/StringUtils.java b/Bungee/src/secondlife/network/bungee/utils/StringUtils.java new file mode 100644 index 0000000..62c8446 --- /dev/null +++ b/Bungee/src/secondlife/network/bungee/utils/StringUtils.java @@ -0,0 +1,39 @@ +package secondlife.network.bungee.utils; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.URL; + +public class StringUtils { + + public static String formatMilisecondsToSeconds(Long time) { + float seconds = (time + 0.0f) / 1000.0f; + + String string = String.format("%1$.1f", seconds); + + return string; + } + + public static String formatMilisecondsToMinutes(Long cooldown) { + return String.format("%02d:%02d", (cooldown / 1000L / 60L), (cooldown / 1000L % 60L)); + } + + public static boolean isPremium(String name) { + try { + BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new URL("https://api.mojang.com/users/profiles/minecraft/" + name).openStream())); + + if(bufferedReader.readLine() != null) { + bufferedReader.close(); + return true; + } + + bufferedReader.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + return false; + } +} + diff --git a/Factions/out/production/Factions/META-INF/MANIFEST.MF b/Factions/out/production/Factions/META-INF/MANIFEST.MF new file mode 100644 index 0000000..c88faf9 --- /dev/null +++ b/Factions/out/production/Factions/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: Victions + diff --git a/Factions/out/production/Factions/config.yml b/Factions/out/production/Factions/config.yml new file mode 100644 index 0000000..e940a7a --- /dev/null +++ b/Factions/out/production/Factions/config.yml @@ -0,0 +1,124 @@ +tntExplosion: true +tnTExplosionDamage: true +creeperExplosion: true +creeperExplosionDamage: true +waterSponge: true +lavaSponge: true +potion-limiter: + SPEED: + level: -1 + extended: true + SLOW: + level: -1 + extended: false + FAST_DIGGING: + level: -1 + extended: true + SLOW_DIGGING: + level: -1 + extended: true + INCREASE_DAMAGE: + level: -1 + extended: true + HEAL: + level: -1 + extended: true + HARM: + level: -1 + extended: true + JUMP: + level: -1 + extended: true + CONFUSION: + level: -1 + extended: true + REGENERATION: + level: -1 + extended: true + DAMAGE_RESISTANCE: + level: -1 + extended: true + FIRE_RESISTANCE: + level: -1 + extended: true + WATER_BREATHING: + level: -1 + extended: true + INVISIBILITY: + level: -1 + extended: true + BLINDNESS: + level: -1 + extended: true + NIGHT_VISION: + level: -1 + extended: true + HUNGER: + level: -1 + extended: true + WEAKNESS: + level: -1 + extended: true + POISON: + level: -1 + extended: true + WITHER: + level: -1 + extended: true + HEALTH_BOOST: + level: -1 + extended: true + ABSORPTION: + level: -1 + extended: true + SATURATION: + level: -1 + extended: true +entity-limit: + BAT: true + BLAZE: true + CAVE_SPIDER: true + CHICKEN: true + COW: true + CREEPER: true + ENDER_DRAGON: false + ENDERMAN: false + GHAST: false + GIANT: false + HORSE: false + IRON_GOLEM: true + MAGMA_CUBE: true + MUSHROOM_COW: true + PIG: true + PIG_ZOMBIE: true + SHEEP: false + SKELETON: true + SLIME: false + SNOWMAN: false + SPIDER: true + SQUID: false + VILLAGER: false + WITCH: false + WITHER: false + WOLF: false + ZOMBIE: true +prices: + blazerod: 24 + grilledpork: 4 + arrow: 4 + redrose: 1 + ironingot: 8 + cookedbeef: 4 + leather: 4 + goldingot: 19 + tnt: 16 + netherstalk: 8 + sugarcane: 3 + pumpkin: 8 + melon: 8 + cactus: 4 + rottenflesh: 4 + bone: 4 + sulphur: 6 + string: 4 + spidereye: 4 \ No newline at end of file diff --git a/Factions/out/production/Factions/plugin.yml b/Factions/out/production/Factions/plugin.yml new file mode 100644 index 0000000..56a806c --- /dev/null +++ b/Factions/out/production/Factions/plugin.yml @@ -0,0 +1,6 @@ +name: Victions +main: secondlife.network.victions.Victions +version: 1.0-SNAPSHOT +description: SL Factions Core. +depend: [Vituz] +author: SecondLife Development Team \ No newline at end of file diff --git a/Factions/out/production/Factions/secondlife/network/victions/Victions.class b/Factions/out/production/Factions/secondlife/network/victions/Victions.class new file mode 100644 index 0000000..82dd8f5 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/Victions.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/VictionsAPI.class b/Factions/out/production/Factions/secondlife/network/victions/VictionsAPI.class new file mode 100644 index 0000000..a93f86d Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/VictionsAPI.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/VictionsConfig.class b/Factions/out/production/Factions/secondlife/network/victions/VictionsConfig.class new file mode 100644 index 0000000..f8f8f70 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/VictionsConfig.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/commands/BalanceCommand.class b/Factions/out/production/Factions/secondlife/network/victions/commands/BalanceCommand.class new file mode 100644 index 0000000..fb70036 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/commands/BalanceCommand.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/commands/DonatorCommands.class b/Factions/out/production/Factions/secondlife/network/victions/commands/DonatorCommands.class new file mode 100644 index 0000000..7df26b3 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/commands/DonatorCommands.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/commands/HomeCommand.class b/Factions/out/production/Factions/secondlife/network/victions/commands/HomeCommand.class new file mode 100644 index 0000000..3e78259 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/commands/HomeCommand.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/commands/KitCommand.class b/Factions/out/production/Factions/secondlife/network/victions/commands/KitCommand.class new file mode 100644 index 0000000..5db1fe6 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/commands/KitCommand.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/commands/LogoutCommand.class b/Factions/out/production/Factions/secondlife/network/victions/commands/LogoutCommand.class new file mode 100644 index 0000000..00d5392 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/commands/LogoutCommand.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/commands/TeleportCommands.class b/Factions/out/production/Factions/secondlife/network/victions/commands/TeleportCommands.class new file mode 100644 index 0000000..b9ee379 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/commands/TeleportCommands.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/handler/CustomMovemomentHandler.class b/Factions/out/production/Factions/secondlife/network/victions/handler/CustomMovemomentHandler.class new file mode 100644 index 0000000..e72a80b Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/handler/CustomMovemomentHandler.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/kit/Kit.class b/Factions/out/production/Factions/secondlife/network/victions/kit/Kit.class new file mode 100644 index 0000000..82f691b Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/kit/Kit.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/kit/PlayerKit.class b/Factions/out/production/Factions/secondlife/network/victions/kit/PlayerKit.class new file mode 100644 index 0000000..422d0b8 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/kit/PlayerKit.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/ChatListener.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/ChatListener.class new file mode 100644 index 0000000..2aeb289 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/ChatListener.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/ChunkBusterListener.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/ChunkBusterListener.class new file mode 100644 index 0000000..25e7d25 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/ChunkBusterListener.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/EntityLimiterListener.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/EntityLimiterListener.class new file mode 100644 index 0000000..181ddc4 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/EntityLimiterListener.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/FactionsListener.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/FactionsListener.class new file mode 100644 index 0000000..d30fd43 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/FactionsListener.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/MobStackListener.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/MobStackListener.class new file mode 100644 index 0000000..ea910fd Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/MobStackListener.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/PlayerListener$1.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/PlayerListener$1.class new file mode 100644 index 0000000..8e05bc7 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/PlayerListener$1.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/PlayerListener.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/PlayerListener.class new file mode 100644 index 0000000..363c188 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/PlayerListener.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/PotionLimitListener$1.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/PotionLimitListener$1.class new file mode 100644 index 0000000..5356ce9 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/PotionLimitListener$1.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/PotionLimitListener.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/PotionLimitListener.class new file mode 100644 index 0000000..ac151df Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/PotionLimitListener.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/SellWandListener.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/SellWandListener.class new file mode 100644 index 0000000..ad6b18a Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/SellWandListener.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/listeners/SpawnTagListener.class b/Factions/out/production/Factions/secondlife/network/victions/listeners/SpawnTagListener.class new file mode 100644 index 0000000..79742f6 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/listeners/SpawnTagListener.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/EntityLimiterManager.class b/Factions/out/production/Factions/secondlife/network/victions/managers/EntityLimiterManager.class new file mode 100644 index 0000000..2f85f58 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/EntityLimiterManager.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/FactionsManager.class b/Factions/out/production/Factions/secondlife/network/victions/managers/FactionsManager.class new file mode 100644 index 0000000..992dd51 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/FactionsManager.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/GlassManager.class b/Factions/out/production/Factions/secondlife/network/victions/managers/GlassManager.class new file mode 100644 index 0000000..a94afe8 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/GlassManager.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/KitManager.class b/Factions/out/production/Factions/secondlife/network/victions/managers/KitManager.class new file mode 100644 index 0000000..7cf1686 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/KitManager.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/MobStackManager$1.class b/Factions/out/production/Factions/secondlife/network/victions/managers/MobStackManager$1.class new file mode 100644 index 0000000..d84de3f Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/MobStackManager$1.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/MobStackManager.class b/Factions/out/production/Factions/secondlife/network/victions/managers/MobStackManager.class new file mode 100644 index 0000000..d2976f0 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/MobStackManager.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/PlayerManager.class b/Factions/out/production/Factions/secondlife/network/victions/managers/PlayerManager.class new file mode 100644 index 0000000..8c2f12e Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/PlayerManager.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/PotionLimitManager$PotionLimit.class b/Factions/out/production/Factions/secondlife/network/victions/managers/PotionLimitManager$PotionLimit.class new file mode 100644 index 0000000..cbbeb3b Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/PotionLimitManager$PotionLimit.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/PotionLimitManager.class b/Factions/out/production/Factions/secondlife/network/victions/managers/PotionLimitManager.class new file mode 100644 index 0000000..a42173e Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/PotionLimitManager.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/SellWandManager.class b/Factions/out/production/Factions/secondlife/network/victions/managers/SellWandManager.class new file mode 100644 index 0000000..a32ba33 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/SellWandManager.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/managers/TeleportManager.class b/Factions/out/production/Factions/secondlife/network/victions/managers/TeleportManager.class new file mode 100644 index 0000000..872acd6 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/managers/TeleportManager.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/player/FactionsData.class b/Factions/out/production/Factions/secondlife/network/victions/player/FactionsData.class new file mode 100644 index 0000000..101c561 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/player/FactionsData.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/providers/ScoreboardProvider.class b/Factions/out/production/Factions/secondlife/network/victions/providers/ScoreboardProvider.class new file mode 100644 index 0000000..0286235 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/providers/ScoreboardProvider.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/tasks/FactionsTask.class b/Factions/out/production/Factions/secondlife/network/victions/tasks/FactionsTask.class new file mode 100644 index 0000000..10da269 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/tasks/FactionsTask.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/utilities/CustomLocation.class b/Factions/out/production/Factions/secondlife/network/victions/utilities/CustomLocation.class new file mode 100644 index 0000000..df8193a Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/utilities/CustomLocation.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/utilities/FactionsUtils.class b/Factions/out/production/Factions/secondlife/network/victions/utilities/FactionsUtils.class new file mode 100644 index 0000000..a2152b9 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/utilities/FactionsUtils.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/utilities/GlowEnchantment.class b/Factions/out/production/Factions/secondlife/network/victions/utilities/GlowEnchantment.class new file mode 100644 index 0000000..8de1ff3 Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/utilities/GlowEnchantment.class differ diff --git a/Factions/out/production/Factions/secondlife/network/victions/utilities/Manager.class b/Factions/out/production/Factions/secondlife/network/victions/utilities/Manager.class new file mode 100644 index 0000000..3a9e0cd Binary files /dev/null and b/Factions/out/production/Factions/secondlife/network/victions/utilities/Manager.class differ diff --git a/Factions/src/META-INF/MANIFEST.MF b/Factions/src/META-INF/MANIFEST.MF new file mode 100644 index 0000000..c88faf9 --- /dev/null +++ b/Factions/src/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: Victions + diff --git a/Factions/src/config.yml b/Factions/src/config.yml new file mode 100644 index 0000000..e940a7a --- /dev/null +++ b/Factions/src/config.yml @@ -0,0 +1,124 @@ +tntExplosion: true +tnTExplosionDamage: true +creeperExplosion: true +creeperExplosionDamage: true +waterSponge: true +lavaSponge: true +potion-limiter: + SPEED: + level: -1 + extended: true + SLOW: + level: -1 + extended: false + FAST_DIGGING: + level: -1 + extended: true + SLOW_DIGGING: + level: -1 + extended: true + INCREASE_DAMAGE: + level: -1 + extended: true + HEAL: + level: -1 + extended: true + HARM: + level: -1 + extended: true + JUMP: + level: -1 + extended: true + CONFUSION: + level: -1 + extended: true + REGENERATION: + level: -1 + extended: true + DAMAGE_RESISTANCE: + level: -1 + extended: true + FIRE_RESISTANCE: + level: -1 + extended: true + WATER_BREATHING: + level: -1 + extended: true + INVISIBILITY: + level: -1 + extended: true + BLINDNESS: + level: -1 + extended: true + NIGHT_VISION: + level: -1 + extended: true + HUNGER: + level: -1 + extended: true + WEAKNESS: + level: -1 + extended: true + POISON: + level: -1 + extended: true + WITHER: + level: -1 + extended: true + HEALTH_BOOST: + level: -1 + extended: true + ABSORPTION: + level: -1 + extended: true + SATURATION: + level: -1 + extended: true +entity-limit: + BAT: true + BLAZE: true + CAVE_SPIDER: true + CHICKEN: true + COW: true + CREEPER: true + ENDER_DRAGON: false + ENDERMAN: false + GHAST: false + GIANT: false + HORSE: false + IRON_GOLEM: true + MAGMA_CUBE: true + MUSHROOM_COW: true + PIG: true + PIG_ZOMBIE: true + SHEEP: false + SKELETON: true + SLIME: false + SNOWMAN: false + SPIDER: true + SQUID: false + VILLAGER: false + WITCH: false + WITHER: false + WOLF: false + ZOMBIE: true +prices: + blazerod: 24 + grilledpork: 4 + arrow: 4 + redrose: 1 + ironingot: 8 + cookedbeef: 4 + leather: 4 + goldingot: 19 + tnt: 16 + netherstalk: 8 + sugarcane: 3 + pumpkin: 8 + melon: 8 + cactus: 4 + rottenflesh: 4 + bone: 4 + sulphur: 6 + string: 4 + spidereye: 4 \ No newline at end of file diff --git a/Factions/src/plugin.yml b/Factions/src/plugin.yml new file mode 100644 index 0000000..56a806c --- /dev/null +++ b/Factions/src/plugin.yml @@ -0,0 +1,6 @@ +name: Victions +main: secondlife.network.victions.Victions +version: 1.0-SNAPSHOT +description: SL Factions Core. +depend: [Vituz] +author: SecondLife Development Team \ No newline at end of file diff --git a/Factions/src/secondlife/network/victions/Victions.java b/Factions/src/secondlife/network/victions/Victions.java new file mode 100644 index 0000000..e3d4024 --- /dev/null +++ b/Factions/src/secondlife/network/victions/Victions.java @@ -0,0 +1,88 @@ +package secondlife.network.victions; + +import club.minemen.spigot.ClubSpigot; +import lombok.Getter; +import org.bukkit.Bukkit; +import org.bukkit.event.Listener; +import org.bukkit.plugin.java.JavaPlugin; +import secondlife.network.victions.handler.CustomMovemomentHandler; +import secondlife.network.victions.managers.*; +import secondlife.network.victions.providers.ScoreboardProvider; +import secondlife.network.victions.tasks.FactionsTask; +import secondlife.network.vituz.providers.scoreboard.VituzScoreboard; +import secondlife.network.vituz.utilties.ConfigFile; +import secondlife.network.vituz.utilties.ServerUtils; +import secondlife.network.vituz.utilties.command.VituzCommandHandler; + +/** + * Created by Marko on 14.07.2018. + */ + +@Getter +public class Victions extends JavaPlugin { + + @Getter + private static Victions instance; + + private EntityLimiterManager entityLimiterManager; + private FactionsManager factionsManager; + private GlassManager glassManager; + private KitManager kitManager; + private MobStackManager mobStackManager; + private PlayerManager playerManager; + private PotionLimitManager potionLimitManager; + private SellWandManager sellWandManager; + private TeleportManager teleportManager; + + private ConfigFile mainConfig, kitsConfig; + + @Override + public void onEnable() { + instance = this; + + mainConfig = new ConfigFile(this, "config.yml"); + kitsConfig = new ConfigFile(this, "kits.yml"); + + VictionsAPI.hook(); + + registerManagers(); + registerListeners(); + registerProviders(); + + new FactionsTask(); + ClubSpigot.INSTANCE.addMovementHandler(new CustomMovemomentHandler()); + } + + @Override + public void onDisable() { + kitManager.saveKits(); + mobStackManager.handleOnDisable(); + } + + private void registerManagers() { + entityLimiterManager = new EntityLimiterManager(this); + factionsManager = new FactionsManager(this); + glassManager = new GlassManager(this); + kitManager = new KitManager(this); + mobStackManager = new MobStackManager(this); + playerManager = new PlayerManager(this); + potionLimitManager = new PotionLimitManager(this); + sellWandManager = new SellWandManager(this); + teleportManager = new TeleportManager(this); + } + + private void registerProviders() { + VituzScoreboard.setConfiguration(ScoreboardProvider.create()); + VituzCommandHandler.loadCommandsFromPackage(this, "secondlife.network.victions.commands"); + } + + private void registerListeners() { + ServerUtils.getClassesInPackage(this, "secondlife.network.victions.listeners").stream().filter(Listener.class::isAssignableFrom).forEach(clazz -> { + try { + Bukkit.getPluginManager().registerEvents((Listener) clazz.newInstance(), this); + } catch (InstantiationException | IllegalAccessException e) { + e.printStackTrace(); + } + }); + } +} diff --git a/Factions/src/secondlife/network/victions/VictionsAPI.java b/Factions/src/secondlife/network/victions/VictionsAPI.java new file mode 100644 index 0000000..342e9df --- /dev/null +++ b/Factions/src/secondlife/network/victions/VictionsAPI.java @@ -0,0 +1,128 @@ +package secondlife.network.victions; + +import com.massivecraft.factions.*; +import com.massivecraft.factions.event.PowerLossEvent; +import com.massivecraft.factions.zcore.util.TL; +import com.sk89q.worldedit.Vector; +import com.sk89q.worldguard.bukkit.WorldGuardPlugin; +import com.sk89q.worldguard.protection.ApplicableRegionSet; +import com.sk89q.worldguard.protection.flags.DefaultFlag; +import com.sk89q.worldguard.protection.managers.RegionManager; +import com.sk89q.worldguard.protection.regions.ProtectedRegion; +import lombok.Getter; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.entity.Player; +import org.bukkit.plugin.Plugin; + +import static com.sk89q.worldguard.bukkit.BukkitUtil.toVector; + +/** + * Created by Marko on 18.07.2018. + */ +public class VictionsAPI { + + @Getter + private static WorldGuardPlugin worldGuard; + + public static void hook() { + Plugin worldGuardPlugin = Bukkit.getPluginManager().getPlugin("WorldGuard"); + + if(worldGuardPlugin == null || !(worldGuardPlugin instanceof WorldGuardPlugin)) { + worldGuard = null; + } else { + worldGuard = (WorldGuardPlugin) worldGuardPlugin; + } + } + + public static boolean isPvPEnabled(Player player) { + Location location = player.getLocation(); + World world = location.getWorld(); + Vector vector = toVector(location); + RegionManager regionManager = worldGuard.getRegionManager(world); + ApplicableRegionSet region = regionManager.getApplicableRegions(vector); + + return region.allows(DefaultFlag.PVP) || region.getFlag(DefaultFlag.PVP) == null; + } + + public static ProtectedRegion getByProtectedRegion(Location location) { + for(ProtectedRegion region : worldGuard.getRegionManager(location.getWorld()).getApplicableRegions(location)) { + if(region != null) { + return region; + } + } + + return null; + } + + public static Faction getByFaction(Player player) { + return FPlayers.getInstance().getByPlayer(player).getFaction(); + } + + public static Faction getFactionAt(Location location) { + return Board.getInstance().getFactionAt(new FLocation(location)); + } + + public static boolean isWilderness(Location location) { + return Board.getInstance().getFactionAt(new FLocation(location)).isWilderness(); + } + + public static boolean isWarzone(Location location) { + return Board.getInstance().getFactionAt(new FLocation(location)).isWarZone(); + } + + public static boolean isInOwnClaim(Player player) { + return FPlayers.getInstance().getByPlayer(player).isInOwnTerritory(); + } + + public static boolean isInAllyClaim(Player player) { + return FPlayers.getInstance().getByPlayer(player).isInAllyTerritory(); + } + + public static boolean isInEnemyClaim(Player player) { + return FPlayers.getInstance().getByPlayer(player).isInEnemyTerritory(); + } + + public static void updatePower(FPlayer fplayer, Location location) { + Faction faction = Board.getInstance().getFactionAt(new FLocation(location)); + + PowerLossEvent localPowerLossEvent = new PowerLossEvent(faction, fplayer); + + if(faction.isWarZone()) { + + if(!Conf.warZonePowerLoss) { + localPowerLossEvent.setMessage(TL.PLAYER_POWER_NOLOSS_WARZONE.toString()); + localPowerLossEvent.setCancelled(true); + } + + if(Conf.worldsNoPowerLoss.contains(location.getWorld().getName())) { + localPowerLossEvent.setMessage(TL.PLAYER_POWER_LOSS_WARZONE.toString()); + } + + } else if(faction.isWilderness() && !Conf.wildernessPowerLoss && !Conf.worldsNoWildernessProtection.contains(location.getWorld().getName())) { + localPowerLossEvent.setMessage(TL.PLAYER_POWER_NOLOSS_WILDERNESS.toString()); + localPowerLossEvent.setCancelled(true); + } else if(Conf.worldsNoPowerLoss.contains(location.getWorld().getName())) { + localPowerLossEvent.setMessage(TL.PLAYER_POWER_NOLOSS_WORLD.toString()); + localPowerLossEvent.setCancelled(true); + } else if(Conf.peacefulMembersDisablePowerLoss && fplayer.hasFaction() && fplayer.getFaction().isPeaceful()) { + localPowerLossEvent.setMessage(TL.PLAYER_POWER_NOLOSS_PEACEFUL.toString()); + localPowerLossEvent.setCancelled(true); + } else { + localPowerLossEvent.setMessage(TL.PLAYER_POWER_NOW.toString()); + } + + Bukkit.getPluginManager().callEvent(localPowerLossEvent); + + if(!localPowerLossEvent.isCancelled()) { + fplayer.onDeath(); + } + + String str = localPowerLossEvent.getMessage(); + + if(str != null && !str.isEmpty()) { + fplayer.msg(str, fplayer.getPowerRounded(), fplayer.getPowerMaxRounded()); + } + } +} diff --git a/Factions/src/secondlife/network/victions/VictionsConfig.java b/Factions/src/secondlife/network/victions/VictionsConfig.java new file mode 100644 index 0000000..b8871e2 --- /dev/null +++ b/Factions/src/secondlife/network/victions/VictionsConfig.java @@ -0,0 +1,16 @@ +package secondlife.network.victions; + +import lombok.Getter; + +/** + * Created by Marko on 18.07.2018. + */ +public class VictionsConfig { + + @Getter private static boolean tntExplosion = Victions.getInstance().getMainConfig().getBoolean("tntExplosion"); + @Getter private static boolean tnTExplosionDamage = Victions.getInstance().getMainConfig().getBoolean("tnTExplosionDamage"); + @Getter private static boolean creeperExplosion = Victions.getInstance().getMainConfig().getBoolean("creeperExplosion"); + @Getter private static boolean creeperExplosionDamage = Victions.getInstance().getMainConfig().getBoolean("creeperExplosionDamage"); + @Getter private static boolean waterSponge = Victions.getInstance().getMainConfig().getBoolean("waterSponge"); + @Getter private static boolean lavaSponge = Victions.getInstance().getMainConfig().getBoolean("lavaSponge"); +} diff --git a/Factions/src/secondlife/network/victions/commands/BalanceCommand.java b/Factions/src/secondlife/network/victions/commands/BalanceCommand.java new file mode 100644 index 0000000..3dbf5b8 --- /dev/null +++ b/Factions/src/secondlife/network/victions/commands/BalanceCommand.java @@ -0,0 +1,40 @@ +package secondlife.network.victions.commands; + +import org.bukkit.entity.Player; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.command.Command; +import secondlife.network.vituz.utilties.command.param.Parameter; + +/** + * Created by Marko on 18.07.2018. + */ +public class BalanceCommand { + + @Command(names = {"balance", "bal"}) + public static void handleBalance(Player player) { + FactionsData data = FactionsData.getByName(player.getName()); + player.sendMessage(Color.translate("&eYour balance is &d$" + data.getBalance() + "&e.")); + } + + @Command(names = {"balance ", "bal "}) + public static void handleBalancePlayer(Player player, @Parameter(name = "name") Player target) { + FactionsData data = FactionsData.getByName(target.getName()); + player.sendMessage(Color.translate("&eBalance of &d" + target.getName() + " &eis &d$" + data.getBalance() + "&e.")); + } + + @Command(names = {"balance set", "balance give", "bal set", "bal give"}, permissionNode = "secondlife.op") + public static void handleBalanceSet(Player player, @Parameter(name = "name") Player target, @Parameter(name = "amount") int amount) { + if(amount > 100000) { + player.sendMessage(Color.translate("&cBalance limit is 100000!")); + return ; + } + + FactionsData data = FactionsData.getByName(target.getName()); + + data.setBalance(data.getBalance() + amount); + + player.sendMessage(Color.translate("&eYou have set balance of &d" + target.getName() + " &eto &d$" + data.getBalance() + "&e.")); + target.sendMessage(Color.translate("&eYour balance is now &d$" + data.getBalance() + "&e.")); + } +} diff --git a/Factions/src/secondlife/network/victions/commands/DonatorCommands.java b/Factions/src/secondlife/network/victions/commands/DonatorCommands.java new file mode 100644 index 0000000..ceda18c --- /dev/null +++ b/Factions/src/secondlife/network/victions/commands/DonatorCommands.java @@ -0,0 +1,66 @@ +package secondlife.network.victions.commands; + +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import secondlife.network.victions.Victions; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.command.Command; +import secondlife.network.vituz.utilties.command.param.Parameter; + +/** + * Created by Marko on 14.07.2018. + */ +public class DonatorCommands { + + private static Victions plugin = Victions.getInstance(); + + @Command(names = {"jellylegs", "jl", "jellyl", "jlegs"}, permissionNode = "secondlife.jellylegs") + public static void handleJellyLegs(Player player) { + plugin.getPlayerManager().handleToggleJellyLegs(player); + } + + @Command(names = {"nightvision", "nv", "nightv", "nvision"}, permissionNode = "secondlife.jellylegs") + public static void handleNightVision(Player player) { + plugin.getPlayerManager().handleToggleNightVision(player); + } + + @Command(names = {"tntcraft"}, permissionNode = "secondlife.tntcraft") + public static void handleTNTCraft(Player player) { + plugin.getFactionsManager().handleCraftTNT(player); + } + + @Command(names = {"harvesterhoe"}, permissionNode = "secondlife.op") + public static void handleHarvesterhoe(CommandSender sender, @Parameter(name = "name") Player target) { + plugin.getPlayerManager().handleGiveHarvesterhoe(sender, target); + } + + @Command(names = {"infusion"}, permissionNode = "secondlife.op") + public static void handleInfusion(CommandSender sender, @Parameter(name = "name") Player target, @Parameter(name = "type") String type) { + plugin.getPlayerManager().handleGiveInfusion(sender, target, type); + } + + @Command(names = {"factionfly", "ffly", "facfly"}, permissionNode = "secondlife.factionfly") + public static void handleFactionFly(Player player) { + plugin.getPlayerManager().handleToggleFactionFly(player); + } + + @Command(names = {"potionstack", "ps", "pstack", "potions"}, permissionNode = "secondlife.potionstack") + public static void handlePotionStack(Player player) { + plugin.getPlayerManager().handlePotionStack(player); + } + + @Command(names = {"sellwand", "sellwands"}, permissionNode = "secondlife.op") + public static void handleSellwand(CommandSender sender) { + sender.sendMessage(Color.translate("&cUsage: /sellwands give ")); + } + + @Command(names = {"sellwand give", "sellwands give"}, permissionNode = "secondlife.op") + public static void handleSellwand(CommandSender sender, @Parameter(name = "name") Player target, @Parameter(name = "uses") int uses) { + plugin.getPlayerManager().handleSellwand(sender, target, uses); + } + + @Command(names = {"chunkbuster give", "buster give"}, permissionNode = "secondlife.op") + public static void handleChunkBuster(CommandSender sender, @Parameter(name = "name") Player target, @Parameter(name = "amount") int amount) { + plugin.getPlayerManager().handleChunkBuster(sender, target, amount); + } +} diff --git a/Factions/src/secondlife/network/victions/commands/HomeCommand.java b/Factions/src/secondlife/network/victions/commands/HomeCommand.java new file mode 100644 index 0000000..69c97d6 --- /dev/null +++ b/Factions/src/secondlife/network/victions/commands/HomeCommand.java @@ -0,0 +1,89 @@ +package secondlife.network.victions.commands; + +import org.bukkit.entity.Player; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.victions.utilities.CustomLocation; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.command.Command; +import secondlife.network.vituz.utilties.command.param.Parameter; + +/** + * Created by Marko on 18.07.2018. + */ +public class HomeCommand { + + @Command(names = {"home"}) + public static void handleHomeUsage(Player player) { + player.sendMessage(Color.translate("&cUsage: /home ")); + } + + @Command(names = {"home list"}) + public static void handleHomeList(Player player) { + FactionsData data = FactionsData.getByName(player.getName()); + + if(data.getHomes().size() > 0) { + StringBuilder builder = new StringBuilder(); + + data.getHomes().keySet().forEach(home -> { + if(builder.length() > 0) { + builder.append("&f, "); + } + + builder.append("&d").append(home); + }); + + player.sendMessage(Color.translate(builder.toString())); + } else { + player.sendMessage(Color.translate("&eYou don't have any homes set yet.")); + } + } + + @Command(names = {"home"}) + public static void handleHomeGo(Player player, @Parameter(name = "home") String homeName) { + FactionsData data = FactionsData.getByName(player.getName()); + + data.getHomes().forEach((home, location) -> { + if(!home.contains(homeName.toLowerCase())) { + player.sendMessage(Color.translate("&cHome '" + homeName.toLowerCase() + "' doesn't exist.")); + return; + } + + data.applyHomeCooldown(player, location.toBukkitLocation()); + }); + } + + @Command(names = {"sethome"}) + public static void handleSetHome(Player player, @Parameter(name = "home") String homeName) { + FactionsData data = FactionsData.getByName(player.getName()); + + if(data.getHomes().size() > data.getHomeLimit()) { + player.sendMessage(Color.translate("&cYour home limit is &l" + data.getHomeLimit() + "&c")); + return; + } + + data.getHomes().forEach((home, location) -> { + if(home.contains(homeName.toLowerCase())) { + player.sendMessage(Color.translate("&cHome '" + homeName.toLowerCase() + "' already exist.")); + return; + } + + data.getHomes().put(homeName, CustomLocation.fromBukkitLocation(player.getLocation())); + player.sendMessage(Color.translate("&eYou have set your &d" + homeName + " &ehome.")); + }); + } + + @Command(names = {"deletehome", "delhome"}) + public static void handleDeleteHome(Player player, @Parameter(name = "home") String homeName) { + FactionsData data = FactionsData.getByName(player.getName()); + + data.getHomes().forEach((home, location) -> { + if(!home.contains(homeName.toLowerCase())) { + player.sendMessage(Color.translate("&cHome '" + homeName.toLowerCase() + "' doesn't exist.")); + return; + } + + data.getHomes().remove(homeName); + player.sendMessage(Color.translate("&eYou have deleted your &d" + homeName + " &ehome.")); + }); + } +} diff --git a/Factions/src/secondlife/network/victions/commands/KitCommand.java b/Factions/src/secondlife/network/victions/commands/KitCommand.java new file mode 100644 index 0000000..8231b4a --- /dev/null +++ b/Factions/src/secondlife/network/victions/commands/KitCommand.java @@ -0,0 +1,329 @@ +package secondlife.network.victions.commands; + +import net.md_5.bungee.api.ChatColor; +import org.bukkit.GameMode; +import org.bukkit.entity.Player; +import secondlife.network.victions.Victions; +import secondlife.network.victions.kit.Kit; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Permission; +import secondlife.network.vituz.utilties.StringUtils; +import secondlife.network.vituz.utilties.command.Command; +import secondlife.network.vituz.utilties.command.param.Parameter; + +public class KitCommand { + + private static final String NO_KIT = Color.translate("&cThat kit doesn't exist!"); + private static Victions plugin = Victions.getInstance(); + + private final static String[] HELP_MESSAGE = new String[] { + ChatColor.DARK_GRAY.toString() + ChatColor.STRIKETHROUGH + "----------------------------------------------------", + ChatColor.YELLOW + "Kit Commands:", + ChatColor.LIGHT_PURPLE + "(*) /kit create " + ChatColor.GRAY + "- Create kit", + ChatColor.LIGHT_PURPLE + "(*) /kit delete " + ChatColor.GRAY + "- Delete kit", + ChatColor.LIGHT_PURPLE + "(*) /kit enable " + ChatColor.GRAY + "- Enable kit", + ChatColor.LIGHT_PURPLE + "(*) /kit icon " + ChatColor.GRAY + "- Set icon", + ChatColor.LIGHT_PURPLE + "(*) /kit setinv " + ChatColor.GRAY + "- Set inventory", + ChatColor.LIGHT_PURPLE + "(*) /kit getinv " + ChatColor.GRAY + "- Get inventory", + ChatColor.LIGHT_PURPLE + "(*) /kit save save " + ChatColor.GRAY + "- Save kits", + + ChatColor.DARK_GRAY.toString() + ChatColor.STRIKETHROUGH + "----------------------------------------------------" + }; + + @Command(names = "kit") + public static void handleUsage(Player player) { + if(player.hasPermission(Permission.OP_PERMISSION)) { + player.sendMessage(HELP_MESSAGE); + player.sendMessage(""); + } else { + player.sendMessage(Color.translate("&cUsage: /kit ")); + } + + StringBuilder builder = new StringBuilder(); + + plugin.getKitManager().getKits().forEach(kits -> { + if(builder.length() > 0) { + builder.append("&f, "); + } + + builder.append("&d").append(kits.getName()); + }); + + player.sendMessage(Color.translate("&eCurrent Kits: " + builder.toString())); + } + + @Command(names = "kit") + public static void handleGive(Player player, @Parameter(name = "name") String name) { + FactionsData data = FactionsData.getByName(player.getName()); + Kit toGive = plugin.getKitManager().getKit(name); + + if(toGive == null) { + player.sendMessage(NO_KIT); + return; + } + + if(data.isKitActive(player, toGive)) { + player.sendMessage(Color.translate("&cYou can't use " + toGive.getName() + " &cfor another &l" + StringUtils.formatInt(toGive.getDelay()) + "&c!")); + return; + } + + toGive.applyToPlayer(player); + } + + @Command(names = "kit create", permissionNode = "secondlife.op") + public static void handleCreate(Player player, @Parameter(name = "name") String name) { + Kit kit = plugin.getKitManager().getKit(name); + + if(kit == null) { + plugin.getKitManager().createKit(name); + player.sendMessage(ChatColor.GREEN + "Successfully created kit " + name + "."); + } else { + player.sendMessage(ChatColor.RED + "That kit already exists!"); + } + } + + @Command(names = {"kit enable", "kit disable"}, permissionNode = "secondlife.op") + public static void handleToggle(Player player, @Parameter(name = "name") String name) { + Kit kit = plugin.getKitManager().getKit(name); + + if(kit != null) { + kit.setEnabled(!kit.isEnabled()); + player.sendMessage(kit.isEnabled() ? ChatColor.GREEN + "Successfully enabled kit " + name + "." : + ChatColor.RED + "Successfully disabled kit " + name + "."); + } else { + player.sendMessage(KitCommand.NO_KIT); + } + } + + @Command(names = {"kit setinv", "kit setinventory"}, permissionNode = "secondlife.op") + public static void handleSetInventory(Player player, @Parameter(name = "name") String name) { + Kit kit = plugin.getKitManager().getKit(name); + + if(kit != null) { + if(player.getGameMode() == GameMode.CREATIVE) { + player.sendMessage(ChatColor.RED + "You can't set item contents in creative mode!"); + } else { + player.updateInventory(); + + kit.setContents(player.getInventory().getContents()); + kit.setArmor(player.getInventory().getArmorContents()); + + player.sendMessage(ChatColor.GREEN + "Successfully set kit contents for " + name + "."); + } + } else { + player.sendMessage(KitCommand.NO_KIT); + } + } + + @Command(names = {"kit getinv", "kit getinventory"}, permissionNode = "secondlife.op") + public static void handleGetInventory(Player player, @Parameter(name = "name") String name) { + Kit kit = plugin.getKitManager().getKit(name); + + if(kit != null) { + player.getInventory().setContents(kit.getContents()); + player.getInventory().setArmorContents(kit.getArmor()); + player.updateInventory(); + player.sendMessage(ChatColor.GREEN + "Successfully retrieved kit contents from " + name + "."); + } else { + player.sendMessage(KitCommand.NO_KIT); + } + } + + @Command(names = {"kit save"}, permissionNode = "secondlife.op") + public static void handleGetInventory(Player player) { + plugin.getKitManager().loadKits(); + player.sendMessage(ChatColor.GREEN + "Successfully reloaded the kits."); + } + + @Command(names = {"kit setdelay", "kit delay"}, permissionNode = "secondlife.op") + public static void handleGetInventory(Player player, @Parameter(name = "name") String name, @Parameter(name = "delay") int seconds) { + Kit kit = plugin.getKitManager().getKit(name); + + if(kit == null) { + player.sendMessage(NO_KIT); + return; + } + + kit.setDelay(seconds); + player.sendMessage(Color.translate("&eYou have set kit delay of &d" + kit.getName() + " &eto &d" + kit.getDelay() + "&e.")); + } + + /*@Override + public boolean execute(CommandSender sender, String alias, String[] args) { + if(!(sender instanceof Player)) return false; + + Player player = (Player) sender; + + FactionsData data = FactionsData.getByName(player.getName()); + Kit kit = this.plugin.getKitManager().getKit(args[1]); + + if(args.length == 0) { + if(player.hasPermission(Permission.OP_PERMISSION)) { + player.sendMessage(HELP_MESSAGE); + player.sendMessage(""); + } else { + player.sendMessage(Color.translate("&cUsage: /kit ")); + } + + StringBuilder builder = new StringBuilder(); + + plugin.getKitManager().getKits().forEach(kits -> { + if(builder.length() > 0) { + builder.append("&f, "); + } + + builder.append("&d" + kits.getName()); + }); + + player.sendMessage(Color.translate("&eCurrent Kits: " + builder.toString())); + } else { + if(args[0].equalsIgnoreCase("create")) { + if(!player.hasPermission(Permission.OP_PERMISSION)) { + player.sendMessage(Msg.NO_PERMISSION); + return false; + } + + if(args.length < 2) { + sender.sendMessage(this.HELP_MESSAGE); + return true; + } + + if(kit == null) { + this.plugin.getKitManager().createKit(args[1]); + sender.sendMessage(ChatColor.GREEN + "Successfully created kit " + args[1] + "."); + } else { + sender.sendMessage(ChatColor.RED + "That kit already exists!"); + } + } else if(args[0].equalsIgnoreCase("delete")) { + if(!player.hasPermission(Permission.OP_PERMISSION)) { + player.sendMessage(Msg.NO_PERMISSION); + return false; + } + + if(args.length < 2) { + sender.sendMessage(this.HELP_MESSAGE); + return true; + } + + if(kit != null) { + this.plugin.getKitManager().deleteKit(args[1]); + sender.sendMessage(ChatColor.GREEN + "Successfully deleted kit " + args[1] + "."); + } else { + sender.sendMessage(KitCommand.NO_KIT); + } + } else if(args[0].equalsIgnoreCase("enable") || args[0].equalsIgnoreCase("disable")) { + if(!player.hasPermission(Permission.OP_PERMISSION)) { + player.sendMessage(Msg.NO_PERMISSION); + return false; + } + + if(args.length < 2) { + sender.sendMessage(this.HELP_MESSAGE); + return true; + } + + if(kit != null) { + kit.setEnabled(!kit.isEnabled()); + sender.sendMessage(kit.isEnabled() ? ChatColor.GREEN + "Successfully enabled kit " + args[1] + "." : + ChatColor.RED + "Successfully disabled kit " + args[1] + "."); + } else { + sender.sendMessage(KitCommand.NO_KIT); + } + } else if(args[0].equalsIgnoreCase("setinv")) { + if(!player.hasPermission(Permission.OP_PERMISSION)) { + player.sendMessage(Msg.NO_PERMISSION); + return false; + } + + if(args.length < 2) { + sender.sendMessage(this.HELP_MESSAGE); + return true; + } + + if(kit != null) { + if(player.getGameMode() == GameMode.CREATIVE) { + sender.sendMessage(ChatColor.RED + "You can't set item contents in creative mode!"); + } else { + player.updateInventory(); + + kit.setContents(player.getInventory().getContents()); + kit.setArmor(player.getInventory().getArmorContents()); + + sender.sendMessage(ChatColor.GREEN + "Successfully set kit contents for " + args[1] + "."); + } + } else { + sender.sendMessage(KitCommand.NO_KIT); + } + } else if(args[0].equalsIgnoreCase("getinv")) { + if(!player.hasPermission(Permission.OP_PERMISSION)) { + player.sendMessage(Msg.NO_PERMISSION); + return false; + } + + if(args.length < 2) { + sender.sendMessage(this.HELP_MESSAGE); + return true; + } + + if(kit != null) { + player.getInventory().setContents(kit.getContents()); + player.getInventory().setArmorContents(kit.getArmor()); + player.updateInventory(); + sender.sendMessage(ChatColor.GREEN + "Successfully retrieved kit contents from " + args[1] + "."); + } else { + sender.sendMessage(KitCommand.NO_KIT); + } + } else if(args[0].equalsIgnoreCase("save")) { + if(!player.hasPermission(Permission.OP_PERMISSION)) { + player.sendMessage(Msg.NO_PERMISSION); + return false; + } + + this.plugin.getKitManager().loadKits(); + sender.sendMessage(ChatColor.GREEN + "Successfully reloaded the kits."); + } else if(args[0].equalsIgnoreCase("setdelay")) { + if (!player.hasPermission(Permission.OP_PERMISSION)) { + player.sendMessage(Msg.NO_PERMISSION); + return false; + } + + if (args.length < 3) { + sender.sendMessage(this.HELP_MESSAGE); + return true; + } + + if(kit == null) { + player.sendMessage(NO_KIT); + return false; + } + + if(!NumberUtils.isInteger(args[2])) { + sender.sendMessage(ChatColor.RED + "Invalid time!"); + return false; + } + + int delay = Integer.parseInt(args[2]); + + kit.setDelay(delay); + player.sendMessage(Color.translate("&eYou have set kit delay of &d" + kit.getName() + " &eto &d" + kit.getDelay() + "&e.")); + } else { + Kit toGive = plugin.getKitManager().getKit(args[0]); + + if(toGive == null) { + player.sendMessage(NO_KIT); + return false; + } + + if(data.isKitActive(player, toGive)) { + player.sendMessage(Color.translate("&cYou can't use " + toGive.getName() + " &cfor another &l" + StringUtils.formatInt(toGive.getDelay()) + "&c!")); + return false; + } + + toGive.applyToPlayer(player); + } + } + + return true; + }*/ +} diff --git a/Factions/src/secondlife/network/victions/commands/LogoutCommand.java b/Factions/src/secondlife/network/victions/commands/LogoutCommand.java new file mode 100644 index 0000000..1d00b7a --- /dev/null +++ b/Factions/src/secondlife/network/victions/commands/LogoutCommand.java @@ -0,0 +1,25 @@ +package secondlife.network.victions.commands; + +import org.bukkit.entity.Player; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.command.Command; + +/** + * Created by Marko on 18.07.2018. + */ +public class LogoutCommand { + + @Command(names = {"logout"}) + public static void handleLogout(Player player) { + FactionsData data = FactionsData.getByName(player.getName()); + + if(data.isLogoutActive(player)) { + player.sendMessage(Color.translate("&cYou are already logging out.")); + return; + } + + data.applyLogoutCooldown(player); + player.sendMessage(Color.translate("&e&lLogging out... &ePlease wait &c30 &eseconds.")); + } +} diff --git a/Factions/src/secondlife/network/victions/commands/TeleportCommands.java b/Factions/src/secondlife/network/victions/commands/TeleportCommands.java new file mode 100644 index 0000000..d55c017 --- /dev/null +++ b/Factions/src/secondlife/network/victions/commands/TeleportCommands.java @@ -0,0 +1,170 @@ +package secondlife.network.victions.commands; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.entity.Player; +import secondlife.network.victions.Victions; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.vituz.utilties.ActionMessage; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Tasks; +import secondlife.network.vituz.utilties.command.Command; +import secondlife.network.vituz.utilties.command.param.Parameter; + +/** + * Created by Marko on 28.07.2018. + */ +public class TeleportCommands { + + private static Victions plugin = Victions.getInstance(); + + @Command(names = {"tpa"}) + public static void handleTpa(Player player, @Parameter(name = "name") Player target) { + if(plugin.getTeleportManager().getTpaUsers().containsKey(player.getUniqueId()) + || plugin.getTeleportManager().getTpaUsers().containsKey(target.getUniqueId()) + || plugin.getTeleportManager().getTpaUsers().containsValue(player.getUniqueId()) + || plugin.getTeleportManager().getTpaUsers().containsValue(target.getUniqueId()) + + || plugin.getTeleportManager().getTpaHereUsers().containsKey(player.getUniqueId()) + || plugin.getTeleportManager().getTpaHereUsers().containsKey(target.getUniqueId()) + || plugin.getTeleportManager().getTpaHereUsers().containsValue(player.getUniqueId()) + || plugin.getTeleportManager().getTpaHereUsers().containsValue(target.getUniqueId())) { + + player.sendMessage(Color.translate("&cYou or " + target.getName() + " has already a pending request.")); + return; + } + + plugin.getTeleportManager().getTpaUsers().put(target.getUniqueId(), player.getUniqueId()); + + player.sendMessage(Color.translate("&eYou asked to teleport to the &d" + target.getName() + "&e.")); + target.sendMessage(Color.translate("&d" + player.getName() + " &ehas asked to teleport to you.")); + + ActionMessage actionMessage = new ActionMessage(); + actionMessage.addText("&aClick here to agree") + .setClickEvent(ActionMessage.ClickableType.RunCommand, "/tpaccept"); + actionMessage.addText("&cClick here to disagree") + .setClickEvent(ActionMessage.ClickableType.RunCommand, "/tpdeny"); + + actionMessage.sendToPlayer(target); + + Tasks.runLater(() -> { + if(plugin.getTeleportManager().getTpaUsers().containsKey(target.getUniqueId())) { + plugin.getTeleportManager().getTpaUsers().remove(target.getUniqueId()); + + player.sendMessage(Color.translate("&d" + target.getName() + " &edidn't answer your teleport request.")); + target.sendMessage(Color.translate("&eYou didn't answer &d" + player.getName() + " &eteleport request.")); + player.sendMessage(Color.translate("&eYou asked to teleport to &d" + target.getName() + "&e.")); + } + }, 35 * 20L); + } + + @Command(names = {"tpaccept"}) + public static void handleTpaccept(Player player) { + Player target; + + if(plugin.getTeleportManager().getTpaUsers().containsKey(player.getUniqueId())) { + target = Bukkit.getPlayer(plugin.getTeleportManager().getTpaUsers().get(player.getUniqueId())); + + if(target != null) { + target.sendMessage(Color.translate("&d" + player.getName() + " &ehas accepted your teleport request.")); + player.sendMessage(Color.translate("&eYou have accepted &d" + target.getName() + "'s &eteleport request.")); + + player.sendMessage(Color.translate("&eYou will be teleported in &d3 seconds&e.")); + FactionsData.getByName(player.getName()).setNeedToTeleport(true); + + Tasks.runLater(() -> { + if(target.isOnline() && player.isOnline() && FactionsData.getByName(player.getName()).isNeedToTeleport()) { + target.teleport(player); + plugin.getTeleportManager().getTpaUsers().remove(player.getUniqueId()); + FactionsData.getByName(player.getName()).setNeedToTeleport(false); + } + }, 60L); + } else { + player.sendMessage(ChatColor.RED + "No player with the name '" + target.getName() + "' found."); + plugin.getTeleportManager().getTpaUsers().remove(player.getUniqueId()); + } + } else if (plugin.getTeleportManager().getTpaHereUsers().containsKey(player.getUniqueId())) { + target = Bukkit.getPlayer(plugin.getTeleportManager().getTpaHereUsers().get(player.getUniqueId())); + + if(target != null) { + target.sendMessage(Color.translate("&d" + player.getName() + " &ehas accepted your teleport request.")); + player.sendMessage(Color.translate("&eYou have accepted &d" + target.getName() + "'s &eteleport request.")); + + player.sendMessage(Color.translate("&eYou will be teleported in &d3 seconds&e.")); + FactionsData.getByName(player.getName()).setNeedToTeleport(true); + + Tasks.runLater(() -> { + if(target.isOnline() && player.isOnline() && FactionsData.getByName(player.getName()).isNeedToTeleport()) { + player.teleport(target); + plugin.getTeleportManager().getTpaHereUsers().remove(player.getUniqueId()); + FactionsData.getByName(player.getName()).setNeedToTeleport(false); + } + }, 60L); + } else { + player.sendMessage(ChatColor.RED + "No player with the name '" + target.getName() + "' found."); + plugin.getTeleportManager().getTpaHereUsers().remove(player.getUniqueId()); + } + } else { + player.sendMessage(Color.translate("&eYou don't have any pending teleport requests.")); + } + } + + @Command(names = {"tpahere"}) + public static void handleTpaHere(Player player, @Parameter(name = "name") Player target) { + if(plugin.getTeleportManager().getTpaUsers().containsKey(player.getUniqueId()) + || plugin.getTeleportManager().getTpaUsers().containsKey(target.getUniqueId()) + || plugin.getTeleportManager().getTpaUsers().containsValue(player.getUniqueId()) + || plugin.getTeleportManager().getTpaUsers().containsValue(target.getUniqueId()) + + || plugin.getTeleportManager().getTpaHereUsers().containsKey(player.getUniqueId()) + || plugin.getTeleportManager().getTpaHereUsers().containsKey(target.getUniqueId()) + || plugin.getTeleportManager().getTpaHereUsers().containsValue(player.getUniqueId()) + || plugin.getTeleportManager().getTpaHereUsers().containsValue(target.getUniqueId())) { + + player.sendMessage(Color.translate("&cYou or " + target.getName() + " has already a pending request.")); + return; + } + + plugin.getTeleportManager().getTpaHereUsers().put(target.getUniqueId(), player.getUniqueId()); + + player.sendMessage(Color.translate("&eYou asked to teleport here &d" + target.getName() + "&e.")); + target.sendMessage(Color.translate("&d" + player.getName() + " &ehas asked to teleport to you.")); + + ActionMessage actionMessage = new ActionMessage(); + actionMessage.addText("&aClick here to agree") + .setClickEvent(ActionMessage.ClickableType.RunCommand, "/tpaccept"); + actionMessage.addText("&cClick here to disagree") + .setClickEvent(ActionMessage.ClickableType.RunCommand, "/tpdeny"); + + actionMessage.sendToPlayer(target); + + Tasks.runLater(() -> { + if(plugin.getTeleportManager().getTpaHereUsers().containsKey(target.getUniqueId())) { + plugin.getTeleportManager().getTpaHereUsers().remove(target.getUniqueId()); + + player.sendMessage(Color.translate("&d" + target.getName() + " &edidn't answer your teleport request.")); + target.sendMessage(Color.translate("&eYou didn't answer &d" + player.getName() + " &eteleport request.")); + player.sendMessage(Color.translate("&eYou asked to teleport to &d" + target.getName() + "&e.")); + } + }, 35 * 20L); + } + + @Command(names = {"tpdeny", "tpadeny", "denytpa"}) + public static void handleDeny(Player player) { + Player target; + + if(plugin.getTeleportManager().getTpaUsers().containsKey(player.getUniqueId())) { + target = Bukkit.getPlayer(plugin.getTeleportManager().getTpaUsers().get(player.getUniqueId())); + plugin.getTeleportManager().getTpaUsers().remove(player.getUniqueId()); + } else if(plugin.getTeleportManager().getTpaHereUsers().containsKey(player.getUniqueId())) { + target = Bukkit.getPlayer(plugin.getTeleportManager().getTpaHereUsers().get(player.getUniqueId())); + plugin.getTeleportManager().getTpaHereUsers().remove(player.getUniqueId()); + } else { + player.sendMessage(Color.translate("&eYou don't have any pending teleport requests.")); + return; + } + + target.sendMessage(Color.translate("&d" + player.getName() + " &ehas denied your teleport request.")); + player.sendMessage(Color.translate("&eYou denied " + target.getName() + "'s &eteleport request.")); + } +} diff --git a/Factions/src/secondlife/network/victions/handler/CustomMovemomentHandler.java b/Factions/src/secondlife/network/victions/handler/CustomMovemomentHandler.java new file mode 100644 index 0000000..4c66a8b --- /dev/null +++ b/Factions/src/secondlife/network/victions/handler/CustomMovemomentHandler.java @@ -0,0 +1,44 @@ +package secondlife.network.victions.handler; + +import club.minemen.spigot.handler.MovementHandler; +import net.minecraft.server.v1_8_R3.PacketPlayInFlying; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import secondlife.network.victions.Victions; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.vituz.utilties.Color; + +/** + * Created by Marko on 18.07.2018. + */ +public class CustomMovemomentHandler implements MovementHandler { + + @Override + public void handleUpdateLocation(Player player, Location to, Location from, PacketPlayInFlying packetPlayInFlying) { + FactionsData data = FactionsData.getByName(player.getName()); + + if(data != null) { + if(data.isHomeActive(player)) { + data.cancelHome(player); + player.sendMessage(Color.translate("&eTeleport canceled because you moved.")); + } + + if(data.isLogoutActive(player)) { + data.cancelLogout(player); + player.sendMessage(Color.translate("&eTeleport canceled because you moved.")); + } + + if(data.isNeedToTeleport()) { + data.setNeedToTeleport(false); + player.sendMessage(Color.translate("&eTeleport canceled because you moved.")); + } + } + + Victions.getInstance().getGlassManager().handleMove(player, from, to); + } + + @Override + public void handleUpdateRotation(Player player, Location location, Location location1, PacketPlayInFlying packetPlayInFlying) { + + } +} diff --git a/Factions/src/secondlife/network/victions/kit/Kit.java b/Factions/src/secondlife/network/victions/kit/Kit.java new file mode 100644 index 0000000..9f4cc16 --- /dev/null +++ b/Factions/src/secondlife/network/victions/kit/Kit.java @@ -0,0 +1,34 @@ +package secondlife.network.victions.kit; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.Setter; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.vituz.utilties.Color; + +@Getter +@Setter +@AllArgsConstructor +@RequiredArgsConstructor +public class Kit { + + private final String name; + private ItemStack[] contents = new ItemStack[36]; + private ItemStack[] armor = new ItemStack[4]; + private ItemStack icon; + private boolean enabled; + private int delay; + + public void applyToPlayer(Player player) { + player.getInventory().setContents(contents); + player.getInventory().setArmorContents(armor); + player.updateInventory(); + player.sendMessage(Color.translate("&eYou have received &d" + name + " &ekit.")); + + FactionsData data = FactionsData.getByName(player.getName()); + data.applyKitCooldown(this); + } +} diff --git a/Factions/src/secondlife/network/victions/kit/PlayerKit.java b/Factions/src/secondlife/network/victions/kit/PlayerKit.java new file mode 100644 index 0000000..7ddc517 --- /dev/null +++ b/Factions/src/secondlife/network/victions/kit/PlayerKit.java @@ -0,0 +1,39 @@ +package secondlife.network.victions.kit; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import secondlife.network.victions.Victions; +import secondlife.network.vituz.utilties.Color; + +import java.util.stream.Stream; + +@Getter +@Setter +@AllArgsConstructor +public class PlayerKit { + + private final String name; + private final int index; + + private ItemStack[] contents; + private String displayName; + + public void applyToPlayer(Player player) { + for (ItemStack itemStack : contents) { + if (itemStack != null) { + if (itemStack.getAmount() <= 0) { + itemStack.setAmount(1); + } + } + } + + player.getInventory().setContents(contents); + player.getInventory().setArmorContents(Victions.getInstance().getKitManager().getKit(name).getArmor()); + player.updateInventory(); + player.sendMessage(Color.translate("&eGiving you &d" + displayName + "&e.")); + } + +} diff --git a/Factions/src/secondlife/network/victions/listeners/ChatListener.java b/Factions/src/secondlife/network/victions/listeners/ChatListener.java new file mode 100644 index 0000000..b5c9a90 --- /dev/null +++ b/Factions/src/secondlife/network/victions/listeners/ChatListener.java @@ -0,0 +1,62 @@ +package secondlife.network.victions.listeners; + +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.AsyncPlayerChatEvent; +import secondlife.network.vituz.Vituz; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Permission; +import secondlife.network.vituz.utilties.StringUtils; + +/** + * Created by Marko on 19.07.2018. + */ +public class ChatListener implements Listener { + + @EventHandler + public void onAsyncPlayerChat(AsyncPlayerChatEvent event) { + if(event.isCancelled()) return; + + String message = event.getMessage(); + Player player = event.getPlayer(); + + event.setCancelled(true); + + if(Vituz.getInstance().getChatControlManager().isMuted() && !player.hasPermission(Permission.STAFF_PERMISSION)) { + event.setCancelled(true); + + player.sendMessage(Color.translate("&cChat is currently muted.")); + return; + } + + if(Vituz.getInstance().getChatControlManager().getDelay() > 0 && !player.hasPermission(Permission.STAFF_PERMISSION)) { + if(Vituz.getInstance().getChatControlManager().isActive(player)) { + event.setCancelled(true); + player.sendMessage(Color.translate("&cYou can't use chat for another &l" + StringUtils.getRemaining(Vituz.getInstance().getChatControlManager().getMillisecondsLeft(player), true) + "&c.")); + return; + } + + Vituz.getInstance().getChatControlManager().applyCooldown(player); + } + + for(Player recipient : event.getRecipients()) { + recipient.sendMessage(this.getFormat(player, message, recipient)); + } + + ConsoleCommandSender console = Bukkit.getConsoleSender(); + + console.sendMessage(this.getFormat(player, message, console)); + } + + private String getFormat(Player player, String message, CommandSender viewer) { + if(player.isOp()) { + return Color.translate(player.getDisplayName() + " &6» &f" + message); + } else { + return Color.translate(player.getDisplayName() + " &6» &f") + message; + } + } +} diff --git a/Factions/src/secondlife/network/victions/listeners/ChunkBusterListener.java b/Factions/src/secondlife/network/victions/listeners/ChunkBusterListener.java new file mode 100644 index 0000000..1ff548a --- /dev/null +++ b/Factions/src/secondlife/network/victions/listeners/ChunkBusterListener.java @@ -0,0 +1,63 @@ +package secondlife.network.victions.listeners; + +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.inventory.ItemStack; +import secondlife.network.victions.Victions; +import secondlife.network.victions.VictionsAPI; +import secondlife.network.vituz.utilties.Color; + +/** + * Created by Marko on 19.07.2018. + */ +public class ChunkBusterListener implements Listener { + + private Victions plugin = Victions.getInstance(); + + @EventHandler + public void onBlockPlace(BlockPlaceEvent event) { + if(event.isCancelled()) return; + + Player player = event.getPlayer(); + + ItemStack item = event.getItemInHand(); + if(item == null || item.getType() == Material.AIR) return; + if(!item.hasItemMeta()) return; + if(!item.getItemMeta().getDisplayName().equals(Color.translate("&dChunk Buster"))) return; + + event.setCancelled(true); + + if(VictionsAPI.getByFaction(player) == null) { + player.sendMessage(Color.translate("&cYou aren't in a faction.")); + return; + } + + Block block = event.getBlockPlaced(); + + int blockX = block.getChunk().getX() << 4; + int blockZ = block.getChunk().getZ() << 4; + + Bukkit.getScheduler().scheduleAsyncDelayedTask(plugin, () -> { + Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> { + for(int x = blockX; x < blockX + 16; ++x) { + for(int z = blockZ; z < blockZ + 16; ++z) { + for(int y = 0; y < 255; ++y) { + World world = block.getWorld(); + Block blockAt = world.getBlockAt(x, y, z); + + if(!blockAt.getType().equals(Material.BEDROCK)) { + blockAt.setType(Material.AIR); + } + } + } + } + }, 0L); + }, 10L); + } +} diff --git a/Factions/src/secondlife/network/victions/listeners/EntityLimiterListener.java b/Factions/src/secondlife/network/victions/listeners/EntityLimiterListener.java new file mode 100644 index 0000000..da9c5b1 --- /dev/null +++ b/Factions/src/secondlife/network/victions/listeners/EntityLimiterListener.java @@ -0,0 +1,22 @@ +package secondlife.network.victions.listeners; + +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntitySpawnEvent; +import secondlife.network.victions.Victions; + +/** + * Created by Marko on 18.07.2018. + */ +public class EntityLimiterListener implements Listener { + + private Victions plugin = Victions.getInstance(); + + @EventHandler + public void onEntitySpawn(EntitySpawnEvent event) { + if(!plugin.getEntityLimiterManager().getDisabledEntities().containsKey(event.getEntity().getType())) return; + if(!plugin.getEntityLimiterManager().getDisabledEntities().get(event.getEntity().getType())) return; + + event.setCancelled(true); + } +} diff --git a/Factions/src/secondlife/network/victions/listeners/FactionsListener.java b/Factions/src/secondlife/network/victions/listeners/FactionsListener.java new file mode 100644 index 0000000..d74fb0f --- /dev/null +++ b/Factions/src/secondlife/network/victions/listeners/FactionsListener.java @@ -0,0 +1,386 @@ +package secondlife.network.victions.listeners; + +import com.massivecraft.factions.Board; +import com.massivecraft.factions.FLocation; +import com.massivecraft.factions.FPlayer; +import com.massivecraft.factions.FPlayers; +import com.massivecraft.factions.listeners.FactionsBlockListener; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.entity.*; +import org.bukkit.entity.minecart.ExplosiveMinecart; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.block.BlockFromToEvent; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.event.entity.CreatureSpawnEvent; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDeathEvent; +import org.bukkit.event.entity.EntityExplodeEvent; +import org.bukkit.event.inventory.PrepareItemCraftEvent; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; +import secondlife.network.victions.VictionsAPI; +import secondlife.network.victions.VictionsConfig; +import secondlife.network.victions.utilities.FactionsUtils; +import secondlife.network.vituz.utilties.Color; + +import java.util.List; +import java.util.stream.Stream; + +/** + * Created by Marko on 18.07.2018. + */ +public class FactionsListener implements Listener { + + @EventHandler + public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) { + Player player = event.getPlayer(); + Material material = player.getLocation().getBlock().getType(); + + String[] commands = new String[] { + "home", "sethome", "warp", + "warps", + }; + + for(String command : commands) { + if(material.equals(Material.STATIONARY_WATER) + || material.equals(Material.WATER) + || material.equals(Material.LAVA) + || material.equals(Material.STATIONARY_LAVA)) { + if(event.getMessage().toLowerCase().startsWith("/" + command.toLowerCase())) { + event.setCancelled(true); + player.sendMessage(Color.translate("&cYou can't use this command in lava/water!")); + } + } + } + } + + @EventHandler + public void onCreatureSpawn(CreatureSpawnEvent event) { + if(event.getSpawnReason().equals(CreatureSpawnEvent.SpawnReason.SPAWNER_EGG)) { + Block block = event.getLocation().getBlock(); + + if(block.getType().equals(Material.COBBLESTONE)) { + event.setCancelled(true); + } + } + } + + @EventHandler + public void onPrepareItemCraft(PrepareItemCraftEvent event) { + Material item = event.getRecipe().getResult().getType(); + + if(item.equals(Material.HOPPER)) { + event.getInventory().setResult(new ItemStack(Material.AIR)); + } + } + + @EventHandler + public void onEntityExplode(EntityExplodeEvent event) { + if((event.getEntity() instanceof TNTPrimed) || (event.getEntity() instanceof ExplosiveMinecart)) { + if(!VictionsConfig.isTntExplosion()) { + event.setCancelled(true); + } + + if(!VictionsConfig.isTnTExplosionDamage()) { + event.blockList().clear(); + } + } + + if(event.getEntity() instanceof Creeper) { + if(!VictionsConfig.isCreeperExplosion()) { + event.setCancelled(true); + } + + if(!VictionsConfig.isCreeperExplosionDamage()) { + event.blockList().clear(); + } + } + } + + @EventHandler + public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { + if(event.getEntity() instanceof Player) { + if((event.getDamager() instanceof TNTPrimed) || (event.getDamager() instanceof ExplosiveMinecart)) { + if(!VictionsConfig.isTntExplosion()) { + event.setCancelled(true); + } + + } + + if(event.getDamager() instanceof Creeper) { + if(!VictionsConfig.isCreeperExplosion()) { + event.setCancelled(true); + } + + } + } + } + + @EventHandler + public void onBlockFromTo(BlockFromToEvent event) { + World world = event.getBlock().getWorld(); + Block blockFrom = event.getBlock(); + Block blockTo = event.getBlock(); + + int blockX = blockTo.getX(); + int blockY = blockTo.getY(); + int blockZ = blockTo.getZ(); + + boolean isLava = (blockFrom.getTypeId() == 10) || (blockFrom.getTypeId() == 11); + + if(VictionsConfig.isWaterSponge()) { + if(blockFrom.getType().equals(Material.WATER) || blockFrom.getType().equals(Material.STATIONARY_WATER)) { + int radius = 3; + + for(int x = -radius; x <= radius; x++) { + for(int y = -radius; y <= radius; y++) { + for(int z = -radius; z <= radius; z++) { + Block block = world.getBlockAt(blockX + x, blockY + y, blockZ + z); + + if(block.getType().equals(Material.SPONGE)) { + event.setCancelled(true); + } + } + } + } + } + } + + if(VictionsConfig.isLavaSponge()) { + if(blockFrom.getType().equals(Material.LAVA) || blockFrom.getType().equals(Material.STATIONARY_LAVA)) { + int radius = 3; + + for(int x = -radius; x <= radius; x++) { + for(int y = -radius; y <= radius; y++) { + for(int z = -radius; z <= radius; z++) { + Block block = world.getBlockAt(blockX + x, blockY + y, blockZ + z); + + if(block.getType().equals(Material.SPONGE)) { + event.setCancelled(true); + } + } + } + } + } + } + + if(isLava) { + event.setCancelled(true); + } + } + + @EventHandler + public void onBlockBreak(BlockBreakEvent event) { + if(event.isCancelled()) { + return; + } + + ItemStack item = event.getPlayer().getItemInHand(); + + int size = 1; + int amount = 2; + + if((item.getType() == Material.DIAMOND_PICKAXE) && (item.getItemMeta().hasLore()) && (item.getItemMeta().getLore().contains("Breaks blocks in 3x3"))) { + for(int x = event.getBlock().getX() - size; x <= event.getBlock().getX() + size; x++) { + for(int y = event.getBlock().getY() - size; y <= event.getBlock().getY() + size; y++) { + for(int z = event.getBlock().getZ() - size; z <= event.getBlock().getZ() + size; z++) { + Location loc = new Location(event.getBlock().getWorld(), x, y, z); + + if(loc.getWorld().getEnvironment() == World.Environment.NETHER) { + return; + } + + if((FactionsBlockListener.playerCanBuildDestroyBlock(event.getPlayer(), loc, "BUILD", false)) && (VictionsAPI.getWorldGuard().canBuild(event.getPlayer(), loc)) && (isBreakable(loc.getBlock().getType()))) { + loc.getBlock().breakNaturally(); + } + } + } + } + } + + if((item.getType() == Material.DIAMOND_PICKAXE) && (item.getItemMeta().hasLore()) && (item.getItemMeta().getLore().contains("Breaks blocks in 5x5"))) { + for(int x = event.getBlock().getX() - amount; x <= event.getBlock().getX() + amount; x++) { + for(int y = event.getBlock().getY() - amount; y <= event.getBlock().getY() + amount; y++) { + for(int z = event.getBlock().getZ() - amount; z <= event.getBlock().getZ() + amount; z++) { + Location loc = new Location(event.getBlock().getWorld(), x, y, z); + + if(loc.getWorld().getEnvironment() == World.Environment.NETHER) { + return; + } + + if((FactionsBlockListener.playerCanBuildDestroyBlock(event.getPlayer(), loc, "BUILD", false)) && (VictionsAPI.getWorldGuard().canBuild(event.getPlayer(), loc)) && (isBreakable(loc.getBlock().getType()))) { + loc.getBlock().breakNaturally(); + } + } + } + } + } + + if((item.getType() == Material.DIAMOND_HOE) && (item.getItemMeta().hasLore()) && (item.getItemMeta().getLore().contains("You don't need to pickup sugarcane"))) { + if(event.getBlock().getType() == Material.SUGAR_CANE_BLOCK) { + event.setCancelled(true); + + Location currLoc = event.getBlock().getLocation(); + + while(currLoc.getBlock().getType().equals(Material.SUGAR_CANE_BLOCK)) { + currLoc = new Location(currLoc.getWorld(), currLoc.getBlockX(), currLoc.getBlockY() + 1, currLoc.getBlockZ()); + } + + currLoc = new Location(currLoc.getWorld(), currLoc.getBlockX(), currLoc.getBlockY() - 1, currLoc.getBlockZ()); + + while(currLoc.getBlockY() >= event.getBlock().getY()) { + currLoc.getBlock().setType(Material.AIR); + + handleGiveItem(event.getPlayer(), Material.SUGAR_CANE); + + currLoc = new Location(currLoc.getWorld(), currLoc.getBlockX(), currLoc.getBlockY() - 1, currLoc.getBlockZ()); + } + } + } + } + + @EventHandler + public void onBlockPlace(BlockPlaceEvent event) { + if(event.isCancelled()) { + return; + } + + Player player = event.getPlayer(); + Block block = event.getBlock(); + FPlayer fplayer = FPlayers.getInstance().getByPlayer(player); + Location location = block.getLocation(); + FLocation Floc = new FLocation(location); + + if(Board.getInstance().getFactionAt(Floc).isWilderness() || fplayer.isInOwnTerritory() || fplayer.isAdminBypassing()) { + if(block.getType() == Material.SPONGE) { + int blockX = block.getX(); + int blockY = block.getY(); + int blockZ = block.getZ(); + + int radius = 3 - 1; + + for(int x = -radius; x <= radius; x++) { + for(int y = -radius; y <= radius; y++) { + for(int z = -radius; z <= radius; z++) { + Block blockAt = block.getWorld().getBlockAt(blockX + x, blockY + y, blockZ + z); + + if(blockAt.getType() == Material.WATER || blockAt.getType() == Material.STATIONARY_WATER) { + blockAt.setType(Material.AIR); + } + + if(blockAt.getType() == Material.LAVA || blockAt.getType() == Material.STATIONARY_LAVA) { + blockAt.setType(Material.AIR); + } + } + } + } + } + } + } + + @EventHandler + public void onEntityDeath(EntityDeathEvent event) { + handleEntityDeath(event.getEntity(), event.getDrops()); + } + + @EventHandler + public void onPlayerInteract(PlayerInteractEvent event) { + Block block = event.getClickedBlock(); + Player player = event.getPlayer(); + + if(VictionsAPI.isPvPEnabled(player) || event.getAction() != Action.RIGHT_CLICK_BLOCK) { + return; + } + + if(block.getType().equals(Material.ANVIL)) { + block.setType(Material.ANVIL); + } + } + + private boolean isBreakable(Material material) { + if(material.equals(Material.CHEST) + || material.equals(Material.TRAPPED_CHEST) + || material.equals(Material.BEDROCK) + || material.equals(Material.WATER) + || material.equals(Material.LAVA) + || material.equals(Material.MOB_SPAWNER)) { + return false; + } + + return true; + } + + private void handleGiveItem(Player player, Material m) { + if(player.getInventory().firstEmpty() != -1) { + player.getInventory().addItem(new ItemStack(m)); + } else if(getSlot(player, m) != -1) { + player.getInventory().addItem(new ItemStack(m)); + } else { + player.getWorld().dropItem(player.getLocation(), new ItemStack(m)); + } + } + + private int getSlot(Player player, Material material) { + for(int i = 0; i < player.getInventory().getSize(); i++) { + if((player.getInventory().getItem(i).getType().equals(material)) && (player.getInventory().getItem(i).getAmount() < player.getInventory().getItem(i).getMaxStackSize())) { + return i; + } + } + + return -1; + } + + private Material[] shit = { + Material.RED_ROSE, + Material.BOW, + Material.SULPHUR, + + Material.CHAINMAIL_BOOTS, + Material.CHAINMAIL_CHESTPLATE, + Material.CHAINMAIL_HELMET, + Material.CHAINMAIL_LEGGINGS, + + Material.GOLD_BOOTS, + Material.GOLD_CHESTPLATE, + Material.GOLD_HELMET, + Material.GOLD_LEGGINGS, + + Material.LEATHER_BOOTS, + Material.LEATHER_CHESTPLATE, + Material.LEATHER_HELMET, + Material.LEATHER_LEGGINGS + }; + + private void handleEntityDeath(Entity entity, List drops) { + if(!(entity instanceof Player)) { + drops.forEach(drop -> Stream.of(shit).forEach(shit -> { + if(drop.getType().equals(shit)) { + drops.remove(drop); + } + })); + } + + if(entity instanceof Creeper) { + if(FactionsUtils.random(1, 3) == 1) drops.add(new ItemStack(Material.TNT)); + } + + int emerald = FactionsUtils.random(1, 10); + + if(entity instanceof Silverfish) { + if(emerald >= 9) { + drops.add(new ItemStack(Material.EMERALD, 3)); + } else if(emerald >= 6) { + drops.add(new ItemStack(Material.EMERALD, 2)); + } else { + drops.add(new ItemStack(Material.EMERALD)); + } + } + } +} diff --git a/Factions/src/secondlife/network/victions/listeners/MobStackListener.java b/Factions/src/secondlife/network/victions/listeners/MobStackListener.java new file mode 100644 index 0000000..5af21d7 --- /dev/null +++ b/Factions/src/secondlife/network/victions/listeners/MobStackListener.java @@ -0,0 +1,22 @@ +package secondlife.network.victions.listeners; + +import org.bukkit.ChatColor; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.LivingEntity; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDeathEvent; +import secondlife.network.victions.Victions; + +public class MobStackListener implements Listener { + + @EventHandler + public void onEntityDeath(EntityDeathEvent event) { + if(event.getEntity() != null) { + LivingEntity entity = event.getEntity(); + if(entity.getType() != EntityType.PLAYER && entity.getType() != EntityType.VILLAGER) { + Victions.getInstance().getMobStackManager().handleUnstackOne(entity, ChatColor.RED); + } + } + } +} diff --git a/Factions/src/secondlife/network/victions/listeners/PlayerListener.java b/Factions/src/secondlife/network/victions/listeners/PlayerListener.java new file mode 100644 index 0000000..6327085 --- /dev/null +++ b/Factions/src/secondlife/network/victions/listeners/PlayerListener.java @@ -0,0 +1,179 @@ +package secondlife.network.victions.listeners; + +import org.bukkit.Bukkit; +import org.bukkit.GameMode; +import org.bukkit.entity.Player; +import org.bukkit.event.Event; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.event.inventory.ClickType; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerJoinEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import secondlife.network.victions.Victions; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.StringUtils; + +/** + * Created by Marko on 18.07.2018. + */ +public class PlayerListener implements Listener { + + private Victions plugin = Victions.getInstance(); + + @EventHandler + public void onPlayerJoin(PlayerJoinEvent event) { + Player player = event.getPlayer(); + FactionsData data = FactionsData.getByName(player.getName()); + + if(data.isNightVision()) { + if(!player.hasPotionEffect(PotionEffectType.NIGHT_VISION)) { + player.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, Integer.MAX_VALUE, 0)); + } + } else { + if(player.hasPotionEffect(PotionEffectType.NIGHT_VISION)) { + player.removePotionEffect(PotionEffectType.NIGHT_VISION); + } + } + } + + @EventHandler + public void onPlayerQuit(PlayerQuitEvent event) { + Player player = event.getPlayer(); + FactionsData data = FactionsData.getByName(player.getName()); + + data.save(); + + if(plugin.getPlayerManager().isSpawnTagActive(player) && !player.hasMetadata("LogoutCommand")) { + player.setHealth(0.0D); + } + + data.cancelHome(player); + data.cancelLogout(player); + data.cancelPearl(player); + } + + @EventHandler + public void onPlayerDeath(PlayerDeathEvent event) { + Player player = event.getEntity(); + FactionsData data = FactionsData.getByName(player.getName()); + + data.cancelPearl(player); + } + + @EventHandler + public void onEntityDamage(EntityDamageEvent event) { + if(event.getEntity() instanceof Player) { + Player player = (Player) event.getEntity(); + + FactionsData data = FactionsData.getByName(player.getName()); + + if(data != null) { + if(data.isHomeActive(player)) { + data.cancelHome(player); + player.sendMessage(Color.translate("&eTeleport canceled because you were damaged.")); + } + + if(data.isLogoutActive(player)) { + data.cancelLogout(player); + player.sendMessage(Color.translate("&eTeleport canceled because you were damaged.")); + } + + if(data.isNeedToTeleport()) { + data.setNeedToTeleport(false); + player.sendMessage(Color.translate("&eTeleport canceled because you were damaged.")); + } + + if(data.isJellyLegs() && event.getCause().equals(EntityDamageEvent.DamageCause.FALL)) { + event.setCancelled(true); + } + } + } + } + + @EventHandler + public void onPlayerInteract(PlayerInteractEvent event) { + Player player = event.getPlayer(); + FactionsData data = FactionsData.getByName(player.getName()); + + if(player.getGameMode().equals(GameMode.CREATIVE)) { + return; + } + + if(!event.hasItem()) { + return; + } + + if(event.getAction().name().startsWith("RIGHT_")) { + ItemStack stack = event.getItem(); + + switch (stack.getType()) { + case ENDER_PEARL: { + if(data.isPearlActive(player)) { + event.setUseItemInHand(Event.Result.DENY); + player.sendMessage(Color.translate("&cYou can't use this for another &l" + StringUtils.getRemaining(data.getPearlMillisecondsLeft(player), true) + "!")); + } else { + data.applyPearlCooldown(player); + } + break; + } + } + } + } + + /*@EventHandler + public void onPlayerPickupItem(PlayerPickupItemEvent event) { + Item item = event.getItem(); + ItemStack stack = item.getItemStack(); + Player player = event.getPlayer(); + + if(stack.getType() == Material.POTION) { + event.setCancelled(true); + + if(player.getInventory().firstEmpty() == -1) { + player.getInventory().addItem(stack); + item.remove(); + } + } + }*/ + + @EventHandler(ignoreCancelled = true) + public void onInventoryClick(InventoryClickEvent event) { + Inventory inventory = event.getView().getTopInventory(); + + if(inventory != null && inventory.getType() == InventoryType.BREWING) { + if(event.getClick() == ClickType.NUMBER_KEY && (event.getRawSlot() == 0 || event.getRawSlot() == 1 || event.getRawSlot() == 2)) { + event.setCancelled(true); + return; + } + + if(event.getClick().name().contains("SHIFT") && event.getCurrentItem().getAmount() > 1) { + Player player = (Player) event.getWhoClicked(); + ItemStack stack = event.getCurrentItem(); + ItemStack newStack = new ItemStack(stack); + + newStack.setAmount(stack.getAmount() - 1); + stack.setAmount(1); + + Bukkit.getScheduler().runTask(plugin, () -> { + if(player.getInventory().getItem(event.getSlot()) == null) { + player.getInventory().setItem(event.getSlot(), newStack); + } else { + stack.setAmount(newStack.getAmount() + 1); + } + + player.updateInventory(); + }); + } + } + } +} diff --git a/Factions/src/secondlife/network/victions/listeners/PotionLimitListener.java b/Factions/src/secondlife/network/victions/listeners/PotionLimitListener.java new file mode 100644 index 0000000..87de9cb --- /dev/null +++ b/Factions/src/secondlife/network/victions/listeners/PotionLimitListener.java @@ -0,0 +1,154 @@ +package secondlife.network.victions.listeners; + +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.entity.ThrownPotion; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.PotionSplashEvent; +import org.bukkit.event.inventory.BrewEvent; +import org.bukkit.event.player.PlayerItemConsumeEvent; +import org.bukkit.inventory.BrewerInventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.Potion; +import org.bukkit.potion.PotionEffect; +import org.bukkit.scheduler.BukkitRunnable; +import secondlife.network.victions.Victions; +import secondlife.network.victions.managers.PotionLimitManager; +import secondlife.network.vituz.utilties.Color; + +public class PotionLimitListener implements Listener { + + private Victions plugin = Victions.getInstance(); + + @EventHandler + public void onBrew(BrewEvent event) { + BrewerInventory brewer = event.getContents(); + + ItemStack ingredient = brewer.getIngredient().clone(); + ItemStack[] potions = new ItemStack[3]; + + for(int i = 0; i < 3; ++i) { + if(event.getContents().getItem(i) != null) { + potions[i] = brewer.getItem(i).clone(); + } + } + + new BukkitRunnable() { + public void run() { + for(int i = 0; i < 3; ++i) { + if(brewer.getItem(i) != null && brewer.getItem(i).getType() == Material.POTION) { + for(PotionEffect potionEffect : Potion.fromItemStack(brewer.getItem(i)).getEffects()) { + for(PotionLimitManager.PotionLimit potionLimit : plugin.getPotionLimitManager().getPotionLimits()) { + int maxLevel = potionLimit.getLevel(); + int level = potionEffect.getAmplifier() + 1; + + Potion potion = Potion.fromItemStack(brewer.getItem(i)); + + if(maxLevel == 0 || level > maxLevel) { + brewer.setIngredient(ingredient); + + for(int item = 0; item < 3; ++item) { + brewer.setItem(item, potions[item]); + } + + return; + } + + if(potion.hasExtendedDuration() && !potionLimit.isExtended()) { + brewer.setIngredient(ingredient); + + for(int item = 0; item < 3; ++item) { + brewer.setItem(item, potions[item]); + } + + return; + } + } + } + } + } + } + }.runTaskLater(plugin, 1L); + } + + @EventHandler + public void onPlayerItemConsume(PlayerItemConsumeEvent event) { + Player player = event.getPlayer(); + ItemStack item = event.getItem(); + + if(!item.getType().equals(Material.POTION)) return; + if(item.getType().equals(Material.POTION) && item.getDurability() == 0) return; + + Potion.fromItemStack(item).getEffects().forEach(potionEffect -> { + plugin.getPotionLimitManager().getPotionLimits().forEach(potionLimit -> { + if(potionLimit.getType().equals(potionEffect.getType())) { + int maxLevel = potionLimit.getLevel(); + int level = potionEffect.getAmplifier() + 1; + + Potion potion = Potion.fromItemStack(item); + + if(maxLevel == 0 || level > maxLevel) { + event.setCancelled(true); + player.setItemInHand(new ItemStack(Material.AIR)); + player.sendMessage(Color.translate("&cThis Potion Effect is disabled.")); + return; + } + + if(potion.hasExtendedDuration() && !potionLimit.isExtended()) { + event.setCancelled(true); + player.setItemInHand(new ItemStack(Material.AIR)); + player.sendMessage(Color.translate("&cThis Potion Effect is disabled.")); + return; + } + } + }); + }); + } + + @EventHandler + public void onPotionSplash(PotionSplashEvent event) { + ThrownPotion thrownPotion = event.getPotion(); + + thrownPotion.getEffects().forEach(potionEffect -> { + plugin.getPotionLimitManager().getPotionLimits().forEach(potionLimit -> { + if(potionLimit.getType().equals(potionEffect.getType())) { + if(thrownPotion.getShooter() instanceof Player) { + Player shooter = (Player) thrownPotion.getShooter(); + + int maxLevel = potionLimit.getLevel(); + int level = potionEffect.getAmplifier() + 1; + + Potion potion = Potion.fromItemStack(thrownPotion.getItem()); + + if(maxLevel == 0 || level > maxLevel) { + event.setCancelled(true); + shooter.sendMessage(Color.translate("&cThis Potion Effect is disabled.")); + return; + } + if(potion.hasExtendedDuration() && !potionLimit.isExtended()) { + event.setCancelled(true); + shooter.sendMessage(Color.translate("&cThis Potion Effect is disabled.")); + return; + } + } else { + int maxLevel = potionLimit.getLevel(); + int level = potionEffect.getAmplifier(); + + Potion potion = Potion.fromItemStack(thrownPotion.getItem()); + + if(maxLevel == 0 || level > maxLevel) { + event.setCancelled(true); + return; + } + + if(potion.hasExtendedDuration() && !potionLimit.isExtended()) { + event.setCancelled(true); + return; + } + } + } + }); + }); + } +} diff --git a/Factions/src/secondlife/network/victions/listeners/SellWandListener.java b/Factions/src/secondlife/network/victions/listeners/SellWandListener.java new file mode 100644 index 0000000..052fe19 --- /dev/null +++ b/Factions/src/secondlife/network/victions/listeners/SellWandListener.java @@ -0,0 +1,168 @@ +package secondlife.network.victions.listeners; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.block.Chest; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import secondlife.network.victions.Victions; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.victions.utilities.GlowEnchantment; +import secondlife.network.vituz.utilties.Color; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by Marko on 18.07.2018. + */ +public class SellWandListener implements Listener { + + private Victions plugin = Victions.getInstance(); + + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) + public void onPlayerInteract(PlayerInteractEvent event) { + if(event.isCancelled()) return; + + if(event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.LEFT_CLICK_BLOCK) { + Player player = event.getPlayer(); + + if(player.getItemInHand() == null + || !player.getItemInHand().hasItemMeta() + || !player.getItemInHand().getItemMeta().hasLore()) { + return; + } + + ItemStack stack = new ItemStack(Material.DIAMOND_HOE); + ItemMeta meta = stack.getItemMeta(); + + List lore = new ArrayList<>(); + lore.add("&fRight click chest with"); + lore.add("&fthis item to sell it's contents."); + + List playerLore = new ArrayList<>(); + playerLore.addAll(player.getItemInHand().getItemMeta().getLore()); + + List itemLore = new ArrayList<>(); + itemLore.addAll(lore); + + itemLore.forEach(iLore -> { + if(playerLore.contains(iLore)) { + playerLore.remove(iLore); + } + }); + + int uses = -1; + + if(!playerLore.isEmpty() && playerLore.get(0).startsWith(Color.translate("&fUses: &d" + uses))) { + lore.add(playerLore.get(0)); + + String toModify = ChatColor.stripColor(playerLore.get(0)); + + toModify = toModify.replaceAll("[^\\d.]", ""); + uses = Integer.parseInt(toModify); + } + + meta.setLore(lore); + meta.setDisplayName(Color.translate("&dSell Wand")); + stack.setAmount(player.getItemInHand().getAmount()); + stack.setItemMeta(meta); + + if(!player.getItemInHand().equals(stack)) { + return; + } + + event.setCancelled(true); + + Block block = event.getClickedBlock(); + + if(block.getType().equals(Material.CHEST) || block.getType().equals(Material.TRAPPED_CHEST)) { + BlockBreakEvent toCall = new BlockBreakEvent(event.getClickedBlock(), player); + + Bukkit.getServer().getPluginManager().callEvent(toCall); + + if(toCall.isCancelled()) { + return; + } + + Chest chest = (Chest) block.getState(); + Inventory inventory = chest.getInventory(); + + int slot = 0; + int totalSale = 0; + + for(ItemStack stackInChest : inventory) { + if(stackInChest == null + || stackInChest.getType().equals(Material.AIR) + || stackInChest.getType() == null) { + slot++; + } else { + String type = stackInChest.getType().toString().toLowerCase(); + type = type.replace("_", ""); + + String dataCode = String.valueOf(stackInChest.getData().getData()); + + if(plugin.getSellWandManager().getPrices().containsKey(type)) { + chest.getInventory().setItem(slot, new ItemStack(Material.AIR)); + totalSale = totalSale + plugin.getSellWandManager().getPrices().get(type) * stackInChest.getAmount(); + } else if(plugin.getSellWandManager().getPrices().containsKey(type + ":" + dataCode)) { + chest.getInventory().setItem(slot, new ItemStack(Material.AIR)); + totalSale = totalSale + plugin.getSellWandManager().getPrices().get(type + ":" + dataCode) * stackInChest.getAmount(); + } + + slot++; + } + } + + FactionsData data = FactionsData.getByName(player.getName()); + data.setBalance(data.getBalance() + totalSale); + + player.sendMessage(Color.translate("&eYou have received &d$ " + totalSale + "&e.")); + + if(uses > 0) { + uses--; + + if(uses <= 0) { + player.setItemInHand(new ItemStack(Material.AIR)); + player.sendMessage(Color.translate("&cYour sell wand has no more uses left.")); + } else { + ItemStack toReplace = new ItemStack(Material.DIAMOND_HOE); + ItemMeta toReplaceMeta = toReplace.getItemMeta(); + List toReplaceLore = new ArrayList<>(); + + toReplaceLore.add("&fRight click chest with"); + toReplaceLore.add("&fthis item to sell it's contents."); + + Enchantment enchantment = GlowEnchantment.getGlow(); + + toReplaceMeta.addEnchant(enchantment, 1, true); + + toReplaceLore.add(""); + toReplaceLore.add("&fUses: &d" + uses); + + toReplaceMeta.setLore(toReplaceLore); + toReplaceMeta.setDisplayName(Color.translate("&dSell Wand")); + + toReplace.setAmount(player.getItemInHand().getAmount()); + toReplace.setItemMeta(toReplaceMeta); + + player.setItemInHand(toReplace); + + player.sendMessage(Color.translate("&eYour &dSell Wand &enow has &d" + uses + " &euses left.")); + } + } + } + } + } +} diff --git a/Factions/src/secondlife/network/victions/listeners/SpawnTagListener.java b/Factions/src/secondlife/network/victions/listeners/SpawnTagListener.java new file mode 100644 index 0000000..4e82f09 --- /dev/null +++ b/Factions/src/secondlife/network/victions/listeners/SpawnTagListener.java @@ -0,0 +1,122 @@ +package secondlife.network.victions.listeners; + +import com.massivecraft.factions.FPlayers; +import com.massivecraft.factions.Faction; +import com.massivecraft.factions.struct.Relation; +import org.bukkit.entity.Player; +import org.bukkit.entity.Projectile; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; +import org.bukkit.event.player.PlayerToggleFlightEvent; +import secondlife.network.victions.Victions; +import secondlife.network.victions.VictionsAPI; +import secondlife.network.vituz.data.PlayerData; +import secondlife.network.vituz.utilties.Color; + +/** + * Created by Marko on 28.07.2018. + */ +public class SpawnTagListener implements Listener { + + private Victions plugin = Victions.getInstance(); + + private String[] commands = { + "f home", "fhome", "f stuck", + "fstuck", "logout" + }; + + @EventHandler + public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { + if(event.getEntity() instanceof Player) { + if(event.getDamager() instanceof Player) { + Player victim = (Player) event.getEntity(); + Player damager = (Player) event.getDamager(); + + Faction victimFaction = FPlayers.getInstance().getByPlayer(victim).getFaction(); + Faction damagerFaction = FPlayers.getInstance().getByPlayer(damager).getFaction(); + + if(victimFaction.isPeaceful() || damagerFaction.isPeaceful()) return; + if(victimFaction.equals(damagerFaction) && !victimFaction.isWilderness()) return; + if(!VictionsAPI.isPvPEnabled(victim) || !VictionsAPI.isPvPEnabled(damager)) return; + if(PlayerData.getByName(victim.getName()).isFrozen() || PlayerData.getByName(damager.getName()).isFrozen()) return; + //if(FactionsManager.getInstance().getVanishHandler().isVanished(victim) || FactionsManager.getInstance().getVanishHandler().isVanished(damager)) return; + if(victimFaction.getRelationTo(damagerFaction) == Relation.ALLY) return; + + plugin.getPlayerManager().applyTagger(damager, victim); + plugin.getPlayerManager().applyOther(damager, victim); + + } else if(event.getDamager() instanceof Projectile) { + + Projectile projectile = (Projectile) event.getDamager(); + + if(projectile.getShooter() instanceof Player) { + + Player shooter = (Player) projectile.getShooter(); + + if(shooter != event.getEntity()) { + Player player = (Player) event.getEntity(); + + Faction playerFaction = FPlayers.getInstance().getByPlayer(player).getFaction(); + Faction shooterFaction = FPlayers.getInstance().getByPlayer(shooter).getFaction(); + + if(playerFaction.isPeaceful() || shooterFaction.isPeaceful()) return; + if(playerFaction.equals(shooterFaction) && !playerFaction.isWilderness()) return; + if(!VictionsAPI.isPvPEnabled(player) || !VictionsAPI.isPvPEnabled(shooter)) return; + if(PlayerData.getByName(player.getName()).isFrozen() || PlayerData.getByName(shooter.getName()).isFrozen()) return; + //if(FactionsManager.getInstance().getVanishHandler().isVanished(player) || FactionsManager.getInstance().getVanishHandler().isVanished(shooter)) return; + if(playerFaction.getRelationTo(shooterFaction) == Relation.ALLY) return; + + plugin.getPlayerManager().applyTagger(shooter, player); + plugin.getPlayerManager().applyOther(shooter, player); + } + } + } + } + } + + @EventHandler + public void onPlayerToggleFlight(PlayerToggleFlightEvent event) { + Player player = event.getPlayer(); + + if(plugin.getPlayerManager().isSpawnTagActive(player)) { + player.setAllowFlight(false); + event.setCancelled(true); + } + } + + @EventHandler + public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) { + Player player = event.getPlayer(); + + if(plugin.getPlayerManager().isSpawnTagActive(player)) { + boolean sendMessage = false; + + for(String command : commands) { + + if(event.getMessage().toLowerCase().startsWith("/" + command.toLowerCase())) { + event.setCancelled(true); + + sendMessage = true; + + } + + } + + if(sendMessage) { + player.sendMessage(Color.translate("&eYou can't use this command while you are spawn tagged.")); + } + + } + } + + @EventHandler + public void onPlayerDeath(PlayerDeathEvent event) { + Player player = event.getEntity(); + if(plugin.getPlayerManager().getTagged().containsKey(player.getUniqueId())) { + plugin.getPlayerManager().getTagged().remove(player.getUniqueId()); + } + } +} diff --git a/Factions/src/secondlife/network/victions/managers/EntityLimiterManager.java b/Factions/src/secondlife/network/victions/managers/EntityLimiterManager.java new file mode 100644 index 0000000..61b9958 --- /dev/null +++ b/Factions/src/secondlife/network/victions/managers/EntityLimiterManager.java @@ -0,0 +1,37 @@ +package secondlife.network.victions.managers; + +import lombok.Getter; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.EntityType; +import secondlife.network.victions.Victions; +import secondlife.network.victions.utilities.Manager; + +import java.util.HashMap; +import java.util.Map; + +/** + * Created by Marko on 18.07.2018. + */ + +@Getter +public class EntityLimiterManager extends Manager { + + private Map disabledEntities = new HashMap<>(); + + public EntityLimiterManager(Victions plugin) { + super(plugin); + + handleSetup(); + } + + private void handleSetup() { + ConfigurationSection section = plugin.getMainConfig().getConfigurationSection("potion-limiter"); + + section.getKeys(false).forEach(type -> { + EntityType entityType = EntityType.valueOf(type); + boolean enabled = section.getBoolean(type); + + disabledEntities.put(entityType, enabled); + }); + } +} diff --git a/Factions/src/secondlife/network/victions/managers/FactionsManager.java b/Factions/src/secondlife/network/victions/managers/FactionsManager.java new file mode 100644 index 0000000..1754c3e --- /dev/null +++ b/Factions/src/secondlife/network/victions/managers/FactionsManager.java @@ -0,0 +1,78 @@ +package secondlife.network.victions.managers; + +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import secondlife.network.victions.Victions; +import secondlife.network.victions.utilities.Manager; +import secondlife.network.vituz.utilties.Color; + +/** + * Created by Marko on 18.07.2018. + */ +public class FactionsManager extends Manager { + + public FactionsManager(Victions plugin) { + super(plugin); + } + + public void handleCraftTNT(Player player) { + Inventory inventory = player.getInventory(); + + int sandCount = countItems(inventory, Material.SAND, 0); + int sulphurCount = countItems(inventory, Material.SULPHUR, 0); + int sandDivided = sandCount / 4; + int sulphurDivided = sulphurCount / 5; + + if(sandDivided == 0 || sulphurDivided == 0) { + player.sendMessage(Color.translate("&eYou don't have enough &dSand &eor &dGunpowder&e.")); + return; + } + + int maxTNTAmount = Math.min(sandDivided, sulphurDivided); + int sandExtra = sandCount - (maxTNTAmount * 4); + int sulphurExtra = sulphurCount - (maxTNTAmount * 5); + + removeInventoryItems(inventory, Material.SAND, sandCount - sandExtra); + removeInventoryItems(inventory, Material.SULPHUR, sulphurCount - sulphurExtra); + + inventory.addItem(new ItemStack(Material.TNT, maxTNTAmount)); + + player.sendMessage(Color.translate("&eYou have crafted &d" + maxTNTAmount + " &eTNT.")); + } + + private int countItems(Inventory inventory, Material material, int durability) { + ItemStack[] items = inventory.getContents(); + + int amount = 0; + + for(ItemStack item : items) { + if(item != null && item.getType() == material && (item.getDurability() == (short) durability)) { + amount += item.getAmount(); + } + } + + return amount; + } + + private void removeInventoryItems(Inventory inventory, Material material, int amount) { + for(ItemStack item : inventory.getContents()) { + if(item != null && item.getType() == material) { + int newAmount = item.getAmount() - amount; + + if(newAmount > 0) { + item.setAmount(newAmount); + break; + } else { + inventory.removeItem(item); + amount = -newAmount; + + if(amount == 0) { + break; + } + } + } + } + } +} diff --git a/Factions/src/secondlife/network/victions/managers/GlassManager.java b/Factions/src/secondlife/network/victions/managers/GlassManager.java new file mode 100644 index 0000000..e31b077 --- /dev/null +++ b/Factions/src/secondlife/network/victions/managers/GlassManager.java @@ -0,0 +1,128 @@ +package secondlife.network.victions.managers; + +import com.sk89q.worldguard.protection.flags.DefaultFlag; +import com.sk89q.worldguard.protection.flags.StateFlag; +import com.sk89q.worldguard.protection.regions.ProtectedRegion; +import org.bukkit.Location; +import org.bukkit.block.Block; +import org.bukkit.entity.Player; +import org.bukkit.event.Listener; +import secondlife.network.victions.Victions; +import secondlife.network.victions.VictionsAPI; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.victions.utilities.Manager; + +import java.util.*; + +public class GlassManager extends Manager implements Listener { + + private Map> locationsWorldGuard = new HashMap<>(); + + public GlassManager(Victions plugin) { + super(plugin); + } + + public void handleMove(Player player, Location from, Location to) { + if(plugin.getPlayerManager().isSpawnTagActive(player)) { + for(ProtectedRegion protectedRegion : VictionsAPI.getWorldGuard().getRegionManager(from.getWorld()).getRegions().values()) { + if(protectedRegion != null && protectedRegion.getFlag(DefaultFlag.PVP) == StateFlag.State.DENY) { + if(protectedRegion.contains(to.getBlockX(), to.getBlockY(), to.getBlockZ())) { + to = from; + } + + renderGlassWorldGuard(player, to, protectedRegion); + } + } + } else { + this.removeGlass(player); + } + } + + private void renderGlassWorldGuard(Player player, Location location, ProtectedRegion protectedRegion) { + if (protectedRegion == null) return; + + int closestX = this.closest(location.getBlockX(), protectedRegion.getMinimumPoint().getBlockX(), protectedRegion.getMaximumPoint().getBlockX()); + int closestZ = this.closest(location.getBlockZ(), protectedRegion.getMinimumPoint().getBlockZ(), protectedRegion.getMaximumPoint().getBlockZ()); + + boolean updateX = Math.abs(location.getX() - closestX) < 8; + boolean updateZ = Math.abs(location.getZ() - closestZ) < 8; + + if(!updateX && !updateZ) return; + + ArrayList list = new ArrayList(); + if(updateX) { + for(int y = -4; y < 5; y++) { + for(int z = -7; z < 8; z++) { + if(this.isInside(protectedRegion.getMinimumPoint().getBlockZ(), protectedRegion.getMaximumPoint().getBlockZ(), location.getBlockZ() + z)) { + Location location1 = new Location(location.getWorld(), Double.valueOf(closestX), Double.valueOf(location.getBlockY() + y), Double.valueOf(location.getBlockZ() + z)); + if(!list.contains(location1) && !location1.getBlock().getType().isOccluding()) { + list.add(location1); + } + } + } + } + } + if(updateZ) { + for(int y = -4; y < 5; y++) { + for(int x = -7; x < 8; x++) { + if(this.isInside(protectedRegion.getMinimumPoint().getBlockX(), protectedRegion.getMaximumPoint().getBlockX(), location.getBlockX() + x)) { + Location location2 = new Location(location.getWorld(), Double.valueOf(location.getBlockX() + x), Double.valueOf(location.getBlockY() + y), Double.valueOf(closestZ)); + if(!list.contains(location2) && !location2.getBlock().getType().isOccluding()) { + list.add(location2); + } + } + } + } + } + this.updateWorldGuard(player, list); + } + + private int closest(int player, int... array) { + int current = array[0]; + for(int i = 0; i < array.length; i++) { + if(Math.abs(player - array[i]) < Math.abs((player - current))) { + current = array[i]; + } + } + return current; + } + + private boolean isInside(int a, int b, int c) { + return Math.abs(a - b) == Math.abs(c - a) + Math.abs(c - b); + } + + private void updateWorldGuard(Player player, List list) { + if(this.locationsWorldGuard.containsKey(player.getUniqueId())) { + + for(Location location : this.locationsWorldGuard.get(player.getUniqueId())) { + + if(!list.contains(location)) { + Block block = location.getBlock(); + + player.sendBlockChange(location, block.getTypeId(), block.getData()); + } + } + + for(Location location2 : list) { + player.sendBlockChange(location2, 95, (byte)14); + } + + } else { + for (final Location location3 : list) { + player.sendBlockChange(location3, 95, (byte)14); + } + } + + this.locationsWorldGuard.put(player.getUniqueId(), list); + } + + private void removeGlass(Player player) { + if(this.locationsWorldGuard.containsKey(player.getUniqueId())) { + for(Location location : this.locationsWorldGuard.get(player.getUniqueId())) { + Block block = location.getBlock(); + player.sendBlockChange(location, block.getTypeId(), block.getData()); + } + this.locationsWorldGuard.remove(player.getUniqueId()); + } + } +} diff --git a/Factions/src/secondlife/network/victions/managers/KitManager.java b/Factions/src/secondlife/network/victions/managers/KitManager.java new file mode 100644 index 0000000..281b95c --- /dev/null +++ b/Factions/src/secondlife/network/victions/managers/KitManager.java @@ -0,0 +1,92 @@ +package secondlife.network.victions.managers; + +import lombok.Getter; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.inventory.ItemStack; +import secondlife.network.victions.Victions; +import secondlife.network.victions.kit.Kit; +import secondlife.network.victions.utilities.Manager; + +import java.io.IOException; +import java.util.*; + +public class KitManager extends Manager { + + private Victions plugin = Victions.getInstance(); + private Map kits = new HashMap<>(); + + @Getter + private List rankedKits = new ArrayList<>(); + + public KitManager(Victions plugin) { + super(plugin); + + this.loadKits(); + + this.kits.entrySet().stream() + .filter(kit -> kit.getValue().isEnabled()) + .forEach(kit -> this.rankedKits.add(kit.getKey())); + } + + public void loadKits() { + FileConfiguration fileConfig = plugin.getKitsConfig(); + ConfigurationSection kitSection = fileConfig.getConfigurationSection("kits"); + + if (kitSection == null) { + return; + } + + kitSection.getKeys(false).forEach(name -> { + ItemStack[] contents = ((List) kitSection.get(name + ".contents")).toArray(new ItemStack[0]); + ItemStack[] armor = ((List) kitSection.get(name + ".armor")).toArray(new ItemStack[0]); + + ItemStack icon = (ItemStack) kitSection.get(name + ".icon"); + + boolean enabled = kitSection.getBoolean(name + ".enabled"); + int delay = kitSection.getInt(name + ".delay"); + + Kit kit = new Kit(name, contents, armor, icon, enabled, delay); + this.kits.put(name, kit); + }); + } + + public void saveKits() { + FileConfiguration fileConfig = plugin.getKitsConfig(); + + fileConfig.set("kits", null); + + this.kits.forEach((kitName, kit) -> { + if (kit.getIcon() != null && kit.getContents() != null && kit.getArmor() != null) { + fileConfig.set("kits." + kitName + ".contents", kit.getContents()); + fileConfig.set("kits." + kitName + ".armor", kit.getArmor()); + fileConfig.set("kits." + kitName + ".icon", kit.getIcon()); + fileConfig.set("kits." + kitName + ".enabled", kit.isEnabled()); + fileConfig.set("kits." + kitName + ".delay", kit.getDelay()); + } + }); + + try { + fileConfig.save(plugin.getKitsConfig().getFile()); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public void deleteKit(String name) { + this.kits.remove(name); + } + + public void createKit(String name) { + this.kits.put(name, new Kit(name)); + } + + public Collection getKits() { + return this.kits.values(); + } + + public Kit getKit(String name) { + return this.kits.get(name); + } + +} diff --git a/Factions/src/secondlife/network/victions/managers/MobStackManager.java b/Factions/src/secondlife/network/victions/managers/MobStackManager.java new file mode 100644 index 0000000..0c105e2 --- /dev/null +++ b/Factions/src/secondlife/network/victions/managers/MobStackManager.java @@ -0,0 +1,130 @@ +package secondlife.network.victions.managers; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.World; +import org.bukkit.entity.*; +import org.bukkit.scheduler.BukkitRunnable; +import secondlife.network.victions.Victions; +import secondlife.network.victions.utilities.Manager; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by Marko on 08.07.2018. + */ +public class MobStackManager extends Manager { + + private List mobList = new ArrayList<>(); + private String[] mobs = new String[] {"BLAZE"}; + + public MobStackManager(Victions plugin) { + super(plugin); + + handleLoad(); + handleStartTask(); + } + + public void handleOnDisable() { + if(!mobList.isEmpty()) mobList.clear(); + + for(World world : Bukkit.getWorlds()) { + for(LivingEntity entity : world.getLivingEntities()) { + if(entity instanceof Monster && entity.isCustomNameVisible()) { + entity.remove(); + } + } + } + } + + public void handleLoad() { + if(!mobList.isEmpty()) mobList.clear(); + for(String entityName : mobs) { + EntityType entityType = EntityType.valueOf(entityName.toUpperCase()); + + mobList.add(entityType); + } + } + + public void handleStartTask() { + new BukkitRunnable() { + public void run() { + int radius = 5; + + List entityTypes = mobList; + + for(World world : Bukkit.getServer().getWorlds()) { + for(LivingEntity entity : world.getLivingEntities()) { + if(entityTypes.contains(entity.getType()) && entity.isValid()) { + for(Entity nearby : entity.getNearbyEntities((double)radius, (double)radius, (double)radius)) { + if(nearby instanceof LivingEntity && nearby.isValid() && entityTypes.contains(nearby.getType())) { + handleStackOne(entity, (LivingEntity)nearby, ChatColor.RED); + } + } + } + } + } + } + }.runTaskTimer(plugin, 100L, 100L); + } + + public void handleUnstackOne(LivingEntity livingEntity, ChatColor color) { + String displayName = livingEntity.getCustomName(); + int stackSize = getAmount(displayName, color); + if(stackSize <= 1) return; + --stackSize; + String newDisplayName = color + "x" + stackSize; + LivingEntity newEntity = (LivingEntity)livingEntity.getWorld().spawnEntity(livingEntity.getLocation(), livingEntity.getType()); + + newEntity.setCustomName(newDisplayName); + newEntity.setCustomNameVisible(false); + livingEntity.setHealth(0.0); + + if(newEntity instanceof Ageable) { + ((Ageable) newEntity).setAdult(); + } + + if(newEntity instanceof Zombie) { + ((Zombie) newEntity).setBaby(false); + } + } + + public void handleStackOne(LivingEntity target, LivingEntity stackee, ChatColor color) { + if (target.getType() != stackee.getType()) return; + + String displayName = target.getCustomName(); + int oldAmount = getAmount(displayName, color); + int newAmount = 1; + if(isStacked(stackee, color)) newAmount = getAmount(stackee.getCustomName(), color); + stackee.remove(); + if(oldAmount == 0) { + int amount = newAmount + 1; + String newDisplayName = color + "x" + amount; + target.setCustomName(newDisplayName); + target.setCustomNameVisible(true); + } else { + int amount = oldAmount + newAmount; + String newDisplayName = color + "x" + amount; + target.setCustomName(newDisplayName); + } + } + + public int getAmount(String displayName, ChatColor color) { + if(displayName == null) return 0; + + String nameColor = ChatColor.getLastColors(displayName); + if (nameColor.equals('§' + color.getChar())) return 0; + String name1 = displayName.replace("x", ""); + String name2 = ChatColor.stripColor(name1.replace("§f", "")); + name2 = ChatColor.stripColor(name2); + if(!name2.matches("[0-9]+")) return 0; + if(name2.length() > 4) return 0; + + return Integer.parseInt(name2); + } + + public boolean isStacked(LivingEntity entity, ChatColor color) { + return getAmount(entity.getCustomName(), color) != 0; + } +} diff --git a/Factions/src/secondlife/network/victions/managers/PlayerManager.java b/Factions/src/secondlife/network/victions/managers/PlayerManager.java new file mode 100644 index 0000000..5a02f50 --- /dev/null +++ b/Factions/src/secondlife/network/victions/managers/PlayerManager.java @@ -0,0 +1,241 @@ +package secondlife.network.victions.managers; + +import com.massivecraft.factions.FPlayer; +import com.massivecraft.factions.FPlayers; +import lombok.Getter; +import org.bukkit.Material; +import org.bukkit.command.CommandSender; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.Potion; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import secondlife.network.victions.Victions; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.victions.utilities.GlowEnchantment; +import secondlife.network.victions.utilities.Manager; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.item.ItemBuilder; + +import java.util.*; + +/** + * Created by Marko on 14.07.2018. + */ + +@Getter +public class PlayerManager extends Manager { + + private Map tagged = new HashMap<>(); + + public PlayerManager(Victions plugin) { + super(plugin); + } + + public void handleToggleJellyLegs(Player player) { + FactionsData data = FactionsData.getByName(player.getName()); + data.setJellyLegs(!data.isJellyLegs()); + player.sendMessage(Color.translate("&eYou have " + (data.isJellyLegs() ? "&aEnabled" : "&cDisabled") + + " &ejelly legs.")); + } + + public void handleToggleNightVision(Player player) { + FactionsData data = FactionsData.getByName(player.getName()); + data.setNightVision(!data.isNightVision()); + player.sendMessage(Color.translate("&eYou have " + (data.isNightVision() ? "&aEnabled" : "&cDisabled") + + " &enight vision.")); + + if(data.isNightVision()) { + if(!player.hasPotionEffect(PotionEffectType.NIGHT_VISION)) { + player.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, Integer.MAX_VALUE, 0)); + } + } else { + if(player.hasPotionEffect(PotionEffectType.NIGHT_VISION)) { + player.removePotionEffect(PotionEffectType.NIGHT_VISION); + } + } + } + + public void handleGiveHarvesterhoe(CommandSender sender, Player target) { + sender.sendMessage(Color.translate("&eYou gave &dHarvester Hoe &eto &d" + target.getName() + "&e.")); + target.sendMessage(Color.translate("&eYou have received &dHarvester Hoe&e.")); + + Enchantment enchantment = GlowEnchantment.getGlow(); + target.getInventory().addItem(new ItemBuilder(Material.DIAMOND_HOE).name("&dHarvester Hoe").lore("&fYou don't need to &dpickup sugarcane").enchantment(enchantment).build()); + } + + public void handleGiveInfusion(CommandSender sender, Player target, String type) { + if(!type.toLowerCase().contains("5x5") || !type.toLowerCase().contains("3x3")) { + sender.sendMessage(Color.translate("&cPlease choose &l5x5&c or &l3x3&c!")); + return; + } + + sender.sendMessage(Color.translate("&eYou gave &dInfusion Pickaxe " + type + " &eto &d" + target.getName() + "&e.")); + target.sendMessage(Color.translate("&eYou have received &dInfusion Pickaxe " + type + "&e.")); + + Enchantment DIG_SPEED = Enchantment.DIG_SPEED; + Enchantment DURABILITY = Enchantment.DURABILITY; + + target.getInventory().addItem(new ItemBuilder(Material.DIAMOND_HOE).enchantment(DIG_SPEED, 5).enchantment(DURABILITY, 3).name("&dInfusion Pickaxe").lore("&fBreak blocks in &d" + (type.equals("5x5") ? "5x5" : "3x3")).build()); + } + + public void handleToggleFactionFly(Player player) { + FactionsData data = FactionsData.getByName(player.getName()); + + if(isSpawnTagActive(player)) { + player.sendMessage(Color.translate("&cYou can't use this command while &lSpawn Tag&c is active.")); + return; + } + + FPlayer factionPlayer = FPlayers.getInstance().getByPlayer(player); + + if(data.isFactionFly()) { + data.setFactionFly(false); + player.setAllowFlight(false); + player.setFlying(false); + } else { + if(factionPlayer.getFaction().isWilderness() && !factionPlayer.isInOwnTerritory()) { + player.sendMessage(Color.translate("&eYou must be in your &dfaction's &eteritory.")); + return; + } + + data.setFactionFly(true); + player.setAllowFlight(true); + player.setFlying(true); + } + + player.sendMessage(Color.translate("&eYou have " + (data.isFactionFly() ? "&aEnabled" : "&cDisabled") + + " &efaction fly.")); + } + + public void handlePotionStack(Player player) { + Map potionMap = new HashMap<>(); + + for(int i = 0; i < player.getInventory().getSize(); ++i) { + ItemStack item = player.getInventory().getItem(i); + + if(item != null && item.getType() == Material.POTION && !Potion.fromItemStack(item).isSplash() && item.getDurability() != 0) { + ItemStack contains = null; + + for(ItemStack stack : potionMap.keySet()) { + if(stack.getDurability() == item.getDurability() && stack.getItemMeta().equals(item.getItemMeta())) { + contains = stack; + break; + } + } + + if(contains != null) { + potionMap.put(contains, potionMap.get(contains) + item.getAmount()); + } else { + potionMap.put(item, item.getAmount()); + } + } + } + + if(potionMap.isEmpty()) { + player.sendMessage(Color.translate("&cYou don't have any potions to stack.")); + return; + } + + ItemStack[] items = player.getInventory().getContents(); + + for(int j = 0; j < items.length; ++j) { + if(items[j] != null + && items[j].getType() == Material.POTION + && !Potion.fromItemStack(items[j]).isSplash() + && items[j].getDurability() != 0) { + + player.getInventory().clear(j); + } + } + + potionMap.entrySet().forEach(entry -> { + ItemStack stack = entry.getKey(); + stack.setAmount(entry.getValue()); + + player.getInventory().addItem(stack); + }); + + player.updateInventory(); + player.sendMessage(Color.translate("&eYour potions are now stacked.")); + } + + public void handleSellwand(CommandSender sender, Player target, int uses) { + ItemBuilder builder = new ItemBuilder(Material.DIAMOND_HOE); + Enchantment enchantment = GlowEnchantment.getGlow(); + builder.enchantment(enchantment); + builder.name("&dSell Wand"); + + List lore = new ArrayList<>(); + lore.add("&fRight click chest with"); + lore.add("&fthis item to sell it's contents."); + + if(uses > 0) { + lore.add(""); + lore.add("&fUses: &d" + uses); + } + + builder.lore(lore); + + target.getInventory().addItem(builder.build()); + + sender.sendMessage(Color.translate("&eYou gave &dSell Wand &eto &d" + target.getName() + "&e.")); + target.sendMessage(Color.translate("&eYou have received &dSell Wand&e.")); + } + + public void handleChunkBuster(CommandSender sender, Player target, int amount) { + ItemBuilder builder = new ItemBuilder(Material.DIAMOND_HOE); + + builder.amount(amount); + builder.name("&dChunk Buster"); + builder.lore("&fPlace it down to start busting chunk."); + + sender.sendMessage(Color.translate("&eYou gave &dChunk Buster &eto &d" + target.getName() + "&e.")); + target.sendMessage(Color.translate("&eYou have received &dChunk Buster&e.")); + } + + public boolean isSpawnTagActive(Player player) { + return tagged.containsKey(player.getUniqueId()) && System.currentTimeMillis() < tagged.get(player.getUniqueId()); + } + + public void applyTagger(Player tagger, Player other) { + if(!tagged.containsKey(tagger.getUniqueId())) { + tagger.sendMessage(Color.translate("&eYou have spawn tagged &d" + other.getName() + " &efor &d20 seconds&e.")); + tagger.sendMessage(Color.translate("&cIf you logout while &lSpawn Tag&c is active you will die!")); + } + + this.disableFlyAndInvisibility(tagger); + + tagged.put(tagger.getUniqueId(), System.currentTimeMillis() + (20 * 1000)); + } + + public void applyOther(Player tagger, Player other) { + if(!tagged.containsKey(other.getUniqueId())) { + other.sendMessage(Color.translate("&eYou have spawn tagged &d" + tagger.getName() + " &efor &d20 seconds&e.")); + other.sendMessage(Color.translate("&cIf you logout while &lSpawn Tag&c is active you will die!")); + } + + this.disableFlyAndInvisibility(other); + + tagged.put(other.getUniqueId(), System.currentTimeMillis() + (20 * 1000)); + } + + public long getSpawnTagMillisecondsLeft(Player player) { + if(tagged.containsKey(player.getUniqueId())) { + return Math.max(tagged.get(player.getUniqueId()) - System.currentTimeMillis(), 0L); + } + + return 0L; + } + + private void disableFlyAndInvisibility(Player player) { + if(player.isFlying()) { + player.setFlying(false); + } + + if(player.hasPotionEffect(PotionEffectType.INVISIBILITY)) { + player.removePotionEffect(PotionEffectType.INVISIBILITY); + } + } +} diff --git a/Factions/src/secondlife/network/victions/managers/PotionLimitManager.java b/Factions/src/secondlife/network/victions/managers/PotionLimitManager.java new file mode 100644 index 0000000..ad818d5 --- /dev/null +++ b/Factions/src/secondlife/network/victions/managers/PotionLimitManager.java @@ -0,0 +1,51 @@ +package secondlife.network.victions.managers; + +import lombok.Getter; +import lombok.Setter; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.potion.PotionEffectType; +import secondlife.network.victions.Victions; +import secondlife.network.victions.utilities.Manager; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by Marko on 18.07.2018. + */ + +@Getter +public class PotionLimitManager extends Manager { + + private List potionLimits = new ArrayList<>(); + + public PotionLimitManager(Victions plugin) { + super(plugin); + + handleSetup(); + } + + private void handleSetup() { + ConfigurationSection section = plugin.getMainConfig().getConfigurationSection("potion-limiter"); + + section.getKeys(false).forEach(type -> { + if(section.getInt(type + ".level") != -1) { + PotionLimit potionLimit = new PotionLimit(); + + potionLimit.setType(PotionEffectType.getByName(type)); + potionLimit.setLevel(section.getInt(type + ".level")); + potionLimit.setExtended(section.getBoolean(type + ".extended")); + + potionLimits.add(potionLimit); + } + }); + } + + @Getter + @Setter + public class PotionLimit { + private PotionEffectType type; + private int level; + private boolean extended; + } +} diff --git a/Factions/src/secondlife/network/victions/managers/SellWandManager.java b/Factions/src/secondlife/network/victions/managers/SellWandManager.java new file mode 100644 index 0000000..e7501ae --- /dev/null +++ b/Factions/src/secondlife/network/victions/managers/SellWandManager.java @@ -0,0 +1,35 @@ +package secondlife.network.victions.managers; + +import lombok.Getter; +import org.bukkit.configuration.ConfigurationSection; +import secondlife.network.victions.Victions; +import secondlife.network.victions.utilities.Manager; + +import java.util.HashMap; +import java.util.Map; + +/** + * Created by Marko on 18.07.2018. + */ + +@Getter +public class SellWandManager extends Manager { + + private Map prices = new HashMap<>(); + + public SellWandManager(Victions plugin) { + super(plugin); + + handleSetup(); + } + + private void handleSetup() { + ConfigurationSection section = plugin.getMainConfig().getConfigurationSection("prices"); + + section.getKeys(false).forEach(type -> { + int price = plugin.getMainConfig().getInt("prices." + type); + + prices.put(type, price); + }); + } +} diff --git a/Factions/src/secondlife/network/victions/managers/TeleportManager.java b/Factions/src/secondlife/network/victions/managers/TeleportManager.java new file mode 100644 index 0000000..2edca8f --- /dev/null +++ b/Factions/src/secondlife/network/victions/managers/TeleportManager.java @@ -0,0 +1,24 @@ +package secondlife.network.victions.managers; + +import lombok.Getter; +import secondlife.network.victions.Victions; +import secondlife.network.victions.utilities.Manager; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +/** + * Created by Marko on 28.07.2018. + */ + +@Getter +public class TeleportManager extends Manager { + + private Map tpaUsers = new HashMap<>(); + private Map tpaHereUsers = new HashMap<>(); + + public TeleportManager(Victions plugin) { + super(plugin); + } +} diff --git a/Factions/src/secondlife/network/victions/player/FactionsData.java b/Factions/src/secondlife/network/victions/player/FactionsData.java new file mode 100644 index 0000000..f7c6a17 --- /dev/null +++ b/Factions/src/secondlife/network/victions/player/FactionsData.java @@ -0,0 +1,265 @@ +package secondlife.network.victions.player; + +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.mongodb.client.model.Filters; +import com.mongodb.client.model.UpdateOptions; +import lombok.Getter; +import lombok.Setter; +import org.bson.Document; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.metadata.FixedMetadataValue; +import secondlife.network.victions.Victions; +import secondlife.network.victions.kit.Kit; +import secondlife.network.victions.utilities.CustomLocation; +import secondlife.network.vituz.Vituz; +import secondlife.network.vituz.VituzAPI; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Permission; + +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +@Getter +@Setter +public class FactionsData { + + @Getter + public static Map factionDatas = new HashMap<>(); + + private String name; + private String realName; + + private int kills = 0; + private int deaths = 0; + private int balance = 0; + + private boolean jellyLegs = false; + private boolean nightVision = false; + private boolean factionFly = false; // Ne treba save + private boolean loaded; + private boolean needToTeleport = false; + + private Map kitCooldown = new HashMap<>(); + private Map homeCooldown = new HashMap<>(); + private Map logoutCooldown = new HashMap<>(); + private Map pearlCooldown = new HashMap<>(); + private Map homes = new HashMap<>(); + + public FactionsData(String name) { + this.name = name; + + factionDatas.put(name, this); + } + + public void save() { + if(!loaded) return; + + Document document = new Document(); + + JsonArray homeElements = new JsonArray(); + + homes.entrySet().forEach(home -> { + JsonObject homeDocument = new JsonObject(); + + homeDocument.addProperty("home_name", home.getKey()); + homeDocument.addProperty("home_location", CustomLocation.locationToString(home.getValue())); + + homeElements.add(homeDocument); + }); + + document.put("name", name.toLowerCase()); + document.put("realName", name); + document.put("kills", kills); + document.put("deaths", deaths); + document.put("balance", balance); + document.put("jelly_legs", jellyLegs); + document.put("night_vision", nightVision); + document.put("homes", homeElements); + + Vituz.getInstance().getDatabaseManager().getFactionsProfiles().replaceOne(Filters.eq("name", this.name.toLowerCase()), document, new UpdateOptions().upsert(true)); + + loaded = false; + } + + public void load() { + Document document = (Document) Vituz.getInstance().getDatabaseManager().getFactionsProfiles().find(Filters.eq("name", this.name.toLowerCase())).first(); + + if(document != null) { + new JsonParser().parse(document.getString("homes")).getAsJsonArray().forEach(element -> { + JsonObject homeDocument = element.getAsJsonObject(); + + if(homeDocument.has("home_name")) { + setHome(homeDocument.get("home_name").getAsString(), + CustomLocation.stringToLocation(homeDocument.get("home_location").getAsString())); + } + }); + + this.realName = document.getString("realName"); + this.kills = document.getInteger("kills"); + this.deaths = document.getInteger("deaths"); + this.balance = document.getInteger("balance"); + this.jellyLegs = document.getBoolean("jelly_legs"); + this.nightVision = document.getBoolean("night_vision"); + } + + loaded = true; + } + + public boolean isPearlActive(Player player) { + return pearlCooldown.containsKey(player.getUniqueId()) && System.currentTimeMillis() < pearlCooldown.get(player.getUniqueId()); + } + + public void cancelPearl(Player player) { + if(pearlCooldown.containsKey(player.getUniqueId())) { + pearlCooldown.remove(player.getUniqueId()); + } + } + + public void applyPearlCooldown(Player player) { + pearlCooldown.put(player.getUniqueId(), System.currentTimeMillis() + (15 * 1000)); + } + + public long getPearlMillisecondsLeft(Player player) { + if(pearlCooldown.containsKey(player.getUniqueId())) { + return Math.max(pearlCooldown.get(player.getUniqueId()) - System.currentTimeMillis(), 0L); + } + + return 0L; + } + + public boolean isLogoutActive(Player player) { + return logoutCooldown.containsKey(player.getUniqueId()) && System.currentTimeMillis() < logoutCooldown.get(player.getUniqueId()); + } + + public void cancelLogout(Player player) { + if(logoutCooldown.containsKey(player.getUniqueId())) { + logoutCooldown.remove(player.getUniqueId()); + } + } + + public void applyLogoutCooldown(Player player) { + logoutCooldown.put(player.getUniqueId(), System.currentTimeMillis() + (30 * 1000)); + + Bukkit.getScheduler().runTaskLater(Victions.getInstance(), () -> { + if(isLogoutActive(player)) { + player.setMetadata("LogoutCommand", new FixedMetadataValue(Victions.getInstance(), true)); + player.kickPlayer(Color.translate("&cYou have been safely logged out from the server!")); + cancelLogout(player); + } + }, 30 * 20L); + } + + public long getLoogutMillisecondsLeft(Player player) { + if(logoutCooldown.containsKey(player.getUniqueId())) { + return Math.max(logoutCooldown.get(player.getUniqueId()) - System.currentTimeMillis(), 0L); + } + + return 0L; + } + + private void setHome(String home, CustomLocation location) { + homes.put(home, location); + } + + public boolean isHomeActive(Player player) { + return homeCooldown.containsKey(player.getUniqueId()) && System.currentTimeMillis() < homeCooldown.get(player.getUniqueId()); + } + + public void cancelHome(Player player) { + if(homeCooldown.containsKey(player.getUniqueId())) { + homeCooldown.remove(player.getUniqueId()); + } + } + + public void applyHomeCooldown(Player player, Location location) { + int cooldown = 5; + + if(player.hasPermission(Permission.OP_PERMISSION)) { + cooldown = 0; + } else if(player.hasPermission(Permission.XENON_PERMISSION) || player.hasPermission(Permission.PARTNER_PERMISSION)) { + cooldown = 3; + } + + homeCooldown.put(player.getUniqueId(), System.currentTimeMillis() + (cooldown * 1000)); + + Bukkit.getScheduler().runTaskLater(Victions.getInstance(), () -> { + if(isHomeActive(player)) { + player.teleport(location); + player.sendMessage(Color.translate("&eYou have been teleported to home.")); + cancelHome(player); + } + }, cooldown * 20L); + } + + public long getHomeMillisecondsLeft(Player player) { + if(homeCooldown.containsKey(player.getUniqueId())) { + return Math.max(homeCooldown.get(player.getUniqueId()) - System.currentTimeMillis(), 0L); + } + + return 0L; + } + + public boolean isKitActive(Player player, Kit kit) { + if(kit.getDelay() == 0 + || player.hasPermission(Permission.OP_PERMISSION) + || !kitCooldown.containsKey(kit.getName())) { + + return false; + } + + long value = kitCooldown.get(kit.getName()); + + return value == -1L || System.currentTimeMillis() < value; + } + + public void applyKitCooldown(Kit kit) { + kitCooldown.put(kit.getName(), (kit.getDelay() == -1) ? -1L : (System.currentTimeMillis() + kit.getDelay() * 1000)); + } + + public long getKitMillisecondsLeft(Kit kit) { + if(kitCooldown.containsKey(kit.getName())) { + return Math.max(kitCooldown.get(kit.getName()) - System.currentTimeMillis(), 0L); + } + + return 0L; + } + + public int getHomeLimit() { + switch (VituzAPI.getRankName(realName)) { + case "Xenon": + case "Partner": { + return 10; + } + + case "Krypton": { + return 7; + } + + case "Titanium": + case "Media": { + return 6; + } + + case "Nitrogen": { + return 5; + } + + case "Hydrogen": { + return 3; + } + } + + return 1; + } + + public static FactionsData getByName(String name) { + FactionsData data = factionDatas.get(name); + + return data == null ? new FactionsData(name) : factionDatas.get(name); + } +} \ No newline at end of file diff --git a/Factions/src/secondlife/network/victions/providers/ScoreboardProvider.java b/Factions/src/secondlife/network/victions/providers/ScoreboardProvider.java new file mode 100644 index 0000000..e761bbb --- /dev/null +++ b/Factions/src/secondlife/network/victions/providers/ScoreboardProvider.java @@ -0,0 +1,105 @@ +package secondlife.network.victions.providers; + +import org.bukkit.entity.Player; +import secondlife.network.victions.Victions; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.vituz.providers.ScoreProvider; +import secondlife.network.vituz.providers.scoreboard.ScoreboardConfiguration; +import secondlife.network.vituz.providers.scoreboard.TitleGetter; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.StringUtils; +import subside.plugins.koth.adapter.KothClassic; +import subside.plugins.koth.adapter.KothHandler; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by Marko on 18.07.2018. + */ +public class ScoreboardProvider implements ScoreProvider { + + public static ScoreboardConfiguration create() { + ScoreboardConfiguration sc = new ScoreboardConfiguration(); + + sc.setTitleGetter(new TitleGetter("&5&lSecondLife")); + sc.setScoreGetter(new ScoreboardProvider()); + + return sc; + } + + @Override + public String[] getScores(Player player) { + List board = new ArrayList<>(); + + FactionsData data = FactionsData.getByName(player.getName()); + + if(data == null) { + return null; + } + + if(isActive(player)) { + board.add("&7&m----------------------"); + } + + if(data.isHomeActive(player)) { + board.add("&9&lHome: &9" + StringUtils.getRemaining(data.getHomeMillisecondsLeft(player), true)); + } + + if(data.isLogoutActive(player)) { + board.add("&4&lLogout: &f" + StringUtils.getRemaining(data.getLoogutMillisecondsLeft(player), true)); + } + + if(data.isPearlActive(player)) { + board.add("&e&lEnderpearl: &f" + StringUtils.getRemaining(data.getPearlMillisecondsLeft(player), true)); + } + + if(Victions.getInstance().getPlayerManager().isSpawnTagActive(player)) { + board.add("&c&lSpawn Tag: &f" + StringUtils.getRemaining(Victions.getInstance().getPlayerManager().getSpawnTagMillisecondsLeft(player), false)); + } + + if(data.isNightVision()) { + board.add("&b&lNight Vision: &aEnabled"); + } + + if(data.isJellyLegs()) { + board.add("&e&lJelly Legs: &aEnabled"); + } + + if(data.isFactionFly()) { + board.add("&2&lFaction Fly: &aEnabled"); + } + + if(!KothHandler.getInstance().getRunningKoths().isEmpty()) { + for(int i = 0; i < KothHandler.getInstance().getRunningKoths().size(); i++) { + KothClassic koth = (KothClassic) KothHandler.getInstance().getRunningKoths().get(i); + String time = koth.getTimeObject().getTimeLeftFormatted(); + + board.add("&9&l" + koth.getKoth().getName() + ": &f" + time); + } + } + + if(isActive(player)) { + board.add("&1&7&m----------------------"); + } + + return board.stream().map(Color::translate).toArray(String[]::new); + } + + private boolean isActive(Player player) { + FactionsData data = FactionsData.getByName(player.getName()); + + if(data.isHomeActive(player) + || data.isLogoutActive(player) + || data.isPearlActive(player) + || Victions.getInstance().getPlayerManager().isSpawnTagActive(player) + || data.isNightVision() + || data.isJellyLegs() + || !KothHandler.getInstance().getRunningKoths().isEmpty() + || data.isFactionFly()) { + return true; + } + + return false; + } +} diff --git a/Factions/src/secondlife/network/victions/tasks/FactionsTask.java b/Factions/src/secondlife/network/victions/tasks/FactionsTask.java new file mode 100644 index 0000000..66aaa9b --- /dev/null +++ b/Factions/src/secondlife/network/victions/tasks/FactionsTask.java @@ -0,0 +1,51 @@ +package secondlife.network.victions.tasks; + +import com.massivecraft.factions.FPlayers; +import org.apache.commons.lang.time.DurationFormatUtils; +import org.bukkit.Bukkit; +import org.bukkit.scheduler.BukkitRunnable; +import secondlife.network.victions.Victions; +import secondlife.network.victions.player.FactionsData; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Permission; + +/** + * Created by Marko on 14.07.2018. + */ +public class FactionsTask extends BukkitRunnable { + + public FactionsTask() { + runTaskTimerAsynchronously(Victions.getInstance(), 20L, 20L); + } + + @Override + public void run() { + Bukkit.getOnlinePlayers().forEach(player -> { + FactionsData data = FactionsData.getByName(player.getName()); + + if(data.isHomeActive(player)) { + player.sendMessage(Color.translate("&eYou will be teleported in &d" + DurationFormatUtils.formatDurationWords(data.getHomeMillisecondsLeft(player), true, false) + "&e.")); + } + + if(data.isLogoutActive(player)) { + player.sendMessage(Color.translate("&eYou will be logged out in &d" + DurationFormatUtils.formatDurationWords(data.getLoogutMillisecondsLeft(player), true, false) + "&e.")); + } + + if(player.getAllowFlight() && !player.hasPermission(Permission.STAFF_PERMISSION)) { + player.setAllowFlight(false); + player.setFlying(false); + player.sendMessage(Color.translate("&eYour flight has been disabled because you are in end.")); + } + + FPlayers.getInstance().getAllFPlayers().forEach(fPlayer -> { + if(fPlayer != null && data.isFactionFly() && !fPlayer.getFaction().isWilderness() && !fPlayer.isInOwnTerritory()) { + data.setFactionFly(false); + + fPlayer.getPlayer().setAllowFlight(false); + fPlayer.getPlayer().setFlying(false); + fPlayer.getPlayer().sendMessage(Color.translate("&dFaction Fly &edisabled due to leaving your faction's teritory&e.")); + } + }); + }); + } +} diff --git a/Factions/src/secondlife/network/victions/utilities/CustomLocation.java b/Factions/src/secondlife/network/victions/utilities/CustomLocation.java new file mode 100644 index 0000000..4149a9b --- /dev/null +++ b/Factions/src/secondlife/network/victions/utilities/CustomLocation.java @@ -0,0 +1,136 @@ +package secondlife.network.victions.utilities; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.World; + +import java.util.StringJoiner; + +@Getter +@Setter +@AllArgsConstructor +public class CustomLocation { + + private final long timestamp = System.currentTimeMillis(); + + private String world; + + private double x; + private double y; + private double z; + + private float yaw; + private float pitch; + + public CustomLocation(double x, double y, double z) { + this(x, y, z, 0.0F, 0.0F); + } + + public CustomLocation(String world, double x, double y, double z) { + this(world, x, y, z, 0.0F, 0.0F); + } + + public CustomLocation(double x, double y, double z, float yaw, float pitch) { + this("world", x, y, z, yaw, pitch); + } + + public static CustomLocation fromBukkitLocation(Location location) { + return new CustomLocation(location.getWorld().getName(), location.getX(), location.getY(), location.getZ(), + location.getYaw(), location.getPitch()); + } + + public static CustomLocation stringToLocation(String string) { + String[] split = string.split(", "); + + double x = Double.parseDouble(split[0]); + double y = Double.parseDouble(split[1]); + double z = Double.parseDouble(split[2]); + + CustomLocation customLocation = new CustomLocation(x, y, z); + + if (split.length == 4) { + customLocation.setWorld(split[3]); + } else if (split.length >= 5) { + customLocation.setYaw(Float.parseFloat(split[3])); + customLocation.setPitch(Float.parseFloat(split[4])); + + if (split.length >= 6) { + customLocation.setWorld(split[5]); + } + } + return customLocation; + } + + public static String locationToString(CustomLocation loc) { + StringJoiner joiner = new StringJoiner(", "); + joiner.add(Double.toString(loc.getX())); + joiner.add(Double.toString(loc.getY())); + joiner.add(Double.toString(loc.getZ())); + if (loc.getYaw() == 0.0f && loc.getPitch() == 0.0f) { + if (loc.getWorld().equals("world")) { + return joiner.toString(); + } else { + joiner.add(loc.getWorld()); + return joiner.toString(); + } + } else { + joiner.add(Float.toString(loc.getYaw())); + joiner.add(Float.toString(loc.getPitch())); + if (loc.getWorld().equals("world")) { + return joiner.toString(); + } else { + joiner.add(loc.getWorld()); + return joiner.toString(); + } + } + } + + public Location toBukkitLocation() { + return new Location(this.toBukkitWorld(), this.x, this.y, this.z, this.yaw, this.pitch); + } + + public double getGroundDistanceTo(CustomLocation location) { + return Math.sqrt(Math.pow(this.x - location.x, 2) + Math.pow(this.z - location.z, 2)); + } + + public double getDistanceTo(CustomLocation location) { + return Math.sqrt(Math.pow(this.x - location.x, 2) + Math.pow(this.y - location.y, 2) + Math.pow(this.z - location.z, 2)); + } + + public World toBukkitWorld() { + if (this.world == null) { + return Bukkit.getServer().getWorlds().get(0); + } else { + return Bukkit.getServer().getWorld(this.world); + } + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof CustomLocation)) { + return false; + } + + CustomLocation location = (CustomLocation) obj; + return location.x == this.x && location.y == this.y && location.z == this.z + && location.pitch == this.pitch && location.yaw == this.yaw; + } + + @Override + public String toString() { + return new ToStringBuilder(this) + .append("x", this.x) + .append("y", this.y) + .append("z", this.z) + .append("yaw", this.yaw) + .append("pitch", this.pitch) + .append("world", this.world) + .append("timestamp", this.timestamp) + .toString(); + } + +} diff --git a/Factions/src/secondlife/network/victions/utilities/FactionsUtils.java b/Factions/src/secondlife/network/victions/utilities/FactionsUtils.java new file mode 100644 index 0000000..fe5e3ab --- /dev/null +++ b/Factions/src/secondlife/network/victions/utilities/FactionsUtils.java @@ -0,0 +1,15 @@ +package secondlife.network.victions.utilities; + +import java.util.Random; + +/** + * Created by Marko on 28.07.2018. + */ +public class FactionsUtils { + + private static Random random = new Random(); + + public static int random(int min, int max) { + return random.nextInt((max - min) + 1) + min; + } +} diff --git a/Factions/src/secondlife/network/victions/utilities/GlowEnchantment.java b/Factions/src/secondlife/network/victions/utilities/GlowEnchantment.java new file mode 100644 index 0000000..af40569 --- /dev/null +++ b/Factions/src/secondlife/network/victions/utilities/GlowEnchantment.java @@ -0,0 +1,71 @@ +package secondlife.network.victions.utilities; + +import org.bukkit.enchantments.Enchantment; +import org.bukkit.enchantments.EnchantmentTarget; +import org.bukkit.enchantments.EnchantmentWrapper; +import org.bukkit.inventory.ItemStack; + +import java.lang.reflect.Field; + +public class GlowEnchantment extends EnchantmentWrapper { + + private static Enchantment glow; + + public GlowEnchantment(int id) { + super(id); + } + + @Override + public boolean canEnchantItem(ItemStack item) { + return true; + } + + @Override + public boolean conflictsWith(Enchantment other) { + return false; + } + + @Override + public EnchantmentTarget getItemTarget() { + return null; + } + + @Override + public int getMaxLevel() { + return 10; + } + + @Override + public String getName() { + return "Glow"; + } + + @Override + public int getStartLevel() { + return 1; + } + + public static Enchantment getGlow() { + if (glow != null) + return glow; + + try { + Field f = Enchantment.class.getDeclaredField("acceptingNew"); + f.setAccessible(true); + f.set(null, true); + } catch (Exception e) { + e.printStackTrace(); + } + + glow = new GlowEnchantment(255); + Enchantment.registerEnchantment(glow); + return glow; + } + + public static void addGlow(ItemStack item) { + Enchantment glow = getGlow(); + + item.addEnchantment(glow, 1); + } + +} \ No newline at end of file diff --git a/Factions/src/secondlife/network/victions/utilities/Manager.java b/Factions/src/secondlife/network/victions/utilities/Manager.java new file mode 100644 index 0000000..97510eb --- /dev/null +++ b/Factions/src/secondlife/network/victions/utilities/Manager.java @@ -0,0 +1,16 @@ +package secondlife.network.victions.utilities; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import secondlife.network.victions.Victions; + +/** + * Created by Marko on 14.07.2018. + */ + +@AllArgsConstructor +public class Manager { + + @Getter + protected Victions plugin; +} diff --git a/HCF/out/production/HCF/META-INF/MANIFEST.MF b/HCF/out/production/HCF/META-INF/MANIFEST.MF new file mode 100644 index 0000000..7427cc4 --- /dev/null +++ b/HCF/out/production/HCF/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: HCF + diff --git a/HCF/out/production/HCF/config.yml b/HCF/out/production/HCF/config.yml new file mode 100644 index 0000000..a4c0e9e --- /dev/null +++ b/HCF/out/production/HCF/config.yml @@ -0,0 +1,49 @@ +SERVERNAME: "Test" +SCOREBOARD: + TITLE: "&5&lSecondLife &d(Map 14)" +ECONOMY: + SIGN: + BUY_TEXT: + - "&a[Buy]" + - "%ITEM%" + - "%AMOUNT%" + - "$%PRICE%" + SELL_TEXT: + - "&c[Sell]" + - "%ITEM%" + - "%AMOUNT%" + - "$%PRICE%" +DEATH_SIGN: + SIGN: + - "&c%KILLED%" + - "&ewas slain by" + - "&a%KILLER%" + - "%TIME%" + ITEM_STACK: + NAME: "&aDeath Sign" + LORE: + - "&c%KILLED%" + - "&ewas slain by" + - "&a%KILLER%" + - "&d%TIME%" +kitmap: false +coords: +- '&7&m-----------------------------' +- ' &e&lImportant coordinates (x,z)' +- ' &7- &aSpawn&7: 0 , 0' +- ' &7- &3Towers Koth&7: 500 , 500' +- ' &7- &3Islands Koth&7: -500 , 500' +- ' &7- &3Moon Koth&7: 500 , -500' +- ' &7- &3End Koth&7: -80, 90 (End)' +- ' &7- &3&lConquest&7: -500 , -500' +- ' &7- &cEnd Portal&7: 700 , 700 (All quadrants)' +- '&7&m-----------------------------' +help: +- '&7&m-----------------------------' +- ' &7- &6/faction &7- Use to see all factions related commands.' +- ' &7- &6/koth &7- Use to see all koth related commands.' +- ' &7- &6/lives &7- Use to check your lives amount.' +- ' &7- &6/mapkit &7- Use to check this map kit.' +- ' &7- &6/coords &7- Use to see all important coordinates.' +- ' &7- &6/logout &7- Logout countdown for safe logout.' +- '&7&m-----------------------------' \ No newline at end of file diff --git a/HCF/out/production/HCF/factions.yml b/HCF/out/production/HCF/factions.yml new file mode 100644 index 0000000..1df0584 --- /dev/null +++ b/HCF/out/production/HCF/factions.yml @@ -0,0 +1 @@ +factions: \ No newline at end of file diff --git a/HCF/out/production/HCF/limiters.yml b/HCF/out/production/HCF/limiters.yml new file mode 100644 index 0000000..79fe08e --- /dev/null +++ b/HCF/out/production/HCF/limiters.yml @@ -0,0 +1,107 @@ +###################### INSTRUCTIONS ###################### +### Use -1 for no change ### +### Use 0 to disable enchantment ### +### Use other values to limit enchantment level ### +############################################################## +enchantment-limiter: + ARROW_DAMAGE: 4 + ARROW_FIRE: 0 + ARROW_INFINITE: -1 + ARROW_KNOCKBACK: 1 + DAMAGE_ALL: 1 + DAMAGE_ARTHROPODS: -1 + DAMAGE_UNDEAD: -1 + DIG_SPEED: -1 + DURABILITY: -1 + FIRE_ASPECT: 0 + KNOCKBACK: 1 + LOOT_BONUS_BLOCKS: -1 + LOOT_BONUS_MOBS: -1 + LUCK: -1 + LURE: -1 + OXYGEN: -1 + PROTECTION_ENVIRONMENTAL: 2 + PROTECTION_EXPLOSIONS: -1 + PROTECTION_FALL: -1 + PROTECTION_FIRE: -1 + PROTECTION_PROJECTILE: -1 + SILK_TOUCH: -1 + THORNS: 0 + WATER_WORKER: -1 + +###################### INSTRUCTIONS ###################### +### Use -1 for no change ### +### Use 0 to disable potion ### +### Use other values to limit potion level ### +### Change extended to false to disable extended potions ### +############################################################## +potion-limiter: + SPEED: + level: -1 + extended: true + SLOW: + level: 1 + extended: false + FAST_DIGGING: + level: -1 + extended: true + SLOW_DIGGING: + level: -1 + extended: true + INCREASE_DAMAGE: + level: 0 + extended: true + HEAL: + level: -1 + extended: true + HARM: + level: 0 + extended: true + JUMP: + level: -1 + extended: true + CONFUSION: + level: -1 + extended: true + REGENERATION: + level: 0 + extended: true + DAMAGE_RESISTANCE: + level: -1 + extended: true + FIRE_RESISTANCE: + level: -1 + extended: true + WATER_BREATHING: + level: -1 + extended: true + INVISIBILITY: + level: 0 + extended: true + BLINDNESS: + level: -1 + extended: true + NIGHT_VISION: + level: -1 + extended: true + HUNGER: + level: 0 + extended: true + WEAKNESS: + level: 0 + extended: true + POISON: + level: 1 + extended: false + WITHER: + level: -1 + extended: true + HEALTH_BOOST: + level: -1 + extended: true + ABSORPTION: + level: -1 + extended: true + SATURATION: + level: -1 + extended: true \ No newline at end of file diff --git a/HCF/out/production/HCF/plugin.yml b/HCF/out/production/HCF/plugin.yml new file mode 100644 index 0000000..65552bd --- /dev/null +++ b/HCF/out/production/HCF/plugin.yml @@ -0,0 +1,114 @@ +name: SecondLife +main: secondlife.network.hcfactions.HCF +version: 6.0 +description: SL HCF Core. +author: SecondLife Development Team +depend: [Vituz] +commands: + faction: + description: Faction Command + aliases: [f, fac, team, t] + master: + description: Master Command + ultimate: + description: Ultimate Command + ultra: + description: Ultra Command + balance: + description: Balance Command + aliases: [bal, eco, economy] + block: + description: Blcok Command + aliases: [cobble, filter, blocks, cobblestone] + bottle: + description: Bottle Command + chat: + description: ChatControl Command + aliases: [chatcontrol, chc] + chat: + description: ChatControl Command + aliases: [chatcontrol, chc] + chest: + description: Chest Command + aliases: [pv, playervault] + coords: + description: Coords Command + aliases: [coordinates] + crowbar: + description: Crowbar Command + deathban: + description: Deathban Command + aliases: [db, dban, deathb] + endportal: + description: EndPortal Command + aliases: [lightportal, lighportal] + eotw: + description: EOTW Command + event: + description: KoTH Command + aliases: [game, koth, conquest] + firstjoinitems: + description: FirstJoinItems Command + aliases: [fji] + focus: + description: Focus Command + glowstone: + description: Glowstone Command + aliases: [glow, glowmountain, mountain, glowstonemountain] + help: + description: Help Command + aliases: ["?"] + lastdeaths: + description: LastDeaths Command + aliases: [ldeaths, lastd] + logout: + description: Logout Command + mapkit: + description: MapKit Command + pay: + description: Pay Command + pvp: + description: PvP Command + aliases: [prot, timer, pvptimer, lives] + reclaim: + description: Reclaim Command + aliases: [claimlives, claimkeys] + regen: + description: Regen Command + savedata: + description: SaveData Command + aliases: [sd] + set: + description: Set Command + sotw: + description: SOTW Command + spawn: + description: Spawn Command + staff: + description: StaffMode Command + aliases: [mod, staffmode, modmode] + stats: + description: Stats Command + aliases: [status, ores] + sumo: + description: Sumo Command + tellcoords: + description: TellCoords Command + aliases: [tl] + togglelightning: + description: ToggleLightning Command + vanish: + description: Vanish Command + aliases: [v] + togglebroadcasts: + description: ToggleBroadcasts Command + aliases: [togglefd, tfd, fo, fd, foundore] + secondlife: + description: SecondLife Command + aliases: [core] + deathlookup: + description: Deathlookup Command + aliases: [dl, deathl, dlookup, deathlook, lookdeath] + lastinventory: + description: Lastinventory Command + aliases: [li, lastinv, lastinventory, restoreinv, restoreinventory, ri] \ No newline at end of file diff --git a/HCF/out/production/HCF/schedules.yml b/HCF/out/production/HCF/schedules.yml new file mode 100644 index 0000000..b307ffe --- /dev/null +++ b/HCF/out/production/HCF/schedules.yml @@ -0,0 +1,9 @@ +# Add more koths in the same day by adding a splitter '#' after each event + +schedule-monday: "6:00PM/Temple/15" +schedule-tuesday: "6:00PM/Temple/15" +schedule-wednesday: "6:00PM/Temple/15" +schedule-thursday: "6:00PM/Temple/15" +schedule-friday: "6:00PM/Temple/15" +schedule-saturday: "6:00PM/Temple/15" +schedule-sunday: "6:00PM/Temple/15" diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/HCF$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/HCF$1.class new file mode 100644 index 0000000..ff5310a Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/HCF$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/HCF.class b/HCF/out/production/HCF/secondlife/network/hcfactions/HCF.class new file mode 100644 index 0000000..7883d9d Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/HCF.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/HCFConfiguration.class b/HCF/out/production/HCF/secondlife/network/hcfactions/HCFConfiguration.class new file mode 100644 index 0000000..b56a49b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/HCFConfiguration.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Archer.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Archer.class new file mode 100644 index 0000000..0e62dde Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Archer.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Bard$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Bard$1.class new file mode 100644 index 0000000..a662e62 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Bard$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Bard.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Bard.class new file mode 100644 index 0000000..f0c27dd Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Bard.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Miner.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Miner.class new file mode 100644 index 0000000..83fb558 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Miner.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Rogue.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Rogue.class new file mode 100644 index 0000000..66678a5 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/Rogue.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/ArmorClass.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/ArmorClass.class new file mode 100644 index 0000000..1d9952c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/ArmorClass.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/ArmorClassHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/ArmorClassHandler.class new file mode 100644 index 0000000..2d3b9df Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/ArmorClassHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/BardData.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/BardData.class new file mode 100644 index 0000000..59488ed Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/BardData.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/EffectData.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/EffectData.class new file mode 100644 index 0000000..e77d9a3 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/EffectData.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler$1.class new file mode 100644 index 0000000..a451284 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler.class new file mode 100644 index 0000000..319c534 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/events/ArmorClassEquipEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/events/ArmorClassEquipEvent.class new file mode 100644 index 0000000..9c700e1 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/events/ArmorClassEquipEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/events/ArmorClassUnequipEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/events/ArmorClassUnequipEvent.class new file mode 100644 index 0000000..995ef5f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/classes/utils/events/ArmorClassUnequipEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/BaseCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/BaseCommand.class new file mode 100644 index 0000000..24ddec7 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/BaseCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/CommandHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/CommandHandler.class new file mode 100644 index 0000000..ab01594 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/CommandHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/BalanceCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/BalanceCommand.class new file mode 100644 index 0000000..2b93e69 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/BalanceCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/ChestCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/ChestCommand.class new file mode 100644 index 0000000..9f8d9f5 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/ChestCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/CoordsCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/CoordsCommand.class new file mode 100644 index 0000000..f1ca1ef Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/CoordsCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EOTWCommand$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EOTWCommand$1.class new file mode 100644 index 0000000..d0e61fe Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EOTWCommand$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EOTWCommand$EotwPrompt.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EOTWCommand$EotwPrompt.class new file mode 100644 index 0000000..45c3d56 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EOTWCommand$EotwPrompt.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EOTWCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EOTWCommand.class new file mode 100644 index 0000000..6f318b6 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EOTWCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EventCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EventCommand.class new file mode 100644 index 0000000..face43b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/EventCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/FirstJoinItemsCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/FirstJoinItemsCommand.class new file mode 100644 index 0000000..62a2d28 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/FirstJoinItemsCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/FocusCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/FocusCommand.class new file mode 100644 index 0000000..01fb3f8 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/FocusCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/HelpCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/HelpCommand.class new file mode 100644 index 0000000..6c133c3 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/HelpCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/LogoutCommand$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/LogoutCommand$1.class new file mode 100644 index 0000000..6becd10 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/LogoutCommand$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/LogoutCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/LogoutCommand.class new file mode 100644 index 0000000..6aebb63 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/LogoutCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/MapKitCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/MapKitCommand.class new file mode 100644 index 0000000..b66f60e Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/MapKitCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/PayCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/PayCommand.class new file mode 100644 index 0000000..c783289 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/PayCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/ReclaimCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/ReclaimCommand.class new file mode 100644 index 0000000..54f640c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/ReclaimCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/RegenCommand$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/RegenCommand$1.class new file mode 100644 index 0000000..9e89068 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/RegenCommand$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/RegenCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/RegenCommand.class new file mode 100644 index 0000000..de92e3f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/RegenCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SaveDataCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SaveDataCommand.class new file mode 100644 index 0000000..9731eda Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SaveDataCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SetCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SetCommand.class new file mode 100644 index 0000000..eb2317d Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SetCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SpawnCommand$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SpawnCommand$1.class new file mode 100644 index 0000000..6c181fb Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SpawnCommand$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SpawnCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SpawnCommand.class new file mode 100644 index 0000000..c9e3de5 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/SpawnCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/StatsCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/StatsCommand.class new file mode 100644 index 0000000..078437f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/StatsCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/TellCoordsCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/TellCoordsCommand.class new file mode 100644 index 0000000..f528bf9 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/TellCoordsCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/ToggleLightningCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/ToggleLightningCommand.class new file mode 100644 index 0000000..95079d4 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/ToggleLightningCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/EventManagerCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/EventManagerCommand.class new file mode 100644 index 0000000..5592259 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/EventManagerCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/HostCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/HostCommand.class new file mode 100644 index 0000000..af8a1b7 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/HostCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/JoinEventCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/JoinEventCommand.class new file mode 100644 index 0000000..d4cbcd0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/JoinEventCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/LeaveEventCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/LeaveEventCommand.class new file mode 100644 index 0000000..f8efa9b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/LeaveEventCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/SpawnsCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/SpawnsCommand.class new file mode 100644 index 0000000..d64c0d5 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/event/SpawnsCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/zSecondLifeCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/zSecondLifeCommand.class new file mode 100644 index 0000000..4568c40 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/commands/arguments/zSecondLifeCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/data/HCFData.class b/HCF/out/production/HCF/secondlife/network/hcfactions/data/HCFData.class new file mode 100644 index 0000000..e87056f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/data/HCFData.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySign.class b/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySign.class new file mode 100644 index 0000000..40abb19 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySign.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySignHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySignHandler$1.class new file mode 100644 index 0000000..a43da17 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySignHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySignHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySignHandler.class new file mode 100644 index 0000000..c1ff62c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySignHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySignType.class b/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySignType.class new file mode 100644 index 0000000..926e0d8 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/economy/EconomySignType.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/elevators/SignElevatorHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/elevators/SignElevatorHandler.class new file mode 100644 index 0000000..1bd6ee7 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/elevators/SignElevatorHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventCountdownTask.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventCountdownTask.class new file mode 100644 index 0000000..c9127dc Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventCountdownTask.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventManager.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventManager.class new file mode 100644 index 0000000..1051f28 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventManager.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventPlayer.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventPlayer.class new file mode 100644 index 0000000..8b8f182 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventPlayer.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventState.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventState.class new file mode 100644 index 0000000..2b1297b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/EventState.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/KitMapEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/KitMapEvent.class new file mode 100644 index 0000000..1ee7ac1 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/KitMapEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/SpawnManager.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/SpawnManager.class new file mode 100644 index 0000000..ee94dc0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/SpawnManager.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoCountdownTask.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoCountdownTask.class new file mode 100644 index 0000000..b123712 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoCountdownTask.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoEvent$SumoFightTask.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoEvent$SumoFightTask.class new file mode 100644 index 0000000..c5e62af Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoEvent$SumoFightTask.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoEvent$WaterCheckTask.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoEvent$WaterCheckTask.class new file mode 100644 index 0000000..15f886d Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoEvent$WaterCheckTask.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoEvent.class new file mode 100644 index 0000000..0543ca9 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoPlayer$SumoState.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoPlayer$SumoState.class new file mode 100644 index 0000000..958b75c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoPlayer$SumoState.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoPlayer.class b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoPlayer.class new file mode 100644 index 0000000..dd677ce Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/events/sumo/SumoPlayer.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/AbstractFactionManager$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/AbstractFactionManager$1.class new file mode 100644 index 0000000..f251909 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/AbstractFactionManager$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/AbstractFactionManager.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/AbstractFactionManager.class new file mode 100644 index 0000000..18fa9c4 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/AbstractFactionManager.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/Faction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/Faction.class new file mode 100644 index 0000000..f509f3b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/Faction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/FactionManager.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/FactionManager.class new file mode 100644 index 0000000..38342ec Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/FactionManager.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/FactionMember.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/FactionMember.class new file mode 100644 index 0000000..078faaf Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/FactionMember.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/FlatFileFactionManager.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/FlatFileFactionManager.class new file mode 100644 index 0000000..1b51757 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/FlatFileFactionManager.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/MongoFactionManager.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/MongoFactionManager.class new file mode 100644 index 0000000..1d82389 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/MongoFactionManager.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimHandler$1.class new file mode 100644 index 0000000..3cf94ad Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimHandler.class new file mode 100644 index 0000000..87d47ef Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimSelection.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimSelection.class new file mode 100644 index 0000000..ceb05fb Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimSelection.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$1.class new file mode 100644 index 0000000..f709403 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$2.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$2.class new file mode 100644 index 0000000..2e86c39 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$2.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimWandHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimWandHandler.class new file mode 100644 index 0000000..e84cbe2 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimWandHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimZone.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimZone.class new file mode 100644 index 0000000..d8d92dc Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/claim/ClaimZone.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/SubCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/SubCommand.class new file mode 100644 index 0000000..a6213e3 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/SubCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/SubCommandExecutor.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/SubCommandExecutor.class new file mode 100644 index 0000000..3f82649 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/SubCommandExecutor.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionAllyCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionAllyCommand.class new file mode 100644 index 0000000..06e5086 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionAllyCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionAnnouncementCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionAnnouncementCommand.class new file mode 100644 index 0000000..010530a Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionAnnouncementCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionClaimCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionClaimCommand.class new file mode 100644 index 0000000..0fbbb37 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionClaimCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionClaimsCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionClaimsCommand.class new file mode 100644 index 0000000..50d2c5a Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionClaimsCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionInviteCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionInviteCommand.class new file mode 100644 index 0000000..d16a317 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionInviteCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionInvitesCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionInvitesCommand.class new file mode 100644 index 0000000..1f233e4 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionInvitesCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionKickCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionKickCommand.class new file mode 100644 index 0000000..49e37e3 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionKickCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionPromoteCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionPromoteCommand.class new file mode 100644 index 0000000..2c4d53f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionPromoteCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionSetHomeCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionSetHomeCommand.class new file mode 100644 index 0000000..2d64768 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionSetHomeCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionTagCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionTagCommand.class new file mode 100644 index 0000000..788fc3c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionTagCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionUnallyCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionUnallyCommand.class new file mode 100644 index 0000000..28e5a37 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionUnallyCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionUninviteCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionUninviteCommand.class new file mode 100644 index 0000000..f805178 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionUninviteCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionWithdrawCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionWithdrawCommand.class new file mode 100644 index 0000000..eede4df Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/captain/FactionWithdrawCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionCoLeaderCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionCoLeaderCommand.class new file mode 100644 index 0000000..5ec6c75 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionCoLeaderCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionDemoteCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionDemoteCommand.class new file mode 100644 index 0000000..db8bfbe Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionDemoteCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand$1.class new file mode 100644 index 0000000..2e1e694 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand.class new file mode 100644 index 0000000..e8edc76 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionLeaderCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionLeaderCommand.class new file mode 100644 index 0000000..a41f1de Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/leader/FactionLeaderCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionAcceptCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionAcceptCommand.class new file mode 100644 index 0000000..bbe0087 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionAcceptCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionChatCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionChatCommand.class new file mode 100644 index 0000000..7331549 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionChatCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionCreateCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionCreateCommand.class new file mode 100644 index 0000000..bd28720 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionCreateCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionDepositCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionDepositCommand.class new file mode 100644 index 0000000..4fad152 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionDepositCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand$1.class new file mode 100644 index 0000000..1c0d680 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand.class new file mode 100644 index 0000000..506e25c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionLeaveCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionLeaveCommand.class new file mode 100644 index 0000000..d6c55b6 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionLeaveCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionListCommand$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionListCommand$1.class new file mode 100644 index 0000000..bb15518 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionListCommand$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionListCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionListCommand.class new file mode 100644 index 0000000..26bb670 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionListCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionMapCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionMapCommand.class new file mode 100644 index 0000000..fa4a67b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionMapCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionPointsCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionPointsCommand.class new file mode 100644 index 0000000..9d6fd60 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionPointsCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionShowCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionShowCommand.class new file mode 100644 index 0000000..23079e9 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionShowCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionStuckCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionStuckCommand.class new file mode 100644 index 0000000..267433b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionStuckCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionUnclaimCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionUnclaimCommand.class new file mode 100644 index 0000000..0fa3bb6 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/member/FactionUnclaimCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionClaimforCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionClaimforCommand.class new file mode 100644 index 0000000..109ddf0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionClaimforCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand$ClaimClearAllPrompt.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand$ClaimClearAllPrompt.class new file mode 100644 index 0000000..d4e979a Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand$ClaimClearAllPrompt.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand.class new file mode 100644 index 0000000..3ad20bf Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionCreateSystemCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionCreateSystemCommand.class new file mode 100644 index 0000000..dcce977 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionCreateSystemCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceDemoteCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceDemoteCommand.class new file mode 100644 index 0000000..9497428 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceDemoteCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceJoinCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceJoinCommand.class new file mode 100644 index 0000000..f30950c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceJoinCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceKickCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceKickCommand.class new file mode 100644 index 0000000..a825668 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceKickCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceLeaderCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceLeaderCommand.class new file mode 100644 index 0000000..c4d4684 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForceLeaderCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForcePromoteCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForcePromoteCommand.class new file mode 100644 index 0000000..18d5a38 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionForcePromoteCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand$RemoveAllPrompt.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand$RemoveAllPrompt.class new file mode 100644 index 0000000..9379a23 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand$RemoveAllPrompt.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand.class new file mode 100644 index 0000000..17187b0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionSetBalanceCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionSetBalanceCommand.class new file mode 100644 index 0000000..6db7125 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionSetBalanceCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRCommand.class new file mode 100644 index 0000000..73ad66c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRRegenCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRRegenCommand.class new file mode 100644 index 0000000..20aa7e8 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRRegenCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionTpHereCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionTpHereCommand.class new file mode 100644 index 0000000..266bbf8 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/commands/staff/FactionTpHereCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/FactionHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/FactionHandler.class new file mode 100644 index 0000000..bb7ea6c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/FactionHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/ProtectionHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/ProtectionHandler$1.class new file mode 100644 index 0000000..d4617db Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/ProtectionHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/ProtectionHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/ProtectionHandler.class new file mode 100644 index 0000000..6e413b5 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/ProtectionHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/SignSubclaimHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/SignSubclaimHandler.class new file mode 100644 index 0000000..db03690 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/handlers/SignSubclaimHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/ClaimableFaction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/ClaimableFaction.class new file mode 100644 index 0000000..3f0b52f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/ClaimableFaction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/PlayerFaction$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/PlayerFaction$1.class new file mode 100644 index 0000000..2253c1c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/PlayerFaction$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/PlayerFaction$2.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/PlayerFaction$2.class new file mode 100644 index 0000000..67a477b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/PlayerFaction$2.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/PlayerFaction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/PlayerFaction.class new file mode 100644 index 0000000..c4f1c86 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/PlayerFaction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/games/CapturableFaction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/games/CapturableFaction.class new file mode 100644 index 0000000..3b0eb90 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/games/CapturableFaction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/games/EventFaction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/games/EventFaction.class new file mode 100644 index 0000000..8509a12 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/games/EventFaction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/EndPortalFaction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/EndPortalFaction.class new file mode 100644 index 0000000..4893c47 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/EndPortalFaction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/RoadFaction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/RoadFaction.class new file mode 100644 index 0000000..f739a05 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/RoadFaction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/SpawnFaction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/SpawnFaction.class new file mode 100644 index 0000000..d1b9a0c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/SpawnFaction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/WarzoneFaction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/WarzoneFaction.class new file mode 100644 index 0000000..54f3807 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/WarzoneFaction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/WildernessFaction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/WildernessFaction.class new file mode 100644 index 0000000..c80d816 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/type/system/WildernessFaction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/CaptureZone.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/CaptureZone.class new file mode 100644 index 0000000..603f005 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/CaptureZone.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/LandMap.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/LandMap.class new file mode 100644 index 0000000..27ad7ad Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/LandMap.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/enums/ClaimChangeEnum.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/enums/ClaimChangeEnum.class new file mode 100644 index 0000000..720fa5e Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/enums/ClaimChangeEnum.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/enums/FactionLeaveEnum.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/enums/FactionLeaveEnum.class new file mode 100644 index 0000000..83d42ff Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/enums/FactionLeaveEnum.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionChatEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionChatEvent.class new file mode 100644 index 0000000..6e14f97 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionChatEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangeEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangeEvent.class new file mode 100644 index 0000000..121757b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangeEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangedEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangedEvent.class new file mode 100644 index 0000000..2161aea Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangedEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionCreateEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionCreateEvent.class new file mode 100644 index 0000000..9bb84d3 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionCreateEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent$DtrUpdateCause.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent$DtrUpdateCause.class new file mode 100644 index 0000000..227eae3 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent$DtrUpdateCause.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent.class new file mode 100644 index 0000000..d6d57d1 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionEvent.class new file mode 100644 index 0000000..48652cd Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent$EnterCause.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent$EnterCause.class new file mode 100644 index 0000000..1dfc48c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent$EnterCause.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent.class new file mode 100644 index 0000000..9016788 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinEvent.class new file mode 100644 index 0000000..e33a507 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinedEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinedEvent.class new file mode 100644 index 0000000..7633540 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinedEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeaveEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeaveEvent.class new file mode 100644 index 0000000..e57016b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeaveEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeftEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeftEvent.class new file mode 100644 index 0000000..098a76e Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeftEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRelationCreateEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRelationCreateEvent.class new file mode 100644 index 0000000..47dbba0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRelationCreateEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRelationRemoveEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRelationRemoveEvent.class new file mode 100644 index 0000000..ce0f63b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRelationRemoveEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRemoveEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRemoveEvent.class new file mode 100644 index 0000000..65f3994 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRemoveEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRenameEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRenameEvent.class new file mode 100644 index 0000000..d8040a0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/FactionRenameEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneEnterEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneEnterEvent.class new file mode 100644 index 0000000..c527c35 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneEnterEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneLeaveEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneLeaveEvent.class new file mode 100644 index 0000000..2ce101c Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneLeaveEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/ChatChannel$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/ChatChannel$1.class new file mode 100644 index 0000000..300ebb3 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/ChatChannel$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/ChatChannel.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/ChatChannel.class new file mode 100644 index 0000000..0ce9899 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/ChatChannel.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Raidable.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Raidable.class new file mode 100644 index 0000000..1f4bf46 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Raidable.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/RegenStatus.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/RegenStatus.class new file mode 100644 index 0000000..5af368d Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/RegenStatus.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Relation$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Relation$1.class new file mode 100644 index 0000000..edf87eb Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Relation$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Relation.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Relation.class new file mode 100644 index 0000000..316a88f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Relation.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Role.class b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Role.class new file mode 100644 index 0000000..1c9637b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/factions/utils/struction/Role.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/game/GameType.class b/HCF/out/production/HCF/secondlife/network/hcfactions/game/GameType.class new file mode 100644 index 0000000..9ccfc50 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/game/GameType.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/GameManager.class b/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/GameManager.class new file mode 100644 index 0000000..2915457 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/GameManager.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/eotw/EOTWHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/eotw/EOTWHandler.class new file mode 100644 index 0000000..60a24d2 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/eotw/EOTWHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/eotw/EOTWRunnable.class b/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/eotw/EOTWRunnable.class new file mode 100644 index 0000000..c4d3580 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/eotw/EOTWRunnable.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/faction/KothFaction.class b/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/faction/KothFaction.class new file mode 100644 index 0000000..6e598d1 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/game/events/faction/KothFaction.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/game/type/KothType.class b/HCF/out/production/HCF/secondlife/network/hcfactions/game/type/KothType.class new file mode 100644 index 0000000..ebe3216 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/game/type/KothType.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/BorderHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/BorderHandler.class new file mode 100644 index 0000000..dce78c7 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/BorderHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ChatHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ChatHandler.class new file mode 100644 index 0000000..f8186ed Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ChatHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$1.class new file mode 100644 index 0000000..33be54e Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$2.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$2.class new file mode 100644 index 0000000..d9a6616 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$2.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$3.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$3.class new file mode 100644 index 0000000..34aabe9 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$3.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$4.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$4.class new file mode 100644 index 0000000..b32d000 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$4.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$5.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$5.class new file mode 100644 index 0000000..bbfb4c5 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler$5.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler.class new file mode 100644 index 0000000..4c35b32 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CombatLoggerHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CustomMovementHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CustomMovementHandler.class new file mode 100644 index 0000000..a3e903e Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/CustomMovementHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DeathMessagesHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DeathMessagesHandler.class new file mode 100644 index 0000000..bfd2b23 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DeathMessagesHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$1.class new file mode 100644 index 0000000..944361a Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$2.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$2.class new file mode 100644 index 0000000..e282e59 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$2.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$3.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$3.class new file mode 100644 index 0000000..470859f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$3.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler.class new file mode 100644 index 0000000..fd750c3 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/DynamicPlayerHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/EventSignHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/EventSignHandler.class new file mode 100644 index 0000000..6c07229 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/EventSignHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler$FurnaceUpdateTask.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler$FurnaceUpdateTask.class new file mode 100644 index 0000000..78766ac Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler$FurnaceUpdateTask.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler.class new file mode 100644 index 0000000..0217bc4 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/GlassHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/GlassHandler$1.class new file mode 100644 index 0000000..54e5b36 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/GlassHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/GlassHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/GlassHandler.class new file mode 100644 index 0000000..c062270 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/GlassHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/HCFDataHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/HCFDataHandler.class new file mode 100644 index 0000000..98c113e Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/HCFDataHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KillStreakHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KillStreakHandler.class new file mode 100644 index 0000000..366f522 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KillStreakHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitMapHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitMapHandler$1.class new file mode 100644 index 0000000..e507cfa Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitMapHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitMapHandler$2.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitMapHandler$2.class new file mode 100644 index 0000000..8e65aea Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitMapHandler$2.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitMapHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitMapHandler.class new file mode 100644 index 0000000..6dfb33f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitMapHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$1.class new file mode 100644 index 0000000..dee12f2 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$2.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$2.class new file mode 100644 index 0000000..be6a71d Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$2.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$3.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$3.class new file mode 100644 index 0000000..984ccb5 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$3.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$4.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$4.class new file mode 100644 index 0000000..63ff271 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$4.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$5.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$5.class new file mode 100644 index 0000000..6453e99 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler$5.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler.class new file mode 100644 index 0000000..872bc5a Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/KitSignHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/MapKitHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/MapKitHandler.class new file mode 100644 index 0000000..90a18a5 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/MapKitHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/NametagsHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/NametagsHandler.class new file mode 100644 index 0000000..8bf05ab Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/NametagsHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler$1.class new file mode 100644 index 0000000..1f5ef7d Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler.class new file mode 100644 index 0000000..1d48724 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/PearlFixHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/PearlFixHandler.class new file mode 100644 index 0000000..14847c0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/PearlFixHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/RegisterHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/RegisterHandler.class new file mode 100644 index 0000000..9615535 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/RegisterHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ScoreboardLayoutHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ScoreboardLayoutHandler.class new file mode 100644 index 0000000..172a1a2 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ScoreboardLayoutHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ShopHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ShopHandler.class new file mode 100644 index 0000000..19ffbcb Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ShopHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/TabLayoutHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/TabLayoutHandler.class new file mode 100644 index 0000000..38d4066 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/TabLayoutHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler$1.class new file mode 100644 index 0000000..3a30ec8 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler.class new file mode 100644 index 0000000..d3e0610 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/staff/OptionType.class b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/OptionType.class new file mode 100644 index 0000000..a280101 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/OptionType.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/staff/StaffPlayerData.class b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/StaffPlayerData.class new file mode 100644 index 0000000..5a6e855 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/StaffPlayerData.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/staff/commands/StaffModeCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/commands/StaffModeCommand.class new file mode 100644 index 0000000..1f880ff Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/commands/StaffModeCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/staff/commands/VanishCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/commands/VanishCommand.class new file mode 100644 index 0000000..29ab517 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/commands/VanishCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/StaffModeHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/StaffModeHandler$1.class new file mode 100644 index 0000000..729272f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/StaffModeHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/StaffModeHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/StaffModeHandler.class new file mode 100644 index 0000000..14f72d0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/StaffModeHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/VanishHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/VanishHandler$1.class new file mode 100644 index 0000000..f6ad912 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/VanishHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/VanishHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/VanishHandler.class new file mode 100644 index 0000000..36e5d30 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/staff/handlers/VanishHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/stattrack/StatTracker.class b/HCF/out/production/HCF/secondlife/network/hcfactions/stattrack/StatTracker.class new file mode 100644 index 0000000..a1f4257 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/stattrack/StatTracker.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/stattrack/StatTrackerHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/stattrack/StatTrackerHandler.class new file mode 100644 index 0000000..8ab58b2 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/stattrack/StatTrackerHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/stattrack/StatTrackerType.class b/HCF/out/production/HCF/secondlife/network/hcfactions/stattrack/StatTrackerType.class new file mode 100644 index 0000000..ae6a728 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/stattrack/StatTrackerType.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/AppleHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/AppleHandler.class new file mode 100644 index 0000000..bcfc6e3 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/AppleHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ArcherHandler$TaggedTask.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ArcherHandler$TaggedTask.class new file mode 100644 index 0000000..6034fdb Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ArcherHandler$TaggedTask.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ArcherHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ArcherHandler.class new file mode 100644 index 0000000..88cdfb0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ArcherHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ClassWarmupHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ClassWarmupHandler$1.class new file mode 100644 index 0000000..8ed0b19 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ClassWarmupHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ClassWarmupHandler$2.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ClassWarmupHandler$2.class new file mode 100644 index 0000000..355640e Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ClassWarmupHandler$2.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ClassWarmupHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ClassWarmupHandler.class new file mode 100644 index 0000000..2e06657 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/ClassWarmupHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/EnderpearlHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/EnderpearlHandler.class new file mode 100644 index 0000000..12b04e1 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/EnderpearlHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/GameHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/GameHandler$1.class new file mode 100644 index 0000000..bd3de57 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/GameHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/GameHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/GameHandler.class new file mode 100644 index 0000000..55a15b9 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/GameHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/GappleHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/GappleHandler.class new file mode 100644 index 0000000..bcb1b19 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/GappleHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/HomeHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/HomeHandler$1.class new file mode 100644 index 0000000..6028574 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/HomeHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/HomeHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/HomeHandler.class new file mode 100644 index 0000000..b0860e7 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/HomeHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/LogoutHandler$LogoutTask.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/LogoutHandler$LogoutTask.class new file mode 100644 index 0000000..4d94966 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/LogoutHandler$LogoutTask.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/LogoutHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/LogoutHandler.class new file mode 100644 index 0000000..5ff64e5 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/LogoutHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/SpawnTagHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/SpawnTagHandler.class new file mode 100644 index 0000000..f70c2d7 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/SpawnTagHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/StuckHandler$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/StuckHandler$1.class new file mode 100644 index 0000000..7f2d0ec Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/StuckHandler$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/timers/StuckHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/StuckHandler.class new file mode 100644 index 0000000..9ca67e6 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/timers/StuckHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ActionMessage$AMText.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ActionMessage$AMText.class new file mode 100644 index 0000000..5ccbb39 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ActionMessage$AMText.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ActionMessage$ClickableType.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ActionMessage$ClickableType.class new file mode 100644 index 0000000..24cc1b3 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ActionMessage$ClickableType.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ActionMessage.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ActionMessage.class new file mode 100644 index 0000000..a0a1319 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ActionMessage.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/CacheCleanerThread.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/CacheCleanerThread.class new file mode 100644 index 0000000..d819feb Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/CacheCleanerThread.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ChunkPosition.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ChunkPosition.class new file mode 100644 index 0000000..cf38864 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/ChunkPosition.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/CustomLocation.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/CustomLocation.class new file mode 100644 index 0000000..4675ff9 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/CustomLocation.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/GenericUtils.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/GenericUtils.class new file mode 100644 index 0000000..c8b80b8 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/GenericUtils.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/HCFUtils$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/HCFUtils$1.class new file mode 100644 index 0000000..4c883df Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/HCFUtils$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/HCFUtils.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/HCFUtils.class new file mode 100644 index 0000000..5bcf2c8 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/HCFUtils.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/Handler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/Handler.class new file mode 100644 index 0000000..435982a Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/Handler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/JavaUtils.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/JavaUtils.class new file mode 100644 index 0000000..e17d196 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/JavaUtils.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/MapSorting$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/MapSorting$1.class new file mode 100644 index 0000000..4d80279 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/MapSorting$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/MapSorting.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/MapSorting.class new file mode 100644 index 0000000..cb47610 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/MapSorting.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/PacketUtils.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/PacketUtils.class new file mode 100644 index 0000000..e655d7f Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/PacketUtils.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/PersistableLocation.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/PersistableLocation.class new file mode 100644 index 0000000..72818b0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/PersistableLocation.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/TimeUtil.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/TimeUtil.class new file mode 100644 index 0000000..6165e63 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/TimeUtil.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/events/BaseEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/events/BaseEvent.class new file mode 100644 index 0000000..ef666c2 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/events/BaseEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/events/EventStartEvent.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/events/EventStartEvent.class new file mode 100644 index 0000000..2a75f92 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/events/EventStartEvent.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/ConfigFile.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/ConfigFile.class new file mode 100644 index 0000000..330d4b1 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/ConfigFile.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/LimitersFile.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/LimitersFile.class new file mode 100644 index 0000000..7610e13 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/LimitersFile.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/SchedulesFile.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/SchedulesFile.class new file mode 100644 index 0000000..d7b7bbb Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/SchedulesFile.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/UtilitiesFile.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/UtilitiesFile.class new file mode 100644 index 0000000..5bab727 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/file/UtilitiesFile.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/Redis$RedisCommand.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/Redis$RedisCommand.class new file mode 100644 index 0000000..fdb44ac Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/Redis$RedisCommand.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/Redis.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/Redis.class new file mode 100644 index 0000000..c91e5e7 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/Redis.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/UUIDHandler.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/UUIDHandler.class new file mode 100644 index 0000000..76003b0 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/UUIDHandler.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/UUIDUtils$1.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/UUIDUtils$1.class new file mode 100644 index 0000000..cd1fe5b Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/UUIDUtils$1.class differ diff --git a/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/UUIDUtils.class b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/UUIDUtils.class new file mode 100644 index 0000000..0fa4017 Binary files /dev/null and b/HCF/out/production/HCF/secondlife/network/hcfactions/utilties/redis/UUIDUtils.class differ diff --git a/HCF/out/production/HCF/utilities.yml b/HCF/out/production/HCF/utilities.yml new file mode 100644 index 0000000..2137d42 --- /dev/null +++ b/HCF/out/production/HCF/utilities.yml @@ -0,0 +1,15 @@ +map-kit-items: '' +first-join-items: | + rO0ABXcEAAAAJHNyABpvcmcuYnVra2l0LnV0aWwuaW8uV3JhcHBlcvJQR+zxEm8FAgABTAADbWFw + dAAPTGphdmEvdXRpbC9NYXA7eHBzcgA1Y29tLmdvb2dsZS5jb21tb24uY29sbGVjdC5JbW11dGFi + bGVNYXAkU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAlsABGtleXN0ABNbTGphdmEvbGFuZy9PYmpl + Y3Q7WwAGdmFsdWVzcQB+AAR4cHVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAA + AAN0AAI9PXQABHR5cGV0AARtZXRhdXEAfgAGAAAAA3QAHm9yZy5idWtraXQuaW52ZW50b3J5Lkl0 + ZW1TdGFja3QAC0ZJU0hJTkdfUk9Ec3EAfgAAc3EAfgADdXEAfgAGAAAABHEAfgAIdAAJbWV0YS10 + eXBldAAMZGlzcGxheS1uYW1ldAAIZW5jaGFudHN1cQB+AAYAAAAEdAAISXRlbU1ldGF0AApVTlNQ + RUNJRklDdAAOwqdjRmlzaGluZyBSb2RzcQB+AAN1cQB+AAYAAAABdAAETFVSRXVxAH4ABgAAAAFz + cgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1i + ZXKGrJUdC5TgiwIAAHhwAAAAA3NxAH4AAHNxAH4AA3VxAH4ABgAAAARxAH4ACHEAfgAJdAAGYW1v + dW50cQB+AAp1cQB+AAYAAAAEcQB+AAx0AAtDT09LRURfQkVFRnNxAH4AHAAAACBzcQB+AABzcQB+ + AAN1cQB+AAYAAAADcQB+AAhxAH4AEXEAfgASdXEAfgAGAAAAA3EAfgAVcQB+ABZ0AAjCp2FTdGVh + a3BwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHA= \ No newline at end of file diff --git a/HCF/out/production/HCFCore/META-INF/MANIFEST.MF b/HCF/out/production/HCFCore/META-INF/MANIFEST.MF new file mode 100644 index 0000000..7427cc4 --- /dev/null +++ b/HCF/out/production/HCFCore/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: HCF + diff --git a/HCF/out/production/HCFCore/config.yml b/HCF/out/production/HCFCore/config.yml new file mode 100644 index 0000000..a4c0e9e --- /dev/null +++ b/HCF/out/production/HCFCore/config.yml @@ -0,0 +1,49 @@ +SERVERNAME: "Test" +SCOREBOARD: + TITLE: "&5&lSecondLife &d(Map 14)" +ECONOMY: + SIGN: + BUY_TEXT: + - "&a[Buy]" + - "%ITEM%" + - "%AMOUNT%" + - "$%PRICE%" + SELL_TEXT: + - "&c[Sell]" + - "%ITEM%" + - "%AMOUNT%" + - "$%PRICE%" +DEATH_SIGN: + SIGN: + - "&c%KILLED%" + - "&ewas slain by" + - "&a%KILLER%" + - "%TIME%" + ITEM_STACK: + NAME: "&aDeath Sign" + LORE: + - "&c%KILLED%" + - "&ewas slain by" + - "&a%KILLER%" + - "&d%TIME%" +kitmap: false +coords: +- '&7&m-----------------------------' +- ' &e&lImportant coordinates (x,z)' +- ' &7- &aSpawn&7: 0 , 0' +- ' &7- &3Towers Koth&7: 500 , 500' +- ' &7- &3Islands Koth&7: -500 , 500' +- ' &7- &3Moon Koth&7: 500 , -500' +- ' &7- &3End Koth&7: -80, 90 (End)' +- ' &7- &3&lConquest&7: -500 , -500' +- ' &7- &cEnd Portal&7: 700 , 700 (All quadrants)' +- '&7&m-----------------------------' +help: +- '&7&m-----------------------------' +- ' &7- &6/faction &7- Use to see all factions related commands.' +- ' &7- &6/koth &7- Use to see all koth related commands.' +- ' &7- &6/lives &7- Use to check your lives amount.' +- ' &7- &6/mapkit &7- Use to check this map kit.' +- ' &7- &6/coords &7- Use to see all important coordinates.' +- ' &7- &6/logout &7- Logout countdown for safe logout.' +- '&7&m-----------------------------' \ No newline at end of file diff --git a/HCF/out/production/HCFCore/limiters.yml b/HCF/out/production/HCFCore/limiters.yml new file mode 100644 index 0000000..79fe08e --- /dev/null +++ b/HCF/out/production/HCFCore/limiters.yml @@ -0,0 +1,107 @@ +###################### INSTRUCTIONS ###################### +### Use -1 for no change ### +### Use 0 to disable enchantment ### +### Use other values to limit enchantment level ### +############################################################## +enchantment-limiter: + ARROW_DAMAGE: 4 + ARROW_FIRE: 0 + ARROW_INFINITE: -1 + ARROW_KNOCKBACK: 1 + DAMAGE_ALL: 1 + DAMAGE_ARTHROPODS: -1 + DAMAGE_UNDEAD: -1 + DIG_SPEED: -1 + DURABILITY: -1 + FIRE_ASPECT: 0 + KNOCKBACK: 1 + LOOT_BONUS_BLOCKS: -1 + LOOT_BONUS_MOBS: -1 + LUCK: -1 + LURE: -1 + OXYGEN: -1 + PROTECTION_ENVIRONMENTAL: 2 + PROTECTION_EXPLOSIONS: -1 + PROTECTION_FALL: -1 + PROTECTION_FIRE: -1 + PROTECTION_PROJECTILE: -1 + SILK_TOUCH: -1 + THORNS: 0 + WATER_WORKER: -1 + +###################### INSTRUCTIONS ###################### +### Use -1 for no change ### +### Use 0 to disable potion ### +### Use other values to limit potion level ### +### Change extended to false to disable extended potions ### +############################################################## +potion-limiter: + SPEED: + level: -1 + extended: true + SLOW: + level: 1 + extended: false + FAST_DIGGING: + level: -1 + extended: true + SLOW_DIGGING: + level: -1 + extended: true + INCREASE_DAMAGE: + level: 0 + extended: true + HEAL: + level: -1 + extended: true + HARM: + level: 0 + extended: true + JUMP: + level: -1 + extended: true + CONFUSION: + level: -1 + extended: true + REGENERATION: + level: 0 + extended: true + DAMAGE_RESISTANCE: + level: -1 + extended: true + FIRE_RESISTANCE: + level: -1 + extended: true + WATER_BREATHING: + level: -1 + extended: true + INVISIBILITY: + level: 0 + extended: true + BLINDNESS: + level: -1 + extended: true + NIGHT_VISION: + level: -1 + extended: true + HUNGER: + level: 0 + extended: true + WEAKNESS: + level: 0 + extended: true + POISON: + level: 1 + extended: false + WITHER: + level: -1 + extended: true + HEALTH_BOOST: + level: -1 + extended: true + ABSORPTION: + level: -1 + extended: true + SATURATION: + level: -1 + extended: true \ No newline at end of file diff --git a/HCF/out/production/HCFCore/plugin.yml b/HCF/out/production/HCFCore/plugin.yml new file mode 100644 index 0000000..f712e34 --- /dev/null +++ b/HCF/out/production/HCFCore/plugin.yml @@ -0,0 +1,114 @@ +name: SecondLife +main: secondlife.network.hcfactions.HCF +version: 6.0 +description: SL HCF Core. +author: SecondLife Development Team +depend: [ProtocolLib, Vituz] +commands: + faction: + description: Faction Command + aliases: [f, fac, team, t] + master: + description: Master Command + ultimate: + description: Ultimate Command + ultra: + description: Ultra Command + balance: + description: Balance Command + aliases: [bal, eco, economy] + block: + description: Blcok Command + aliases: [cobble, filter, blocks, cobblestone] + bottle: + description: Bottle Command + chat: + description: ChatControl Command + aliases: [chatcontrol, chc] + chat: + description: ChatControl Command + aliases: [chatcontrol, chc] + chest: + description: Chest Command + aliases: [pv, playervault] + coords: + description: Coords Command + aliases: [coordinates] + crowbar: + description: Crowbar Command + deathban: + description: Deathban Command + aliases: [db, dban, deathb] + endportal: + description: EndPortal Command + aliases: [lightportal, lighportal] + eotw: + description: EOTW Command + event: + description: KoTH Command + aliases: [game, koth, conquest] + firstjoinitems: + description: FirstJoinItems Command + aliases: [fji] + focus: + description: Focus Command + glowstone: + description: Glowstone Command + aliases: [glow, glowmountain, mountain, glowstonemountain] + help: + description: Help Command + aliases: ["?"] + lastdeaths: + description: LastDeaths Command + aliases: [ldeaths, lastd] + logout: + description: Logout Command + mapkit: + description: MapKit Command + pay: + description: Pay Command + pvp: + description: PvP Command + aliases: [prot, timer, pvptimer, lives] + reclaim: + description: Reclaim Command + aliases: [claimlives, claimkeys] + regen: + description: Regen Command + savedata: + description: SaveData Command + aliases: [sd] + set: + description: Set Command + sotw: + description: SOTW Command + spawn: + description: Spawn Command + staff: + description: StaffMode Command + aliases: [mod, staffmode, modmode] + stats: + description: Stats Command + aliases: [status, ores] + sumo: + description: Sumo Command + tellcoords: + description: TellCoords Command + aliases: [tl] + togglelightning: + description: ToggleLightning Command + vanish: + description: Vanish Command + aliases: [v] + togglebroadcasts: + description: ToggleBroadcasts Command + aliases: [togglefd, tfd, fo, fd, foundore] + secondlife: + description: SecondLife Command + aliases: [core] + deathlookup: + description: Deathlookup Command + aliases: [dl, deathl, dlookup, deathlook, lookdeath] + lastinventory: + description: Lastinventory Command + aliases: [li, lastinv, lastinventory, restoreinv, restoreinventory, ri] \ No newline at end of file diff --git a/HCF/out/production/HCFCore/schedules.yml b/HCF/out/production/HCFCore/schedules.yml new file mode 100644 index 0000000..b307ffe --- /dev/null +++ b/HCF/out/production/HCFCore/schedules.yml @@ -0,0 +1,9 @@ +# Add more koths in the same day by adding a splitter '#' after each event + +schedule-monday: "6:00PM/Temple/15" +schedule-tuesday: "6:00PM/Temple/15" +schedule-wednesday: "6:00PM/Temple/15" +schedule-thursday: "6:00PM/Temple/15" +schedule-friday: "6:00PM/Temple/15" +schedule-saturday: "6:00PM/Temple/15" +schedule-sunday: "6:00PM/Temple/15" diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/Configuration.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/Configuration.class new file mode 100644 index 0000000..2ae0970 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/Configuration.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/HCF$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/HCF$1.class new file mode 100644 index 0000000..a42b433 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/HCF$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/HCF.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/HCF.class new file mode 100644 index 0000000..f705d17 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/HCF.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Archer.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Archer.class new file mode 100644 index 0000000..26f9195 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Archer.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Bard$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Bard$1.class new file mode 100644 index 0000000..a662e62 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Bard$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Bard.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Bard.class new file mode 100644 index 0000000..11852ff Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Bard.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Miner.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Miner.class new file mode 100644 index 0000000..292eaab Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Miner.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Rogue.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Rogue.class new file mode 100644 index 0000000..3f53475 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/Rogue.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/ArmorClass.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/ArmorClass.class new file mode 100644 index 0000000..1d9952c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/ArmorClass.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/ArmorClassHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/ArmorClassHandler.class new file mode 100644 index 0000000..2d3b9df Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/ArmorClassHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/BardData.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/BardData.class new file mode 100644 index 0000000..59488ed Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/BardData.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/EffectData.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/EffectData.class new file mode 100644 index 0000000..e77d9a3 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/EffectData.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler$1.class new file mode 100644 index 0000000..a451284 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler.class new file mode 100644 index 0000000..319c534 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/events/ArmorClassEquipEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/events/ArmorClassEquipEvent.class new file mode 100644 index 0000000..9c700e1 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/events/ArmorClassEquipEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/events/ArmorClassUnequipEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/events/ArmorClassUnequipEvent.class new file mode 100644 index 0000000..995ef5f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/classes/utils/events/ArmorClassUnequipEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/BaseCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/BaseCommand.class new file mode 100644 index 0000000..24ddec7 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/BaseCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/CommandHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/CommandHandler.class new file mode 100644 index 0000000..466dc9f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/CommandHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/BalanceCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/BalanceCommand.class new file mode 100644 index 0000000..d730083 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/BalanceCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/ChestCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/ChestCommand.class new file mode 100644 index 0000000..77dfb23 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/ChestCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/CoordsCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/CoordsCommand.class new file mode 100644 index 0000000..f1ca1ef Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/CoordsCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EOTWCommand$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EOTWCommand$1.class new file mode 100644 index 0000000..d0e61fe Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EOTWCommand$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EOTWCommand$EotwPrompt.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EOTWCommand$EotwPrompt.class new file mode 100644 index 0000000..45c3d56 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EOTWCommand$EotwPrompt.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EOTWCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EOTWCommand.class new file mode 100644 index 0000000..6f318b6 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EOTWCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EventCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EventCommand.class new file mode 100644 index 0000000..88ecf74 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/EventCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/FirstJoinItemsCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/FirstJoinItemsCommand.class new file mode 100644 index 0000000..62a2d28 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/FirstJoinItemsCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/FocusCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/FocusCommand.class new file mode 100644 index 0000000..661dbe2 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/FocusCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/HelpCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/HelpCommand.class new file mode 100644 index 0000000..6c133c3 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/HelpCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/LogoutCommand$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/LogoutCommand$1.class new file mode 100644 index 0000000..a0bd5a3 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/LogoutCommand$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/LogoutCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/LogoutCommand.class new file mode 100644 index 0000000..8464d25 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/LogoutCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/MapKitCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/MapKitCommand.class new file mode 100644 index 0000000..b66f60e Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/MapKitCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/PayCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/PayCommand.class new file mode 100644 index 0000000..4e8e605 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/PayCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/ReclaimCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/ReclaimCommand.class new file mode 100644 index 0000000..ae5bd4e Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/ReclaimCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/RegenCommand$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/RegenCommand$1.class new file mode 100644 index 0000000..9e89068 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/RegenCommand$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/RegenCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/RegenCommand.class new file mode 100644 index 0000000..3444dd7 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/RegenCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SaveDataCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SaveDataCommand.class new file mode 100644 index 0000000..d211de4 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SaveDataCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SetCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SetCommand.class new file mode 100644 index 0000000..eb2317d Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SetCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SpawnCommand$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SpawnCommand$1.class new file mode 100644 index 0000000..14f8c2f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SpawnCommand$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SpawnCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SpawnCommand.class new file mode 100644 index 0000000..718ab6d Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/SpawnCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/StatsCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/StatsCommand.class new file mode 100644 index 0000000..27194f6 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/StatsCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/TellCoordsCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/TellCoordsCommand.class new file mode 100644 index 0000000..f528bf9 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/TellCoordsCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/ToggleLightningCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/ToggleLightningCommand.class new file mode 100644 index 0000000..6a2e0b0 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/ToggleLightningCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/zSecondLifeCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/zSecondLifeCommand.class new file mode 100644 index 0000000..006ea77 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/commands/arguments/zSecondLifeCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/AbstractFactionManager$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/AbstractFactionManager$1.class new file mode 100644 index 0000000..b949686 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/AbstractFactionManager$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/AbstractFactionManager.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/AbstractFactionManager.class new file mode 100644 index 0000000..b81bd3c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/AbstractFactionManager.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/Faction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/Faction.class new file mode 100644 index 0000000..220c668 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/Faction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/FactionManager.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/FactionManager.class new file mode 100644 index 0000000..38342ec Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/FactionManager.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/MongoFactionHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/MongoFactionHandler$1.class new file mode 100644 index 0000000..eb43a01 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/MongoFactionHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/MongoFactionHandler$2.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/MongoFactionHandler$2.class new file mode 100644 index 0000000..d6efa30 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/MongoFactionHandler$2.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/MongoFactionHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/MongoFactionHandler.class new file mode 100644 index 0000000..f71ab85 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/MongoFactionHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimHandler$1.class new file mode 100644 index 0000000..3cf94ad Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimHandler.class new file mode 100644 index 0000000..f8126af Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimSelection.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimSelection.class new file mode 100644 index 0000000..4dd38e0 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimSelection.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$1.class new file mode 100644 index 0000000..f709403 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$2.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$2.class new file mode 100644 index 0000000..2e86c39 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimWandHandler$2.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimWandHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimWandHandler.class new file mode 100644 index 0000000..e84cbe2 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimWandHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimZone.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimZone.class new file mode 100644 index 0000000..1c21d37 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/claim/ClaimZone.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/SubCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/SubCommand.class new file mode 100644 index 0000000..a6213e3 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/SubCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/SubCommandExecutor.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/SubCommandExecutor.class new file mode 100644 index 0000000..3f82649 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/SubCommandExecutor.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionAllyCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionAllyCommand.class new file mode 100644 index 0000000..1cb4b95 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionAllyCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionAnnouncementCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionAnnouncementCommand.class new file mode 100644 index 0000000..150a0ad Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionAnnouncementCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionClaimCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionClaimCommand.class new file mode 100644 index 0000000..0fbbb37 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionClaimCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionClaimsCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionClaimsCommand.class new file mode 100644 index 0000000..5e504cd Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionClaimsCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionInviteCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionInviteCommand.class new file mode 100644 index 0000000..e4ce0e2 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionInviteCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionInvitesCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionInvitesCommand.class new file mode 100644 index 0000000..1f233e4 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionInvitesCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionKickCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionKickCommand.class new file mode 100644 index 0000000..feceea8 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionKickCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionPromoteCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionPromoteCommand.class new file mode 100644 index 0000000..367ac12 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionPromoteCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionSetHomeCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionSetHomeCommand.class new file mode 100644 index 0000000..e0cf4a2 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionSetHomeCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionTagCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionTagCommand.class new file mode 100644 index 0000000..7250cd6 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionTagCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionUnallyCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionUnallyCommand.class new file mode 100644 index 0000000..96e2488 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionUnallyCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionUninviteCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionUninviteCommand.class new file mode 100644 index 0000000..6a129f6 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionUninviteCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionWithdrawCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionWithdrawCommand.class new file mode 100644 index 0000000..8f650ba Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/captain/FactionWithdrawCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionCoLeaderCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionCoLeaderCommand.class new file mode 100644 index 0000000..417bbaf Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionCoLeaderCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionDemoteCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionDemoteCommand.class new file mode 100644 index 0000000..e1d85d9 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionDemoteCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand$1.class new file mode 100644 index 0000000..2e1e694 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand.class new file mode 100644 index 0000000..bac751e Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionDisbandCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionLeaderCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionLeaderCommand.class new file mode 100644 index 0000000..c6d80d3 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/leader/FactionLeaderCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionAcceptCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionAcceptCommand.class new file mode 100644 index 0000000..1b949a3 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionAcceptCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionChatCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionChatCommand.class new file mode 100644 index 0000000..2dfa69c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionChatCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionCreateCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionCreateCommand.class new file mode 100644 index 0000000..c4cb5a5 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionCreateCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionDepositCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionDepositCommand.class new file mode 100644 index 0000000..1bcd664 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionDepositCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand$1.class new file mode 100644 index 0000000..2f2c489 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand.class new file mode 100644 index 0000000..786cce1 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionHomeCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionLeaveCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionLeaveCommand.class new file mode 100644 index 0000000..cc9a489 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionLeaveCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionListCommand$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionListCommand$1.class new file mode 100644 index 0000000..61ba63b Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionListCommand$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionListCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionListCommand.class new file mode 100644 index 0000000..9e903ef Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionListCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionMapCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionMapCommand.class new file mode 100644 index 0000000..818db45 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionMapCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionPointsCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionPointsCommand.class new file mode 100644 index 0000000..54ee54f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionPointsCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionShowCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionShowCommand.class new file mode 100644 index 0000000..23079e9 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionShowCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionStuckCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionStuckCommand.class new file mode 100644 index 0000000..52ebc94 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionStuckCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionUnclaimCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionUnclaimCommand.class new file mode 100644 index 0000000..8920364 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/member/FactionUnclaimCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionClaimforCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionClaimforCommand.class new file mode 100644 index 0000000..109ddf0 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionClaimforCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand$ClaimClearAllPrompt.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand$ClaimClearAllPrompt.class new file mode 100644 index 0000000..1d7a268 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand$ClaimClearAllPrompt.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand.class new file mode 100644 index 0000000..0aca1a6 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionClearclaimsCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionCreateSystemCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionCreateSystemCommand.class new file mode 100644 index 0000000..204b4c5 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionCreateSystemCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceDemoteCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceDemoteCommand.class new file mode 100644 index 0000000..67d1434 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceDemoteCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceJoinCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceJoinCommand.class new file mode 100644 index 0000000..81b7073 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceJoinCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceKickCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceKickCommand.class new file mode 100644 index 0000000..262267a Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceKickCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceLeaderCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceLeaderCommand.class new file mode 100644 index 0000000..be420d0 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForceLeaderCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForcePromoteCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForcePromoteCommand.class new file mode 100644 index 0000000..0d75311 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionForcePromoteCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand$RemoveAllPrompt.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand$RemoveAllPrompt.class new file mode 100644 index 0000000..9379a23 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand$RemoveAllPrompt.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand.class new file mode 100644 index 0000000..17187b0 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionRemoveCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionSetBalanceCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionSetBalanceCommand.class new file mode 100644 index 0000000..0782122 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionSetBalanceCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRCommand.class new file mode 100644 index 0000000..73ad66c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRRegenCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRRegenCommand.class new file mode 100644 index 0000000..20aa7e8 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionSetDTRRegenCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionTpHereCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionTpHereCommand.class new file mode 100644 index 0000000..266bbf8 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/commands/staff/FactionTpHereCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/FactionHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/FactionHandler.class new file mode 100644 index 0000000..01f848c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/FactionHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/ProtectionHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/ProtectionHandler$1.class new file mode 100644 index 0000000..c6d569a Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/ProtectionHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/ProtectionHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/ProtectionHandler.class new file mode 100644 index 0000000..d75475a Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/ProtectionHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/SignSubclaimHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/SignSubclaimHandler.class new file mode 100644 index 0000000..6dffa9d Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/handlers/SignSubclaimHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/ClaimableFaction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/ClaimableFaction.class new file mode 100644 index 0000000..141ed09 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/ClaimableFaction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/PlayerFaction$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/PlayerFaction$1.class new file mode 100644 index 0000000..6b8e862 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/PlayerFaction$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/PlayerFaction$2.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/PlayerFaction$2.class new file mode 100644 index 0000000..47fc514 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/PlayerFaction$2.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/PlayerFaction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/PlayerFaction.class new file mode 100644 index 0000000..62d4c84 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/PlayerFaction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/games/CapturableFaction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/games/CapturableFaction.class new file mode 100644 index 0000000..b3cd25c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/games/CapturableFaction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/games/EventFaction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/games/EventFaction.class new file mode 100644 index 0000000..6f57390 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/games/EventFaction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/EndPortalFaction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/EndPortalFaction.class new file mode 100644 index 0000000..1c846d4 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/EndPortalFaction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/RoadFaction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/RoadFaction.class new file mode 100644 index 0000000..e5d1b2b Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/RoadFaction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/SpawnFaction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/SpawnFaction.class new file mode 100644 index 0000000..92e4345 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/SpawnFaction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/WarzoneFaction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/WarzoneFaction.class new file mode 100644 index 0000000..b1c9580 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/WarzoneFaction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/WildernessFaction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/WildernessFaction.class new file mode 100644 index 0000000..5fb9a0a Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/type/system/WildernessFaction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/CaptureZone.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/CaptureZone.class new file mode 100644 index 0000000..5d1ea1a Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/CaptureZone.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/FactionMember.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/FactionMember.class new file mode 100644 index 0000000..705e579 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/FactionMember.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/LandMap.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/LandMap.class new file mode 100644 index 0000000..27ad7ad Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/LandMap.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/enums/ClaimChangeEnum.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/enums/ClaimChangeEnum.class new file mode 100644 index 0000000..720fa5e Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/enums/ClaimChangeEnum.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/enums/FactionLeaveEnum.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/enums/FactionLeaveEnum.class new file mode 100644 index 0000000..83d42ff Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/enums/FactionLeaveEnum.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionChatEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionChatEvent.class new file mode 100644 index 0000000..27ed797 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionChatEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangeEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangeEvent.class new file mode 100644 index 0000000..121757b Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangeEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangedEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangedEvent.class new file mode 100644 index 0000000..2161aea Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionClaimChangedEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionCreateEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionCreateEvent.class new file mode 100644 index 0000000..9bb84d3 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionCreateEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent$DtrUpdateCause.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent$DtrUpdateCause.class new file mode 100644 index 0000000..227eae3 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent$DtrUpdateCause.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent.class new file mode 100644 index 0000000..d6d57d1 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionDTRChangeEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionEvent.class new file mode 100644 index 0000000..48652cd Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent$EnterCause.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent$EnterCause.class new file mode 100644 index 0000000..1dfc48c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent$EnterCause.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent.class new file mode 100644 index 0000000..9016788 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerClaimEnterEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinEvent.class new file mode 100644 index 0000000..e33a507 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinedEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinedEvent.class new file mode 100644 index 0000000..7633540 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerJoinedEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeaveEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeaveEvent.class new file mode 100644 index 0000000..e57016b Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeaveEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeftEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeftEvent.class new file mode 100644 index 0000000..098a76e Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionPlayerLeftEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRelationCreateEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRelationCreateEvent.class new file mode 100644 index 0000000..47dbba0 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRelationCreateEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRelationRemoveEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRelationRemoveEvent.class new file mode 100644 index 0000000..ce0f63b Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRelationRemoveEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRemoveEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRemoveEvent.class new file mode 100644 index 0000000..65f3994 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRemoveEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRenameEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRenameEvent.class new file mode 100644 index 0000000..d8040a0 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/FactionRenameEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneEnterEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneEnterEvent.class new file mode 100644 index 0000000..c527c35 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneEnterEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneLeaveEvent.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneLeaveEvent.class new file mode 100644 index 0000000..2ce101c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/events/capzone/CaptureZoneLeaveEvent.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/ChatChannel$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/ChatChannel$1.class new file mode 100644 index 0000000..300ebb3 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/ChatChannel$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/ChatChannel.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/ChatChannel.class new file mode 100644 index 0000000..aff3fd4 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/ChatChannel.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Raidable.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Raidable.class new file mode 100644 index 0000000..1f4bf46 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Raidable.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/RegenStatus.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/RegenStatus.class new file mode 100644 index 0000000..5af368d Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/RegenStatus.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Relation$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Relation$1.class new file mode 100644 index 0000000..edf87eb Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Relation$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Relation.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Relation.class new file mode 100644 index 0000000..a1220da Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Relation.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Role.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Role.class new file mode 100644 index 0000000..1c9637b Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/factions/utils/struction/Role.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/GameType.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/GameType.class new file mode 100644 index 0000000..9ccfc50 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/GameType.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/GameManager.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/GameManager.class new file mode 100644 index 0000000..8a5991c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/GameManager.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/eotw/EOTWHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/eotw/EOTWHandler.class new file mode 100644 index 0000000..60a24d2 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/eotw/EOTWHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/eotw/EOTWRunnable.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/eotw/EOTWRunnable.class new file mode 100644 index 0000000..bed16cd Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/eotw/EOTWRunnable.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/faction/KothFaction.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/faction/KothFaction.class new file mode 100644 index 0000000..ede7270 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/events/faction/KothFaction.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/type/KothType.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/type/KothType.class new file mode 100644 index 0000000..cff1e0b Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/game/type/KothType.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/BorderHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/BorderHandler.class new file mode 100644 index 0000000..3df4b3f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/BorderHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ChatControlHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ChatControlHandler.class new file mode 100644 index 0000000..7e78b20 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ChatControlHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ChatHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ChatHandler.class new file mode 100644 index 0000000..c63ce2c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ChatHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$1.class new file mode 100644 index 0000000..33be54e Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$2.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$2.class new file mode 100644 index 0000000..d9a6616 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$2.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$3.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$3.class new file mode 100644 index 0000000..34aabe9 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$3.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$4.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$4.class new file mode 100644 index 0000000..b32d000 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$4.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$5.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$5.class new file mode 100644 index 0000000..6277ec8 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler$5.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler.class new file mode 100644 index 0000000..90b0f2d Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/CombatLoggerHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DeathMessagesHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DeathMessagesHandler.class new file mode 100644 index 0000000..7693176 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DeathMessagesHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$1.class new file mode 100644 index 0000000..45f818f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$2.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$2.class new file mode 100644 index 0000000..4ff7b3c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$2.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$3.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$3.class new file mode 100644 index 0000000..7ce3374 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler$3.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler.class new file mode 100644 index 0000000..a3f0782 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/DynamicPlayerHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/EventSignHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/EventSignHandler.class new file mode 100644 index 0000000..6c07229 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/EventSignHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler$FurnaceUpdateTask.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler$FurnaceUpdateTask.class new file mode 100644 index 0000000..78766ac Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler$FurnaceUpdateTask.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler.class new file mode 100644 index 0000000..0217bc4 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/FurnaceSpeedHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/GlassHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/GlassHandler$1.class new file mode 100644 index 0000000..6af0f1f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/GlassHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/GlassHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/GlassHandler.class new file mode 100644 index 0000000..ff50131 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/GlassHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/MapKitHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/MapKitHandler.class new file mode 100644 index 0000000..90a18a5 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/MapKitHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/NametagsHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/NametagsHandler.class new file mode 100644 index 0000000..a377b39 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/NametagsHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler$1.class new file mode 100644 index 0000000..1f5ef7d Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler.class new file mode 100644 index 0000000..1d48724 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/OnlineDonatorsHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/RegisterHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/RegisterHandler$1.class new file mode 100644 index 0000000..4563223 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/RegisterHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/RegisterHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/RegisterHandler.class new file mode 100644 index 0000000..c89d89e Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/RegisterHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ScoreboardLayoutHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ScoreboardLayoutHandler.class new file mode 100644 index 0000000..321c58f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ScoreboardLayoutHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/TabLayoutHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/TabLayoutHandler.class new file mode 100644 index 0000000..3cc9bd9 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/TabLayoutHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler$1.class new file mode 100644 index 0000000..f2736d1 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler.class new file mode 100644 index 0000000..cbaf13c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/ThrowableCobwebHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/data/HCFData.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/data/HCFData.class new file mode 100644 index 0000000..4dd34d0 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/data/HCFData.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/data/HCFDataHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/data/HCFDataHandler.class new file mode 100644 index 0000000..9417d9d Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/data/HCFDataHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySign.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySign.class new file mode 100644 index 0000000..d142ff5 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySign.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySignHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySignHandler$1.class new file mode 100644 index 0000000..03b2a8a Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySignHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySignHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySignHandler.class new file mode 100644 index 0000000..b081cfb Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySignHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySignType.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySignType.class new file mode 100644 index 0000000..6ea43c8 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/economy/EconomySignType.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/elevators/SignElevatorHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/elevators/SignElevatorHandler.class new file mode 100644 index 0000000..d773029 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/elevators/SignElevatorHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KillStreakHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KillStreakHandler.class new file mode 100644 index 0000000..6854f30 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KillStreakHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitMapHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitMapHandler$1.class new file mode 100644 index 0000000..6ece02f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitMapHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitMapHandler$2.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitMapHandler$2.class new file mode 100644 index 0000000..9c12941 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitMapHandler$2.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitMapHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitMapHandler.class new file mode 100644 index 0000000..5ac5a71 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitMapHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$1.class new file mode 100644 index 0000000..40c3f0e Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$2.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$2.class new file mode 100644 index 0000000..e604ee5 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$2.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$3.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$3.class new file mode 100644 index 0000000..ea28466 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$3.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$4.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$4.class new file mode 100644 index 0000000..8f9ce9a Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$4.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$5.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$5.class new file mode 100644 index 0000000..c6e2dea Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler$5.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler.class new file mode 100644 index 0000000..c3da23d Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/KitSignHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/ShopHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/ShopHandler.class new file mode 100644 index 0000000..c16f882 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/kitmap/ShopHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/stattrack/StatTracker.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/stattrack/StatTracker.class new file mode 100644 index 0000000..76d6853 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/stattrack/StatTracker.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/stattrack/StatTrackerHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/stattrack/StatTrackerHandler.class new file mode 100644 index 0000000..235d850 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/stattrack/StatTrackerHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/stattrack/StatTrackerType.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/stattrack/StatTrackerType.class new file mode 100644 index 0000000..f1ae0e7 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/stattrack/StatTrackerType.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/AppleHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/AppleHandler.class new file mode 100644 index 0000000..9e8c780 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/AppleHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ArcherHandler$TaggedTask.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ArcherHandler$TaggedTask.class new file mode 100644 index 0000000..53b45d6 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ArcherHandler$TaggedTask.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ArcherHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ArcherHandler.class new file mode 100644 index 0000000..865f663 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ArcherHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ClassWarmupHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ClassWarmupHandler$1.class new file mode 100644 index 0000000..c734a03 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ClassWarmupHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ClassWarmupHandler$2.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ClassWarmupHandler$2.class new file mode 100644 index 0000000..dd2031a Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ClassWarmupHandler$2.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ClassWarmupHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ClassWarmupHandler.class new file mode 100644 index 0000000..9e95d43 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/ClassWarmupHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/EnderpearlHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/EnderpearlHandler.class new file mode 100644 index 0000000..183e8a1 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/EnderpearlHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/GameHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/GameHandler$1.class new file mode 100644 index 0000000..51cb213 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/GameHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/GameHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/GameHandler.class new file mode 100644 index 0000000..b16d403 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/GameHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/GappleHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/GappleHandler.class new file mode 100644 index 0000000..f61e71c Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/GappleHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/HomeHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/HomeHandler$1.class new file mode 100644 index 0000000..ab738e5 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/HomeHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/HomeHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/HomeHandler.class new file mode 100644 index 0000000..6a602c9 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/HomeHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/LogoutHandler$LogoutTask.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/LogoutHandler$LogoutTask.class new file mode 100644 index 0000000..bd8ab01 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/LogoutHandler$LogoutTask.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/LogoutHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/LogoutHandler.class new file mode 100644 index 0000000..bc543a8 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/LogoutHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/SpawnTagHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/SpawnTagHandler.class new file mode 100644 index 0000000..234a23d Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/SpawnTagHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/StuckHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/StuckHandler$1.class new file mode 100644 index 0000000..bfcf5c8 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/StuckHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/StuckHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/StuckHandler.class new file mode 100644 index 0000000..2baef90 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/handlers/timers/StuckHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/OptionType.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/OptionType.class new file mode 100644 index 0000000..a280101 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/OptionType.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/StaffPlayerData.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/StaffPlayerData.class new file mode 100644 index 0000000..5a6e855 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/StaffPlayerData.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/commands/StaffModeCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/commands/StaffModeCommand.class new file mode 100644 index 0000000..a3a0e07 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/commands/StaffModeCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/commands/VanishCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/commands/VanishCommand.class new file mode 100644 index 0000000..29ab517 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/commands/VanishCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/StaffModeHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/StaffModeHandler$1.class new file mode 100644 index 0000000..729272f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/StaffModeHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/StaffModeHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/StaffModeHandler.class new file mode 100644 index 0000000..14f72d0 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/StaffModeHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/VanishHandler$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/VanishHandler$1.class new file mode 100644 index 0000000..f6ad912 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/VanishHandler$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/VanishHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/VanishHandler.class new file mode 100644 index 0000000..36e5d30 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/staff/handlers/VanishHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ActionMessage$AMText.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ActionMessage$AMText.class new file mode 100644 index 0000000..5ccbb39 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ActionMessage$AMText.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ActionMessage$ClickableType.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ActionMessage$ClickableType.class new file mode 100644 index 0000000..24cc1b3 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ActionMessage$ClickableType.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ActionMessage.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ActionMessage.class new file mode 100644 index 0000000..a0a1319 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ActionMessage.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/CacheCleanerThread.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/CacheCleanerThread.class new file mode 100644 index 0000000..d819feb Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/CacheCleanerThread.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ChunkPosition.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ChunkPosition.class new file mode 100644 index 0000000..cf38864 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/ChunkPosition.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/HCFUtils$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/HCFUtils$1.class new file mode 100644 index 0000000..28a342d Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/HCFUtils$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/HCFUtils.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/HCFUtils.class new file mode 100644 index 0000000..7702764 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/HCFUtils.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/Handler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/Handler.class new file mode 100644 index 0000000..8e808cc Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/Handler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/JavaUtils.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/JavaUtils.class new file mode 100644 index 0000000..e17d196 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/JavaUtils.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/MapSorting$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/MapSorting$1.class new file mode 100644 index 0000000..4d80279 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/MapSorting$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/MapSorting.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/MapSorting.class new file mode 100644 index 0000000..cb47610 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/MapSorting.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/PacketUtils.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/PacketUtils.class new file mode 100644 index 0000000..e655d7f Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/PacketUtils.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/ConfigFile.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/ConfigFile.class new file mode 100644 index 0000000..330d4b1 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/ConfigFile.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/LimitersFile.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/LimitersFile.class new file mode 100644 index 0000000..7610e13 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/LimitersFile.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/SchedulesFile.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/SchedulesFile.class new file mode 100644 index 0000000..d7b7bbb Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/SchedulesFile.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/UtilitiesFile.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/UtilitiesFile.class new file mode 100644 index 0000000..5bab727 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/file/UtilitiesFile.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/Redis$RedisCommand.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/Redis$RedisCommand.class new file mode 100644 index 0000000..fdb44ac Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/Redis$RedisCommand.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/Redis.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/Redis.class new file mode 100644 index 0000000..03d12b1 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/Redis.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/UUIDHandler.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/UUIDHandler.class new file mode 100644 index 0000000..76003b0 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/UUIDHandler.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/UUIDUtils$1.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/UUIDUtils$1.class new file mode 100644 index 0000000..cd1fe5b Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/UUIDUtils$1.class differ diff --git a/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/UUIDUtils.class b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/UUIDUtils.class new file mode 100644 index 0000000..0fa4017 Binary files /dev/null and b/HCF/out/production/HCFCore/secondlife/network/hcfactions/utilties/redis/UUIDUtils.class differ diff --git a/HCF/out/production/HCFCore/utilities.yml b/HCF/out/production/HCFCore/utilities.yml new file mode 100644 index 0000000..2137d42 --- /dev/null +++ b/HCF/out/production/HCFCore/utilities.yml @@ -0,0 +1,15 @@ +map-kit-items: '' +first-join-items: | + rO0ABXcEAAAAJHNyABpvcmcuYnVra2l0LnV0aWwuaW8uV3JhcHBlcvJQR+zxEm8FAgABTAADbWFw + dAAPTGphdmEvdXRpbC9NYXA7eHBzcgA1Y29tLmdvb2dsZS5jb21tb24uY29sbGVjdC5JbW11dGFi + bGVNYXAkU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAlsABGtleXN0ABNbTGphdmEvbGFuZy9PYmpl + Y3Q7WwAGdmFsdWVzcQB+AAR4cHVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAA + AAN0AAI9PXQABHR5cGV0AARtZXRhdXEAfgAGAAAAA3QAHm9yZy5idWtraXQuaW52ZW50b3J5Lkl0 + ZW1TdGFja3QAC0ZJU0hJTkdfUk9Ec3EAfgAAc3EAfgADdXEAfgAGAAAABHEAfgAIdAAJbWV0YS10 + eXBldAAMZGlzcGxheS1uYW1ldAAIZW5jaGFudHN1cQB+AAYAAAAEdAAISXRlbU1ldGF0AApVTlNQ + RUNJRklDdAAOwqdjRmlzaGluZyBSb2RzcQB+AAN1cQB+AAYAAAABdAAETFVSRXVxAH4ABgAAAAFz + cgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1i + ZXKGrJUdC5TgiwIAAHhwAAAAA3NxAH4AAHNxAH4AA3VxAH4ABgAAAARxAH4ACHEAfgAJdAAGYW1v + dW50cQB+AAp1cQB+AAYAAAAEcQB+AAx0AAtDT09LRURfQkVFRnNxAH4AHAAAACBzcQB+AABzcQB+ + AAN1cQB+AAYAAAADcQB+AAhxAH4AEXEAfgASdXEAfgAGAAAAA3EAfgAVcQB+ABZ0AAjCp2FTdGVh + a3BwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHA= \ No newline at end of file diff --git a/HCF/src/META-INF/MANIFEST.MF b/HCF/src/META-INF/MANIFEST.MF new file mode 100644 index 0000000..7427cc4 --- /dev/null +++ b/HCF/src/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: HCF + diff --git a/HCF/src/config.yml b/HCF/src/config.yml new file mode 100644 index 0000000..a4c0e9e --- /dev/null +++ b/HCF/src/config.yml @@ -0,0 +1,49 @@ +SERVERNAME: "Test" +SCOREBOARD: + TITLE: "&5&lSecondLife &d(Map 14)" +ECONOMY: + SIGN: + BUY_TEXT: + - "&a[Buy]" + - "%ITEM%" + - "%AMOUNT%" + - "$%PRICE%" + SELL_TEXT: + - "&c[Sell]" + - "%ITEM%" + - "%AMOUNT%" + - "$%PRICE%" +DEATH_SIGN: + SIGN: + - "&c%KILLED%" + - "&ewas slain by" + - "&a%KILLER%" + - "%TIME%" + ITEM_STACK: + NAME: "&aDeath Sign" + LORE: + - "&c%KILLED%" + - "&ewas slain by" + - "&a%KILLER%" + - "&d%TIME%" +kitmap: false +coords: +- '&7&m-----------------------------' +- ' &e&lImportant coordinates (x,z)' +- ' &7- &aSpawn&7: 0 , 0' +- ' &7- &3Towers Koth&7: 500 , 500' +- ' &7- &3Islands Koth&7: -500 , 500' +- ' &7- &3Moon Koth&7: 500 , -500' +- ' &7- &3End Koth&7: -80, 90 (End)' +- ' &7- &3&lConquest&7: -500 , -500' +- ' &7- &cEnd Portal&7: 700 , 700 (All quadrants)' +- '&7&m-----------------------------' +help: +- '&7&m-----------------------------' +- ' &7- &6/faction &7- Use to see all factions related commands.' +- ' &7- &6/koth &7- Use to see all koth related commands.' +- ' &7- &6/lives &7- Use to check your lives amount.' +- ' &7- &6/mapkit &7- Use to check this map kit.' +- ' &7- &6/coords &7- Use to see all important coordinates.' +- ' &7- &6/logout &7- Logout countdown for safe logout.' +- '&7&m-----------------------------' \ No newline at end of file diff --git a/HCF/src/factions.yml b/HCF/src/factions.yml new file mode 100644 index 0000000..1df0584 --- /dev/null +++ b/HCF/src/factions.yml @@ -0,0 +1 @@ +factions: \ No newline at end of file diff --git a/HCF/src/limiters.yml b/HCF/src/limiters.yml new file mode 100644 index 0000000..79fe08e --- /dev/null +++ b/HCF/src/limiters.yml @@ -0,0 +1,107 @@ +###################### INSTRUCTIONS ###################### +### Use -1 for no change ### +### Use 0 to disable enchantment ### +### Use other values to limit enchantment level ### +############################################################## +enchantment-limiter: + ARROW_DAMAGE: 4 + ARROW_FIRE: 0 + ARROW_INFINITE: -1 + ARROW_KNOCKBACK: 1 + DAMAGE_ALL: 1 + DAMAGE_ARTHROPODS: -1 + DAMAGE_UNDEAD: -1 + DIG_SPEED: -1 + DURABILITY: -1 + FIRE_ASPECT: 0 + KNOCKBACK: 1 + LOOT_BONUS_BLOCKS: -1 + LOOT_BONUS_MOBS: -1 + LUCK: -1 + LURE: -1 + OXYGEN: -1 + PROTECTION_ENVIRONMENTAL: 2 + PROTECTION_EXPLOSIONS: -1 + PROTECTION_FALL: -1 + PROTECTION_FIRE: -1 + PROTECTION_PROJECTILE: -1 + SILK_TOUCH: -1 + THORNS: 0 + WATER_WORKER: -1 + +###################### INSTRUCTIONS ###################### +### Use -1 for no change ### +### Use 0 to disable potion ### +### Use other values to limit potion level ### +### Change extended to false to disable extended potions ### +############################################################## +potion-limiter: + SPEED: + level: -1 + extended: true + SLOW: + level: 1 + extended: false + FAST_DIGGING: + level: -1 + extended: true + SLOW_DIGGING: + level: -1 + extended: true + INCREASE_DAMAGE: + level: 0 + extended: true + HEAL: + level: -1 + extended: true + HARM: + level: 0 + extended: true + JUMP: + level: -1 + extended: true + CONFUSION: + level: -1 + extended: true + REGENERATION: + level: 0 + extended: true + DAMAGE_RESISTANCE: + level: -1 + extended: true + FIRE_RESISTANCE: + level: -1 + extended: true + WATER_BREATHING: + level: -1 + extended: true + INVISIBILITY: + level: 0 + extended: true + BLINDNESS: + level: -1 + extended: true + NIGHT_VISION: + level: -1 + extended: true + HUNGER: + level: 0 + extended: true + WEAKNESS: + level: 0 + extended: true + POISON: + level: 1 + extended: false + WITHER: + level: -1 + extended: true + HEALTH_BOOST: + level: -1 + extended: true + ABSORPTION: + level: -1 + extended: true + SATURATION: + level: -1 + extended: true \ No newline at end of file diff --git a/HCF/src/plugin.yml b/HCF/src/plugin.yml new file mode 100644 index 0000000..65552bd --- /dev/null +++ b/HCF/src/plugin.yml @@ -0,0 +1,114 @@ +name: SecondLife +main: secondlife.network.hcfactions.HCF +version: 6.0 +description: SL HCF Core. +author: SecondLife Development Team +depend: [Vituz] +commands: + faction: + description: Faction Command + aliases: [f, fac, team, t] + master: + description: Master Command + ultimate: + description: Ultimate Command + ultra: + description: Ultra Command + balance: + description: Balance Command + aliases: [bal, eco, economy] + block: + description: Blcok Command + aliases: [cobble, filter, blocks, cobblestone] + bottle: + description: Bottle Command + chat: + description: ChatControl Command + aliases: [chatcontrol, chc] + chat: + description: ChatControl Command + aliases: [chatcontrol, chc] + chest: + description: Chest Command + aliases: [pv, playervault] + coords: + description: Coords Command + aliases: [coordinates] + crowbar: + description: Crowbar Command + deathban: + description: Deathban Command + aliases: [db, dban, deathb] + endportal: + description: EndPortal Command + aliases: [lightportal, lighportal] + eotw: + description: EOTW Command + event: + description: KoTH Command + aliases: [game, koth, conquest] + firstjoinitems: + description: FirstJoinItems Command + aliases: [fji] + focus: + description: Focus Command + glowstone: + description: Glowstone Command + aliases: [glow, glowmountain, mountain, glowstonemountain] + help: + description: Help Command + aliases: ["?"] + lastdeaths: + description: LastDeaths Command + aliases: [ldeaths, lastd] + logout: + description: Logout Command + mapkit: + description: MapKit Command + pay: + description: Pay Command + pvp: + description: PvP Command + aliases: [prot, timer, pvptimer, lives] + reclaim: + description: Reclaim Command + aliases: [claimlives, claimkeys] + regen: + description: Regen Command + savedata: + description: SaveData Command + aliases: [sd] + set: + description: Set Command + sotw: + description: SOTW Command + spawn: + description: Spawn Command + staff: + description: StaffMode Command + aliases: [mod, staffmode, modmode] + stats: + description: Stats Command + aliases: [status, ores] + sumo: + description: Sumo Command + tellcoords: + description: TellCoords Command + aliases: [tl] + togglelightning: + description: ToggleLightning Command + vanish: + description: Vanish Command + aliases: [v] + togglebroadcasts: + description: ToggleBroadcasts Command + aliases: [togglefd, tfd, fo, fd, foundore] + secondlife: + description: SecondLife Command + aliases: [core] + deathlookup: + description: Deathlookup Command + aliases: [dl, deathl, dlookup, deathlook, lookdeath] + lastinventory: + description: Lastinventory Command + aliases: [li, lastinv, lastinventory, restoreinv, restoreinventory, ri] \ No newline at end of file diff --git a/HCF/src/schedules.yml b/HCF/src/schedules.yml new file mode 100644 index 0000000..b307ffe --- /dev/null +++ b/HCF/src/schedules.yml @@ -0,0 +1,9 @@ +# Add more koths in the same day by adding a splitter '#' after each event + +schedule-monday: "6:00PM/Temple/15" +schedule-tuesday: "6:00PM/Temple/15" +schedule-wednesday: "6:00PM/Temple/15" +schedule-thursday: "6:00PM/Temple/15" +schedule-friday: "6:00PM/Temple/15" +schedule-saturday: "6:00PM/Temple/15" +schedule-sunday: "6:00PM/Temple/15" diff --git a/HCF/src/secondlife/network/hcfactions/HCF.java b/HCF/src/secondlife/network/hcfactions/HCF.java new file mode 100644 index 0000000..7f882ac --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/HCF.java @@ -0,0 +1,186 @@ +package secondlife.network.hcfactions; + +import club.minemen.spigot.ClubSpigot; +import lombok.Getter; +import net.minecraft.server.v1_8_R3.MinecraftServer; +import org.bukkit.Bukkit; +import org.bukkit.command.Command; +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.scheduler.BukkitRunnable; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.JedisPoolConfig; +import secondlife.network.hcfactions.classes.utils.ArmorClassHandler; +import secondlife.network.hcfactions.classes.utils.bard.EffectRestorerHandler; +import secondlife.network.hcfactions.commands.CommandHandler; +import secondlife.network.hcfactions.commands.arguments.event.*; +import secondlife.network.hcfactions.economy.EconomySignHandler; +import secondlife.network.hcfactions.elevators.SignElevatorHandler; +import secondlife.network.hcfactions.events.EventManager; +import secondlife.network.hcfactions.events.SpawnManager; +import secondlife.network.hcfactions.factions.claim.ClaimWandHandler; +import secondlife.network.hcfactions.factions.commands.SubCommandExecutor; +import secondlife.network.hcfactions.factions.handlers.ProtectionHandler; +import secondlife.network.hcfactions.factions.handlers.SignSubclaimHandler; +import secondlife.network.hcfactions.handlers.*; +import secondlife.network.hcfactions.staff.handlers.StaffModeHandler; +import secondlife.network.hcfactions.staff.handlers.VanishHandler; +import secondlife.network.hcfactions.stattrack.StatTrackerHandler; +import secondlife.network.hcfactions.timers.*; +import secondlife.network.hcfactions.utilties.Handler; +import secondlife.network.hcfactions.utilties.file.ConfigFile; +import secondlife.network.hcfactions.utilties.file.LimitersFile; +import secondlife.network.hcfactions.utilties.file.SchedulesFile; +import secondlife.network.hcfactions.utilties.file.UtilitiesFile; +import secondlife.network.hcfactions.utilties.redis.UUIDUtils; +import secondlife.network.vituz.Vituz; +import secondlife.network.vituz.providers.nametags.VituzNametag; +import secondlife.network.vituz.providers.scoreboard.VituzScoreboard; +import secondlife.network.vituz.providers.tab.VituzTab; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Msg; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +@Getter +public class HCF extends JavaPlugin { + + @Getter private static HCF instance; + + public static JedisPool redis; + + private secondlife.network.vituz.utilties.ConfigFile factions; + private EventManager eventManager; + private SpawnManager spawnManager; + + @Override + public void onEnable() { + instance = this; + + RegisterHandler.hook(); + + factions = new secondlife.network.vituz.utilties.ConfigFile(this, "factions.yml"); + + new ConfigFile(this); + new LimitersFile(this); + new UtilitiesFile(this); + new SchedulesFile(this); + + connectToRedis(); + registerHandlers(); + registerCommands(); + + UUIDUtils.hook(); + + eventManager = new EventManager(); + spawnManager = new SpawnManager(); + + VituzTab.setLayoutProvider(new TabLayoutHandler()); + VituzNametag.registerProvider(new NametagsHandler("", 16)); + VituzScoreboard.setConfiguration(ScoreboardLayoutHandler.create()); + + new BukkitRunnable() { + public void run() { + long l = System.currentTimeMillis(); + + Bukkit.broadcastMessage(Color.translate("&a&lSaving " + RegisterHandler.getInstancee().getFactionManager().getFactions().size() + " factions...")); + + RegisterHandler.getInstancee().getFactionManager().saveFactionData(); + + Bukkit.broadcastMessage(Color.translate("&a&lSaving took " + (System.currentTimeMillis() - l) + " ms!")); + } + }.runTaskTimerAsynchronously(this, 12000L, 12000L); + } + + @Override + public void onDisable() { + RegisterHandler.getInstancee().getFactionManager().saveFactionData(); + spawnManager.saveConfig(); + + Handler.disable(); + } + + private void registerHandlers() { + new HCFDataHandler(this); + new RegisterHandler(this); + new EffectRestorerHandler(this); + new HCFConfiguration(this); + new CommandHandler(this); + new SubCommandExecutor(this); + new GlassHandler(this); + + new ArmorClassHandler(this); + new ClaimWandHandler(this); + new ProtectionHandler(this); + new SignSubclaimHandler(this); + + ClubSpigot.INSTANCE.addMovementHandler(new CustomMovementHandler()); + + new ArcherHandler(this); + new AppleHandler(this); + new EnderpearlHandler(this); + new GappleHandler(this); + new LogoutHandler(this); + new ClassWarmupHandler(this); + new HomeHandler(this); + new SpawnTagHandler(this); + new GameHandler(this); + new StuckHandler(this); + + new OnlineDonatorsHandler(this); + new PearlFixHandler(this); + new SignElevatorHandler(this); + new BorderHandler(this); + new ChatHandler(this); + new CombatLoggerHandler(this); + new DeathMessagesHandler(this); + new DynamicPlayerHandler(this); + if(HCFConfiguration.kitMap) new ThrowableCobwebHandler(this); + new EventSignHandler(this); + new FurnaceSpeedHandler(this); + new StatTrackerHandler(this); + if(HCFConfiguration.kitMap) new KillStreakHandler(this); + if(HCFConfiguration.kitMap) new KitMapHandler(this); + if(HCFConfiguration.kitMap) new KitSignHandler(this); + new MapKitHandler(this); + new ShopHandler(this); + new EconomySignHandler(this); + new StaffModeHandler(this); + new VanishHandler(this); + } + + public void connectToRedis() { + try { + if(Vituz.getInstance().getConfig().getBoolean("DATABASE.AUTHENTICATION.ENABLED")) { + redis = new JedisPool(new JedisPoolConfig(), Vituz.getInstance().getDatabaseManager().getDedihost(), 6379, 20_000, Vituz.getInstance().getConfig().getString("DATABASE.AUTHENTICATION.PASSWORD"), 0, null); + } else { + redis = new JedisPool(new JedisPoolConfig(), Vituz.getInstance().getDatabaseManager().getDedihost(), 6379, 20_000); + } + } catch(Exception e) { + redis = null; + + e.printStackTrace(); + + Msg.logConsole("&4&l*** &c&lCouldn't connect to a Redis instance at " + Vituz.getInstance().getDatabaseManager().getDedihost() + "&c!"); + } + } + + private void registerCommands() { + Arrays.asList( + new JoinEventCommand(), + new LeaveEventCommand(), + new HostCommand(), + new EventManagerCommand(), + new SpawnsCommand() + ).forEach(command -> registerCommand(command, command.getName())); + } + + public void registerCommand(Command command, String name) { + Map commands = new HashMap<>(); + commands.put(name, command); + for (Map.Entry entry : commands.entrySet()) { + MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "SecondLife", entry.getValue()); + } + } +} \ No newline at end of file diff --git a/HCF/src/secondlife/network/hcfactions/HCFConfiguration.java b/HCF/src/secondlife/network/hcfactions/HCFConfiguration.java new file mode 100644 index 0000000..9e400c6 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/HCFConfiguration.java @@ -0,0 +1,108 @@ +package secondlife.network.hcfactions; + +import java.util.EnumMap; +import java.util.Map; + +import org.apache.commons.lang.time.DurationFormatUtils; +import org.bukkit.ChatColor; +import org.bukkit.World; + +import secondlife.network.hcfactions.utilties.Handler; +import secondlife.network.hcfactions.utilties.file.ConfigFile; + +public class HCFConfiguration extends Handler { + + public static int subclaimNameMinCharacters; + public static int subclaimNameMaxCharacters; + public static int factionNameMinCharacters; + public static int factionNameMaxCharacters; + public static int maxMembers; + public static int roadMinHeight; + public static int roadMaxHeight; + public static int maxAllysPerFaction; + public static int maxClaimsPerFaction; + public static int conquestDeathLoss; + public static int conquestWinPoints; + public static int warzoneRadius; + public static int citadelResetTime; + + public static ChatColor teammateColor; + public static ChatColor allyColor; + public static ChatColor captainColor; + public static ChatColor enemyColor; + public static ChatColor spawnColor; + public static ChatColor roadColor; + public static ChatColor warzoneColor; + public static ChatColor wildernessColor; + + public static boolean kitMap; + public static boolean disableObsidianGenerators; + public static boolean allowClaimingOnRoads; + + public static double dtrIncrementBetweenUpdate; + public static double maxDtr; + + public static String dtrWordsBetweenUpdate; + + public static long dtrUpdate; + + public static Map bordersizes = new EnumMap<>(World.Environment.class); + + public HCFConfiguration(HCF plugin) { + super(plugin); + + kitMap = ConfigFile.configuration.getBoolean("kitmap"); + + if(kitMap) { + bordersizes.put(World.Environment.NORMAL, 2500); + bordersizes.put(World.Environment.NETHER, 50); + bordersizes.put(World.Environment.THE_END, 1000); + + warzoneRadius = 200; + maxMembers = 30; + maxClaimsPerFaction = 2; + dtrWordsBetweenUpdate = DurationFormatUtils.formatDurationWords(1, true, true); + dtrUpdate = 1; + dtrIncrementBetweenUpdate = 1; + maxDtr = 6.0; + } else { + bordersizes.put(World.Environment.NORMAL, 3000); + bordersizes.put(World.Environment.NETHER, 1000); + bordersizes.put(World.Environment.THE_END, 1000); + + citadelResetTime = 17; + warzoneRadius = 1000; + maxMembers = 5; + maxClaimsPerFaction = 8; + dtrWordsBetweenUpdate = DurationFormatUtils.formatDurationWords(45000, true, true); + dtrUpdate = 45000; + dtrIncrementBetweenUpdate = 0.1; + maxDtr = 4.0; + } + + subclaimNameMinCharacters = 3; + subclaimNameMaxCharacters = 16; + factionNameMinCharacters = 3; + factionNameMaxCharacters = 16; + + roadMinHeight = 0; + roadMaxHeight = 256; + + conquestDeathLoss = 20; + conquestWinPoints = 300; + + maxAllysPerFaction = 0; + + teammateColor = ChatColor.DARK_GREEN; + allyColor = ChatColor.LIGHT_PURPLE; + captainColor = ChatColor.LIGHT_PURPLE; + enemyColor = ChatColor.YELLOW; + spawnColor = ChatColor.GREEN; + roadColor = ChatColor.RED; + warzoneColor = ChatColor.RED; + wildernessColor = ChatColor.GRAY; + + allowClaimingOnRoads = false; + disableObsidianGenerators = false; + } +} diff --git a/HCF/src/secondlife/network/hcfactions/classes/Archer.java b/HCF/src/secondlife/network/hcfactions/classes/Archer.java new file mode 100644 index 0000000..fa94734 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/Archer.java @@ -0,0 +1,204 @@ +package secondlife.network.hcfactions.classes; + +import gnu.trove.map.TObjectLongMap; +import gnu.trove.map.hash.TObjectLongHashMap; +import org.apache.commons.lang.time.DurationFormatUtils; +import org.bukkit.Bukkit; +import org.bukkit.Material; +import org.bukkit.entity.Arrow; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import org.bukkit.projectiles.ProjectileSource; +import secondlife.network.hcfactions.HCFConfiguration; +import secondlife.network.hcfactions.classes.utils.ArmorClass; +import secondlife.network.hcfactions.classes.utils.ArmorClassHandler; +import secondlife.network.hcfactions.classes.utils.bard.EffectRestorerHandler; +import secondlife.network.hcfactions.timers.ArcherHandler.TaggedTask; +import secondlife.network.vituz.providers.nametags.VituzNametag; +import secondlife.network.vituz.utilties.Color; + +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +public class Archer extends ArmorClass implements Listener { + + public static TObjectLongMap speed_cooldowns = new TObjectLongHashMap<>(); + public static TObjectLongMap jump_cooldowns = new TObjectLongHashMap<>(); + + public static PotionEffect speed_effect = new PotionEffect(PotionEffectType.SPEED, 160, 3); + public static PotionEffect jump_effect = new PotionEffect(PotionEffectType.JUMP, 160, 7); + + public static long speed_cooldown_delay = TimeUnit.SECONDS.toMillis(45L); + public static long jump_cooldown_delay = TimeUnit.MINUTES.toMillis(1L); + + public Archer() { + super("Archer", !HCFConfiguration.kitMap ? 3 : 1); + + passiveEffects.add(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1)); + passiveEffects.add(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 2)); + } + + @EventHandler(priority = EventPriority.MONITOR) + public void onEntityDamage(EntityDamageByEntityEvent event) { + if(event.isCancelled()) return; + + if(!(event.getEntity() instanceof Player)) return; + if(!(event.getDamager() instanceof Arrow)) return; + + Arrow arrow = (Arrow) event.getDamager(); + ProjectileSource source = arrow.getShooter(); + + if(!(source instanceof Player)) return; + + Player damaged = (Player) event.getEntity(); + Player shooter = (Player) source; + + ArmorClass equipped = ArmorClassHandler.getEquippedClass(shooter); + + if((equipped == null) || (!equipped.equals(this))) return; + + if((ArmorClassHandler.getEquippedClass(damaged) != null) && (ArmorClassHandler.getEquippedClass(damaged).equals(this))) return; + + new TaggedTask(damaged); + + double distance = shooter.getLocation().distance(damaged.getLocation()); + + shooter.sendMessage(Color.translate("&e[&9Arrow Range &e(&c" + String.format("%.1f", Double.valueOf(distance)) + "&e)] " + "&6Marked " + damaged.getName() + " &6for 10 seconds.")); + damaged.sendMessage(Color.translate("&eYou were &dArcher Tagged &eby &d" + shooter.getName() + " &efrom &d" + String.format("%.1f", Double.valueOf(distance)) + " &eblocks away!")); + + for(Player player : Bukkit.getOnlinePlayers()) { + VituzNametag.reloadPlayer(player); + VituzNametag.reloadOthersFor(player); + } + } + + @EventHandler + public void onSpeed(PlayerInteractEvent event) { + Player player = event.getPlayer(); + + if(((event.getAction() == Action.RIGHT_CLICK_AIR) || (event.getAction() == Action.RIGHT_CLICK_BLOCK))) { + if(!event.hasItem()) return; + + if(event.getItem().getType() == Material.SUGAR) { + if(ArmorClassHandler.getEquippedClass(event.getPlayer()) != this) return; + + long remaining = speed_cooldowns.get(player.getUniqueId()) == speed_cooldowns.getNoEntryValue() ? -1L : speed_cooldowns.get(player.getUniqueId()) - System.currentTimeMillis(); + + if(remaining > 0L) { + player.sendMessage(Color.translate("&cYou can't use this for another &l" + DurationFormatUtils.formatDurationWords(remaining, true, true) + "&c!")); + } else { + ItemStack stack = player.getItemInHand(); + + if(stack.getAmount() == 1) { + player.setItemInHand(new ItemStack(Material.AIR, 1)); + } else { + stack.setAmount(stack.getAmount() - 1); + } + + EffectRestorerHandler.setRestoreEffect(player, speed_effect); + + + speed_cooldowns.put(event.getPlayer().getUniqueId(), System.currentTimeMillis() + speed_cooldown_delay); + } + } + } + } + + @EventHandler + public void onJump(PlayerInteractEvent event) { + Player player = event.getPlayer(); + + if(((event.getAction() == Action.RIGHT_CLICK_AIR) || (event.getAction() == Action.RIGHT_CLICK_BLOCK))) { + if(!event.hasItem()) return; + + if(event.getItem().getType() == Material.FEATHER) { + if(ArmorClassHandler.getEquippedClass(event.getPlayer()) != this) return; + + long remaining = jump_cooldowns.get(player.getUniqueId()) == jump_cooldowns.getNoEntryValue() ? -1L : jump_cooldowns.get(player.getUniqueId()) - System.currentTimeMillis(); + + if(remaining > 0L) { + player.sendMessage(Color.translate("&cYou can't use this for another &l" + DurationFormatUtils.formatDurationWords(remaining, true, true) + "&c!")); + } else { + ItemStack stack = player.getItemInHand(); + + if(stack.getAmount() == 1) { + player.setItemInHand(new ItemStack(Material.AIR, 1)); + } else { + stack.setAmount(stack.getAmount() - 1); + } + + EffectRestorerHandler.setRestoreEffect(player, jump_effect); + + jump_cooldowns.put(event.getPlayer().getUniqueId(), System.currentTimeMillis() + jump_cooldown_delay); + } + } + } + } + + + @Override + public boolean isApplicableFor(Player player) { + ItemStack helmet = player.getInventory().getHelmet(); + if((helmet == null) || (helmet.getType() != Material.LEATHER_HELMET)) return false; + + ItemStack chestplate = player.getInventory().getChestplate(); + if((chestplate == null) || (chestplate.getType() != Material.LEATHER_CHESTPLATE)) return false; + + ItemStack leggings = player.getInventory().getLeggings(); + if((leggings == null) || (leggings.getType() != Material.LEATHER_LEGGINGS)) return false; + + ItemStack boots = player.getInventory().getBoots(); + return (boots != null) && (boots.getType() == Material.LEATHER_BOOTS); + } + + // Backup + /*LeatherArmorMeta helmMeta = (LeatherArmorMeta) shooter.getInventory().getHelmet().getItemMeta(); + LeatherArmorMeta chestMeta = (LeatherArmorMeta) shooter.getInventory().getChestplate().getItemMeta(); + LeatherArmorMeta leggingsMeta = (LeatherArmorMeta) shooter.getInventory().getLeggings().getItemMeta(); + LeatherArmorMeta bootsMeta = (LeatherArmorMeta) shooter.getInventory().getBoots().getItemMeta(); + + org.bukkit.Color green = org.bukkit.Color.fromRGB(6717235); + + double r = random.nextDouble(); + + r = random.nextDouble(); + + if((r <= 0.5D) && (helmMeta.getColor().equals(green)) && (chestMeta.getColor().equals(green)) && (leggingsMeta.getColor().equals(green)) && (bootsMeta.getColor().equals(green))) { + damaged.addPotionEffect(new PotionEffect(PotionEffectType.POISON, 120, 0)); + + shooter.sendMessage(Color.translate("&eSince your &dArmor &eis green, you gave &d" + damaged.getName() + " ðe poison effect for 6 seconds...")); + damaged.sendMessage(Color.translate("&eSince &d" + shooter.getName() + "'s &earmor is green, you were given the poison effect for 6 seconds...")); + } + + org.bukkit.Color blue = org.bukkit.Color.fromRGB(3361970); + if((r <= 0.5D) && (helmMeta.getColor().equals(blue)) && (chestMeta.getColor().equals(blue)) && (leggingsMeta.getColor().equals(blue)) && (bootsMeta.getColor().equals(blue))) { + damaged.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 120, 0)); + + shooter.sendMessage(Color.translate("&eSince your &dArmor &eis blue, you gave &d" + damaged.getName() + " ðe slowness effect for 6 seconds...")); + damaged.sendMessage(Color.translate("&eSince &d" + shooter.getName() + "'s &earmor is blue, you were given the slowness effect for 6 seconds...")); + } + + org.bukkit.Color gray = org.bukkit.Color.fromRGB(5000268); + if((r <= 0.5D) && (helmMeta.getColor().equals(gray)) && (chestMeta.getColor().equals(gray)) && (leggingsMeta.getColor().equals(gray)) && (bootsMeta.getColor().equals(gray))) { + damaged.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 120, 0)); + + shooter.sendMessage(Color.translate("&eSince your &dArmor &eis gray, you gave &d" + damaged.getName() + " ðe blindness effect for 6 seconds...")); + damaged.sendMessage(Color.translate("&eSince &d" + shooter.getName() + "'s &earmor is gray, you were given the blindness effect for 6 seconds...")); + } + + org.bukkit.Color black = org.bukkit.Color.fromRGB(1644825); + if((r <= 0.2D) && (helmMeta.getColor().equals(black)) && (chestMeta.getColor().equals(black)) && (leggingsMeta.getColor().equals(black)) && (bootsMeta.getColor().equals(black))) { + damaged.addPotionEffect(new PotionEffect(PotionEffectType.WITHER, 120, 0)); + + shooter.sendMessage(Color.translate("&eSince your &dArmor &eis black, you gave &d" + damaged.getName() + " ðe wither effect for 6 seconds...")); + damaged.sendMessage(Color.translate("&eSince &d" + shooter.getName() + "'s &earmor is black, you were given the wither effect for 6 seconds...")); + }*/ +} \ No newline at end of file diff --git a/HCF/src/secondlife/network/hcfactions/classes/Bard.java b/HCF/src/secondlife/network/hcfactions/classes/Bard.java new file mode 100644 index 0000000..71af28b --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/Bard.java @@ -0,0 +1,299 @@ +package secondlife.network.hcfactions.classes; + +import gnu.trove.map.TObjectLongMap; +import gnu.trove.map.hash.TObjectLongHashMap; +import org.bukkit.Material; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.Event; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.event.player.PlayerItemHeldEvent; +import org.bukkit.event.player.PlayerQuitEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import org.bukkit.scheduler.BukkitRunnable; +import secondlife.network.hcfactions.HCFConfiguration; +import secondlife.network.hcfactions.HCF; +import secondlife.network.hcfactions.classes.utils.ArmorClass; +import secondlife.network.hcfactions.classes.utils.ArmorClassHandler; +import secondlife.network.hcfactions.classes.utils.bard.BardData; +import secondlife.network.hcfactions.classes.utils.bard.EffectData; +import secondlife.network.hcfactions.classes.utils.bard.EffectRestorerHandler; +import secondlife.network.hcfactions.factions.Faction; +import secondlife.network.hcfactions.factions.type.PlayerFaction; +import secondlife.network.hcfactions.handlers.RegisterHandler; +import secondlife.network.hcfactions.timers.SpawnTagHandler; +import secondlife.network.vituz.utilties.Color; + +import java.util.*; +import java.util.concurrent.TimeUnit; + +public class Bard extends ArmorClass implements Listener { + + public static long buff_cooldown = TimeUnit.SECONDS.toMillis(10L); + public static int team_radius = 25; + public static long held_reapply_ticks = 20L; + public static Map bardDataMap = new HashMap<>(); + public static Map bardEffects = new EnumMap<>(Material.class); + public static TObjectLongMap cooldowns = new TObjectLongHashMap<>(); + + public Bard() { + super("Bard", !HCFConfiguration.kitMap ? 3 : 1); + + passiveEffects.add(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1)); + passiveEffects.add(new PotionEffect(PotionEffectType.REGENERATION, Integer.MAX_VALUE, 0)); + passiveEffects.add(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 1)); + + bardEffects.put(Material.FERMENTED_SPIDER_EYE, new EffectData(60, new PotionEffect(PotionEffectType.INVISIBILITY, 120, 1),new PotionEffect(PotionEffectType.INVISIBILITY, 100, 0))); + bardEffects.put(Material.WHEAT, new EffectData(35, new PotionEffect(PotionEffectType.SATURATION, 120, 1), new PotionEffect(PotionEffectType.SATURATION, 100, 0))); + bardEffects.put(Material.SUGAR, new EffectData(25, new PotionEffect(PotionEffectType.SPEED, 120, 2), new PotionEffect(PotionEffectType.SPEED, 100, 1))); + bardEffects.put(Material.BLAZE_POWDER, new EffectData(50, new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 120, 1), new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 100, 0))); + bardEffects.put(Material.IRON_INGOT, new EffectData(35, new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 80, 2), new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 100, 0))); + bardEffects.put(Material.GHAST_TEAR, new EffectData(45, new PotionEffect(PotionEffectType.REGENERATION, 60, 2), new PotionEffect(PotionEffectType.REGENERATION, 100, 0))); + bardEffects.put(Material.FEATHER, new EffectData(30, new PotionEffect(PotionEffectType.JUMP, 120, 5), new PotionEffect(PotionEffectType.JUMP, 100, 0))); + bardEffects.put(Material.SPIDER_EYE, new EffectData(50, new PotionEffect(PotionEffectType.WITHER, 100, 1), null)); + bardEffects.put(Material.MAGMA_CREAM, new EffectData(10, new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 900, 0), new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 120, 0))); + } + + @Override + public boolean onEquip(Player player) { + if(!super.onEquip(player)) return false; + + BardData bardData = new BardData(); + + bardDataMap.put(player.getUniqueId(), bardData); + + bardData.startEnergyTracking(); + bardData.heldTask = new BukkitRunnable() { + int lastEnergy; + + public void run() { + ItemStack held = player.getItemInHand(); + + if(held != null) { + EffectData bardEffect = bardEffects.get(held.getType()); + + if(bardEffect == null) return; + + if(!RegisterHandler.getInstancee().getFactionManager().getFactionAt(player.getLocation()).isSafezone()) { + PlayerFaction playerFaction = RegisterHandler.getInstancee().getFactionManager().getPlayerFaction(player); + + if(playerFaction != null) { + Collection nearbyEntities = player.getNearbyEntities(team_radius, team_radius, team_radius); + + for(Entity nearby : nearbyEntities) { + if(nearby instanceof Player && !player.equals(nearby)) { + Player target = (Player) nearby; + + if(playerFaction.getMembers().containsKey(target.getName())) { + EffectRestorerHandler.setRestoreEffect(target, bardEffect.heldable); + } + } + } + } + } + } + + int energy = (int) getEnergy(player); + + if(energy != 0 && energy != lastEnergy && (energy % 10 == 0 || lastEnergy - energy - 1 > 0 || energy == bardData.max_energy)) { + lastEnergy = energy; + + player.sendMessage(Color.translate("&eBard Energy: &d" + energy)); + } + } + }.runTaskTimerAsynchronously(HCF.getInstance(), 0L, held_reapply_ticks); + + return true; + } + + @EventHandler + public void onPlayerInteract(PlayerInteractEvent event) { + if(!event.hasItem()) return; + + if(event.getAction() == Action.RIGHT_CLICK_AIR || (!event.isCancelled() && event.getAction() == Action.RIGHT_CLICK_BLOCK)) { + Player player = event.getPlayer(); + + ItemStack stack = event.getItem(); + EffectData bardEffect = Bard.bardEffects.get(stack.getType()); + + if(bardEffect == null || bardEffect.clickable == null) return; + + event.setUseItemInHand(Event.Result.DENY); + BardData bardData = Bard.bardDataMap.get(player.getUniqueId()); + + if(bardData != null) { + if(!this.canUseBardEffect(player, bardData, bardEffect, true)) { + return; + } + + if(stack.getAmount() > 1) { + stack.setAmount(stack.getAmount() - 1); + + SpawnTagHandler.applyBard(player); + } else { + player.setItemInHand(new ItemStack(Material.AIR, 1)); + } + if(bardEffect != null && !RegisterHandler.getInstancee().getFactionManager().getFactionAt(player.getLocation()).isSafezone()) { + PlayerFaction playerFaction = RegisterHandler.getInstancee().getFactionManager().getPlayerFaction(player); + + if(playerFaction != null && !bardEffect.clickable.getType().equals(PotionEffectType.WITHER)) { + Collection nearbyEntities = player.getNearbyEntities(25.0, 25.0, 25.0); + + for(Entity nearby : nearbyEntities) { + if(nearby instanceof Player && !player.equals(nearby)) { + Player target = (Player) nearby; + + if(!playerFaction.getMembers().containsKey(target.getName())) continue; + + EffectRestorerHandler.setRestoreEffect(target, bardEffect.clickable); + } + } + } else if (playerFaction != null && bardEffect.clickable.getType().equals(PotionEffectType.WITHER)) { + Collection nearbyEntities = player.getNearbyEntities(25.0, 25.0, 25.0); + + for(Entity nearby : nearbyEntities) { + if(nearby instanceof Player && !player.equals(nearby)) { + Player target = (Player) nearby; + + if(playerFaction.getMembers().containsKey(target.getName())) continue; + + SpawnTagHandler.applyBard(target); + + EffectRestorerHandler.setRestoreEffect(target, bardEffect.clickable); + } + } + } else if (bardEffect.clickable.getType().equals(PotionEffectType.WITHER)) { + Collection nearbyEntities = player.getNearbyEntities(25.0, 25.0, 25.0); + + for(Entity nearby : nearbyEntities) { + if(nearby instanceof Player && !player.equals(nearby)) { + Player target = (Player) nearby; + + EffectRestorerHandler.setRestoreEffect(target, bardEffect.clickable); + } + } + } + } + + EffectRestorerHandler.setRestoreEffect(player, bardEffect.clickable); + bardData.setBuffCooldown(buff_cooldown); + + this.setEnergy(player, this.getEnergy(player) - bardEffect.energyCost); + + player.sendMessage(Color.translate("&cYou have just used a &lBard Buff &cthat cost you &l" + bardEffect.energyCost + " &cof your Energy.")); + } + } + } + + @Override + public void onUnequip(Player player) { + super.onUnequip(player); + + clearBardData(player.getUniqueId()); + } + + private void clearBardData(UUID uuid) { + BardData bardData = bardDataMap.remove(uuid); + + if(bardData == null) return; + if(bardData.heldTask == null) return; + + bardData.heldTask.cancel(); + } + + @EventHandler + public void onPlayerQuit(PlayerQuitEvent event) { + clearBardData(event.getPlayer().getUniqueId()); + } + + @EventHandler + public void onItemHeld(PlayerItemHeldEvent event) { + Player player = event.getPlayer(); + ArmorClass equipped = ArmorClassHandler.getEquippedClass(player); + + if(equipped == null) return; + if(!equipped.equals(this)) return; + + long lastMessage = cooldowns.get(player.getUniqueId()); + long millis = System.currentTimeMillis(); + + if(lastMessage != cooldowns.getNoEntryValue() && lastMessage - millis > 0L) return; + } + + private boolean canUseBardEffect(Player player, BardData bardData, EffectData bardEffect, boolean sendFeedback) { + String errorFeedback = null; + double currentEnergy = bardData.getEnergy(); + + if(bardEffect.energyCost > currentEnergy) { + errorFeedback = Color.translate("&cYou do not have enough energy for this! You need &l" + bardEffect.energyCost + " &cenergy, but you only have &l" + currentEnergy + "&c!"); + } + + long remaining = bardData.getRemainingBuffDelay() / 1000; + + if(remaining > 0L) { + errorFeedback = Color.translate("&cYou can't use this for another &l" + remaining + " &cseconds."); + } + + Faction factionAt = RegisterHandler.getInstancee().getFactionManager().getFactionAt(player.getLocation()); + if(factionAt.isSafezone()) { + errorFeedback = Color.translate("&cYou can't use &lBard effects&c while you are in spawn."); + } + + if(sendFeedback && errorFeedback != null) player.sendMessage(errorFeedback); + + return errorFeedback == null; + } + + @Override + public boolean isApplicableFor(Player player) { + ItemStack helmet = player.getInventory().getHelmet(); + if(helmet == null || helmet.getType() != Material.GOLD_HELMET) return false; + + ItemStack chestplate = player.getInventory().getChestplate(); + if(chestplate == null || chestplate.getType() != Material.GOLD_CHESTPLATE) return false; + + ItemStack leggings = player.getInventory().getLeggings(); + if(leggings == null || leggings.getType() != Material.GOLD_LEGGINGS) return false; + + ItemStack boots = player.getInventory().getBoots(); + return !(boots == null || boots.getType() != Material.GOLD_BOOTS); + } + + public long getRemainingBuffDelay(Player player) { + synchronized(bardDataMap) { + BardData bardData = bardDataMap.get(player.getUniqueId()); + + return bardData == null ? 0L : bardData.getRemainingBuffDelay(); + } + } + + public double getEnergy(Player player) { + synchronized(bardDataMap) { + BardData bardData = bardDataMap.get(player.getUniqueId()); + + return bardData == null ? 0 : bardData.getEnergy(); + } + } + + public long getEnergyMillis(Player player) { + synchronized(bardDataMap) { + BardData bardData = bardDataMap.get(player.getUniqueId()); + + return bardData == null ? 0 : bardData.getEnergyMillis(); + } + } + + public double setEnergy(Player player, double energy) { + BardData bardData = bardDataMap.get(player.getUniqueId()); + + if(bardData == null) return 0.0; + + bardData.setEnergy(energy); + return bardData.getEnergy(); + } +} diff --git a/HCF/src/secondlife/network/hcfactions/classes/Miner.java b/HCF/src/secondlife/network/hcfactions/classes/Miner.java new file mode 100644 index 0000000..71020f5 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/Miner.java @@ -0,0 +1,42 @@ +package secondlife.network.hcfactions.classes; + +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.Listener; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import secondlife.network.hcfactions.HCFConfiguration; +import secondlife.network.hcfactions.classes.utils.ArmorClass; + +public class Miner extends ArmorClass implements Listener { + + public Miner() { + super("Miner", !HCFConfiguration.kitMap ? 3 : 1); + + passiveEffects.add(new PotionEffect(PotionEffectType.FAST_DIGGING, Integer.MAX_VALUE, 1)); + passiveEffects.add(new PotionEffect(PotionEffectType.NIGHT_VISION, Integer.MAX_VALUE, 0)); + passiveEffects.add(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 1)); + } + + @Override + public void onUnequip(Player player) { + super.onUnequip(player); + } + + @Override + public boolean isApplicableFor(Player player) { + ItemStack helmet = player.getInventory().getHelmet(); + + if(helmet == null || helmet.getType() != Material.IRON_HELMET) return false; + + ItemStack chestplate = player.getInventory().getChestplate(); + if(chestplate == null || chestplate.getType() != Material.IRON_CHESTPLATE) return false; + + ItemStack leggings = player.getInventory().getLeggings(); + if(leggings == null || leggings.getType() != Material.IRON_LEGGINGS) return false; + + ItemStack boots = player.getInventory().getBoots(); + return boots != null && boots.getType() == Material.IRON_BOOTS; + } +} diff --git a/HCF/src/secondlife/network/hcfactions/classes/Rogue.java b/HCF/src/secondlife/network/hcfactions/classes/Rogue.java new file mode 100644 index 0000000..7b35026 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/Rogue.java @@ -0,0 +1,217 @@ +package secondlife.network.hcfactions.classes; + +import gnu.trove.map.TObjectLongMap; +import gnu.trove.map.hash.TObjectLongHashMap; +import org.apache.commons.lang.time.DurationFormatUtils; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Damageable; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; +import org.bukkit.event.block.Action; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import secondlife.network.hcfactions.HCFConfiguration; +import secondlife.network.hcfactions.classes.utils.ArmorClass; +import secondlife.network.hcfactions.classes.utils.ArmorClassHandler; +import secondlife.network.hcfactions.classes.utils.bard.EffectRestorerHandler; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Tasks; + +import java.util.ArrayList; +import java.util.UUID; +import java.util.concurrent.TimeUnit; + +public class Rogue extends ArmorClass implements Listener { + + public static ArrayList cooldown = new ArrayList<>(); + + public static TObjectLongMap speed_cooldowns = new TObjectLongHashMap<>(); + public static TObjectLongMap jump_cooldowns = new TObjectLongHashMap(); + + public static PotionEffect speed_effect = new PotionEffect(PotionEffectType.SPEED, 160, 3); + public static PotionEffect jump_effect = new PotionEffect(PotionEffectType.JUMP, 160, 4); + + public static long speed_cooldown_delay = TimeUnit.SECONDS.toMillis(45L); + public static long jump_cooldown_delay = TimeUnit.MINUTES.toMillis(1L); + + public Rogue() { + super("Rogue", !HCFConfiguration.kitMap ? 3 : 1); + + passiveEffects.add(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 2)); + passiveEffects.add(new PotionEffect(PotionEffectType.JUMP, Integer.MAX_VALUE, 1)); + passiveEffects.add(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, Integer.MAX_VALUE, 1)); + } + + @EventHandler(priority = EventPriority.MONITOR) + public void onEntityDamageByEntity(EntityDamageByEntityEvent event) { + if(event.isCancelled()) return; + + if(!(event.getEntity() instanceof Player)) return; + if(!(event.getDamager() instanceof Player)) return; + + Entity entity = event.getEntity(); + Entity damager = event.getDamager(); + Player attacker = (Player) damager; + + if(ArmorClassHandler.getEquippedClass(attacker) != this) return; + + ItemStack stack = attacker.getItemInHand(); + + if(stack == null) return; + if(stack.getType() != Material.GOLD_SWORD) return; + if(!stack.getEnchantments().isEmpty()) return; + + Player player = (Player) entity; + + if(direction(attacker) != direction(player)) return; + + if(cooldown.contains(damager.getUniqueId())) { + ((Player) damager).sendMessage(Color.translate("&cYou are on cooldown!")); + return; + } + + Damageable damage = player; + + if(damage.getHealth() <= 0.0D) return; + + if(damage.getHealth() <= 6.0D) { + damage.damage(20.0D); + } else { + damage.setHealth(damage.getHealth() - 6.0D); + } + + player.sendMessage(Color.translate("&d" + attacker.getName() + " &ehas backstabbed you!")); + player.playSound(player.getLocation(), Sound.ITEM_BREAK, 1.0F, 1.0F); + + attacker.sendMessage(Color.translate("&eYou have backstabbed &d" + player.getName() + "&e!")); + + attacker.setItemInHand(new ItemStack(Material.AIR, 1)); + attacker.playSound(player.getLocation(), Sound.ITEM_BREAK, 1.0F, 1.0F); + + attacker.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 60, 1)); + + event.setCancelled(true); + + cooldown.add(damager.getUniqueId()); + + Tasks.runLater(() -> { + if(cooldown.contains(damager.getUniqueId())) cooldown.remove(damager.getUniqueId()); + }, 60L); + } + + @EventHandler + public void onSpeed(PlayerInteractEvent event) { + Player player = event.getPlayer(); + + if(((event.getAction() == Action.RIGHT_CLICK_AIR) || (event.getAction() == Action.RIGHT_CLICK_BLOCK))) { + if(!event.hasItem()) return; + + if(event.getItem().getType() == Material.SUGAR) { + if(ArmorClassHandler.getEquippedClass(event.getPlayer()) != this) return; + + long remaining = speed_cooldowns.get(player.getUniqueId()) == speed_cooldowns.getNoEntryValue() ? -1L : speed_cooldowns.get(player.getUniqueId()) - System.currentTimeMillis(); + + if(remaining > 0L) { + player.sendMessage(Color.translate("&cYou can't use this for another &l" + DurationFormatUtils.formatDurationWords(remaining, true, true) + "&c!")); + } else { + ItemStack stack = player.getItemInHand(); + + if(stack.getAmount() == 1) { + player.setItemInHand(new ItemStack(Material.AIR, 1)); + } else { + stack.setAmount(stack.getAmount() - 1); + } + + EffectRestorerHandler.setRestoreEffect(player, speed_effect); + + speed_cooldowns.put(event.getPlayer().getUniqueId(), System.currentTimeMillis() + speed_cooldown_delay); + } + } + } + } + + @EventHandler + public void onJump(PlayerInteractEvent event) { + Player player = event.getPlayer(); + + if(((event.getAction() == Action.RIGHT_CLICK_AIR) || (event.getAction() == Action.RIGHT_CLICK_BLOCK))) { + if(!event.hasItem()) return; + + if(event.getItem().getType() == Material.FEATHER) { + if(ArmorClassHandler.getEquippedClass(event.getPlayer()) != this) return; + + long remaining = jump_cooldowns.get(player.getUniqueId()) == jump_cooldowns.getNoEntryValue() ? -1L : jump_cooldowns.get(player.getUniqueId()) - System.currentTimeMillis(); + + if(remaining > 0L) { + player.sendMessage(Color.translate("&cYou can't use this for another &l" + DurationFormatUtils.formatDurationWords(remaining, true, true) + "&c!")); + } else { + ItemStack stack = player.getItemInHand(); + + if(stack.getAmount() == 1) { + player.setItemInHand(new ItemStack(Material.AIR, 1)); + } else { + stack.setAmount(stack.getAmount() - 1); + } + + EffectRestorerHandler.setRestoreEffect(player, jump_effect); + + jump_cooldowns.put(event.getPlayer().getUniqueId(), System.currentTimeMillis() + jump_cooldown_delay); + } + } + } + } + + @Override + public boolean isApplicableFor(Player player) { + ItemStack helmet = player.getInventory().getHelmet(); + if (helmet == null || helmet.getType() != Material.CHAINMAIL_HELMET) return false; + + + ItemStack chestplate = player.getInventory().getChestplate(); + if(chestplate == null || chestplate.getType() != Material.CHAINMAIL_CHESTPLATE) return false; + + ItemStack leggings = player.getInventory().getLeggings(); + if(leggings == null || leggings.getType() != Material.CHAINMAIL_LEGGINGS) return false; + + + ItemStack boots = player.getInventory().getBoots(); + return !(boots == null || boots.getType() != Material.CHAINMAIL_BOOTS); + } + + public Byte direction(Player player) { + double rotation = (player.getLocation().getYaw() - 90) % 360; + + if(rotation < 0) { + rotation += 360.0; + } + + if(0 <= rotation && rotation < 22.5) { + return 0xC; // S > E + } else if(22.5 <= rotation && rotation < 67.5) { + return 0xE; // SW > SE + } else if(67.5 <= rotation && rotation < 112.5) { + return 0x0; // W > E + } else if(112.5 <= rotation && rotation < 157.5) { + return 0x2; // NW > SW + } else if(157.5 <= rotation && rotation < 202.5) { + return 0x4; // N > W + } else if(202.5 <= rotation && rotation < 247.5) { + return 0x6; // NE > NW + } else if(247.5 <= rotation && rotation < 292.5) { + return 0x8; // E > N + } else if(292.5 <= rotation && rotation < 337.5) { + return 0xA; // SE > NE + } else if(337.5 <= rotation && rotation < 360.0) { + return 0xC; // S > E + } else { + return null; + } + } +} diff --git a/HCF/src/secondlife/network/hcfactions/classes/utils/ArmorClass.java b/HCF/src/secondlife/network/hcfactions/classes/utils/ArmorClass.java new file mode 100644 index 0000000..f210d6e --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/utils/ArmorClass.java @@ -0,0 +1,52 @@ +package secondlife.network.hcfactions.classes.utils; + +import lombok.Getter; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffect; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Msg; + +import java.util.HashSet; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +@Getter +public abstract class ArmorClass { + + public static long default_max_duration = TimeUnit.MINUTES.toMillis(8L); + + public Set passiveEffects = new HashSet<>(); + public String name; + public int warmupDelay; + + public ArmorClass(String name, int warmupDelay) { + this.name = name; + this.warmupDelay = warmupDelay; + } + + public boolean onEquip(Player player) { + for(PotionEffect effect : passiveEffects) { + player.addPotionEffect(effect, true); + } + + player.sendMessage(Color.translate("&eClass &d" + name + " &7" + Msg.KRUZIC + " &aEnabled&e!")); + return true; + } + + public void onUnequip(Player player) { + for(PotionEffect effect : passiveEffects) { + for(PotionEffect active : player.getActivePotionEffects()) { + if(active.getDuration() > default_max_duration && active.getType().equals(effect.getType()) && active.getAmplifier() == effect.getAmplifier()) { + if(player.isOnline()) { + player.removePotionEffect(effect.getType()); + break; + } + } + } + } + + player.sendMessage(Color.translate("&eClass &d" + name + " &7" + Msg.KRUZIC + " &cDisabled&e!")); + } + + public abstract boolean isApplicableFor(Player player); +} diff --git a/HCF/src/secondlife/network/hcfactions/classes/utils/ArmorClassHandler.java b/HCF/src/secondlife/network/hcfactions/classes/utils/ArmorClassHandler.java new file mode 100644 index 0000000..15473d8 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/utils/ArmorClassHandler.java @@ -0,0 +1,80 @@ +package secondlife.network.hcfactions.classes.utils; + +import org.bukkit.Bukkit; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.PlayerDeathEvent; +import secondlife.network.hcfactions.HCF; +import secondlife.network.hcfactions.classes.Archer; +import secondlife.network.hcfactions.classes.Bard; +import secondlife.network.hcfactions.classes.Miner; +import secondlife.network.hcfactions.classes.Rogue; +import secondlife.network.hcfactions.classes.utils.events.ArmorClassEquipEvent; +import secondlife.network.hcfactions.classes.utils.events.ArmorClassUnequipEvent; +import secondlife.network.hcfactions.utilties.Handler; + +import java.util.*; + +public class ArmorClassHandler extends Handler implements Listener { + + public static Map equippedClassMap = new HashMap<>(); + public static List classes = new ArrayList<>(); + + public ArmorClassHandler(HCF plugin) { + super(plugin); + + classes.add(new Archer()); + classes.add(new Bard()); + classes.add(new Miner()); + classes.add(new Rogue()); + + Bukkit.getPluginManager().registerEvents(this, this.getInstance()); + + for(ArmorClass armor : classes) { + if(armor instanceof Listener) { + Bukkit.getPluginManager().registerEvents((Listener) armor, plugin); + } + } + } + + public static void disable() { + classes.clear(); + equippedClassMap.clear(); + } + + @EventHandler + public void onPlayerDeath(PlayerDeathEvent event) { + setEquippedClass(event.getEntity(), null); + } + + public static Collection getClasses() { + return classes; + } + + public static ArmorClass getEquippedClass(Player player) { + synchronized(equippedClassMap) { + return equippedClassMap.get(player.getUniqueId()); + } + } + + public static boolean hasClassEquipped(Player player, ArmorClass armor) { + return getEquippedClass(player) == armor; + } + + public static void setEquippedClass(Player player, ArmorClass armor) { + if(armor == null) { + ArmorClass equipped = equippedClassMap.remove(player.getUniqueId()); + + if(equipped != null) { + equipped.onUnequip(player); + + Bukkit.getPluginManager().callEvent(new ArmorClassUnequipEvent(player, equipped)); + } + } else if(armor.onEquip(player) && armor != getEquippedClass(player)) { + equippedClassMap.put(player.getUniqueId(), armor); + + Bukkit.getPluginManager().callEvent(new ArmorClassEquipEvent(player, armor)); + } + } +} diff --git a/HCF/src/secondlife/network/hcfactions/classes/utils/bard/BardData.java b/HCF/src/secondlife/network/hcfactions/classes/utils/bard/BardData.java new file mode 100644 index 0000000..d801be2 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/utils/bard/BardData.java @@ -0,0 +1,43 @@ +package secondlife.network.hcfactions.classes.utils.bard; + +import org.bukkit.scheduler.BukkitTask; + +public class BardData { + + public double energy_per_millisecond = 1.0D; + public double max_energy = 100.0D; + + public long energyStart; + public long buffCooldown; + public long max_energy_millis = (long) (max_energy * 1000L); + + public BukkitTask heldTask; + + public void setBuffCooldown(long millis) { + buffCooldown = System.currentTimeMillis() + millis; + } + + public long getRemainingBuffDelay() { + return buffCooldown - System.currentTimeMillis(); + } + + public void startEnergyTracking() { + this.setEnergy(0); + } + + public long getEnergyMillis() { + if(energyStart == 0L) { + return 0L; + } + + return Math.min(max_energy_millis, (long) (energy_per_millisecond * (System.currentTimeMillis() - energyStart))); + } + + public double getEnergy() { + return Math.round(this.getEnergyMillis() / 100.0) / 10.0; + } + + public void setEnergy(double energy) { + energyStart = (long) (System.currentTimeMillis() - (1000L * energy)); + } +} diff --git a/HCF/src/secondlife/network/hcfactions/classes/utils/bard/EffectData.java b/HCF/src/secondlife/network/hcfactions/classes/utils/bard/EffectData.java new file mode 100644 index 0000000..e4d4db1 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/utils/bard/EffectData.java @@ -0,0 +1,22 @@ +package secondlife.network.hcfactions.classes.utils.bard; + +import org.bukkit.potion.PotionEffect; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class EffectData { + + public PotionEffect clickable; + public PotionEffect heldable; + + public int energyCost; + + public EffectData(int energyCost, PotionEffect clickable, PotionEffect heldable) { + this.energyCost = energyCost; + this.clickable = clickable; + this.heldable = heldable; + } +} diff --git a/HCF/src/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler.java b/HCF/src/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler.java new file mode 100644 index 0000000..f27bc79 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/utils/bard/EffectRestorerHandler.java @@ -0,0 +1,85 @@ +package secondlife.network.hcfactions.classes.utils.bard; + +import club.minemen.spigot.event.potion.PotionEffectExpireEvent; +import com.google.common.collect.HashBasedTable; +import com.google.common.collect.Table; +import org.bukkit.Bukkit; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; +import org.bukkit.scheduler.BukkitRunnable; +import secondlife.network.hcfactions.HCF; +import secondlife.network.hcfactions.classes.Bard; +import secondlife.network.hcfactions.classes.utils.events.ArmorClassUnequipEvent; +import secondlife.network.hcfactions.utilties.Handler; +import secondlife.network.vituz.utilties.Tasks; + +import java.util.Collection; +import java.util.UUID; + +public class EffectRestorerHandler extends Handler implements Listener { + + private static Table restores = HashBasedTable.create(); + + public EffectRestorerHandler(HCF plugin) { + super(plugin); + + Bukkit.getPluginManager().registerEvents(this, this.getInstance()); + } + + @EventHandler + public void onArmorClassUnequip(ArmorClassUnequipEvent event) { + restores.rowKeySet().remove(event.getPlayer().getUniqueId()); + } + + @EventHandler + public void onPotionEffectExpire(PotionEffectExpireEvent event) { + LivingEntity entity = event.getEntity(); + + if(!(entity instanceof Player)) return; + + Player player = (Player) entity; + + PotionEffect previous = (PotionEffect) restores.remove(player.getUniqueId(), event.getEffect().getType()); + + if(previous == null) return; + + event.setCancelled(true); + + new BukkitRunnable() { + public void run() { + player.addPotionEffect(previous, true); + } + }.runTask(this.getInstance()); + } + + public static void setRestoreEffect(Player player, PotionEffect effect) { + boolean shouldCancel = true; + + Collection activeList = player.getActivePotionEffects(); + for(PotionEffect active : activeList) { + if(!active.getType().equals(effect.getType())) continue; + + if(effect.getAmplifier() < active.getAmplifier()) { + return; + } else if(effect.getAmplifier() == active.getAmplifier()) { + if(effect.getDuration() < active.getDuration()) return; + } + + restores.put(player.getUniqueId(), active.getType(), active); + shouldCancel = false; + break; + } + + Tasks.run(() -> { + player.addPotionEffect(effect, true); + }); + if(shouldCancel && effect.getDuration() > Bard.held_reapply_ticks && effect.getDuration() < Bard.default_max_duration) { + restores.remove(player.getUniqueId(), effect.getType()); + } + + } +} diff --git a/HCF/src/secondlife/network/hcfactions/classes/utils/events/ArmorClassEquipEvent.java b/HCF/src/secondlife/network/hcfactions/classes/utils/events/ArmorClassEquipEvent.java new file mode 100644 index 0000000..53af02b --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/utils/events/ArmorClassEquipEvent.java @@ -0,0 +1,31 @@ +package secondlife.network.hcfactions.classes.utils.events; + +import org.bukkit.entity.Player; +import org.bukkit.event.HandlerList; +import org.bukkit.event.player.PlayerEvent; + +import lombok.Getter; +import secondlife.network.hcfactions.classes.utils.ArmorClass; + +@Getter +public class ArmorClassEquipEvent extends PlayerEvent { + + private static HandlerList handlers = new HandlerList(); + + private ArmorClass armorClass; + + public ArmorClassEquipEvent(Player player, ArmorClass armorClass) { + super(player); + + this.armorClass = armorClass; + } + + public static HandlerList getHandlerList() { + return handlers; + } + + @Override + public HandlerList getHandlers() { + return handlers; + } +} diff --git a/HCF/src/secondlife/network/hcfactions/classes/utils/events/ArmorClassUnequipEvent.java b/HCF/src/secondlife/network/hcfactions/classes/utils/events/ArmorClassUnequipEvent.java new file mode 100644 index 0000000..02095f4 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/classes/utils/events/ArmorClassUnequipEvent.java @@ -0,0 +1,31 @@ +package secondlife.network.hcfactions.classes.utils.events; + +import org.bukkit.entity.Player; +import org.bukkit.event.HandlerList; +import org.bukkit.event.player.PlayerEvent; + +import lombok.Getter; +import secondlife.network.hcfactions.classes.utils.ArmorClass; + +@Getter +public class ArmorClassUnequipEvent extends PlayerEvent { + + private static HandlerList handlers = new HandlerList(); + + private ArmorClass armorClass; + + public ArmorClassUnequipEvent(Player player, ArmorClass armorClass) { + super(player); + + this.armorClass = armorClass; + } + + public static HandlerList getHandlerList() { + return handlers; + } + + @Override + public HandlerList getHandlers() { + return handlers; + } +} diff --git a/HCF/src/secondlife/network/hcfactions/commands/BaseCommand.java b/HCF/src/secondlife/network/hcfactions/commands/BaseCommand.java new file mode 100644 index 0000000..ca085a3 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/commands/BaseCommand.java @@ -0,0 +1,29 @@ +package secondlife.network.hcfactions.commands; + +import org.bukkit.command.CommandSender; + +import lombok.Getter; +import secondlife.network.hcfactions.HCF; +import secondlife.network.hcfactions.utilties.Handler; + +@Getter +public abstract class BaseCommand { + + public HCF instance; + public Handler handler; + + public boolean forPlayerUseOnly; + public String command; + public String permission; + + public BaseCommand(HCF plugin) { + this.instance = plugin; + + this.command = ""; + this.permission = ""; + + this.forPlayerUseOnly = false; + } + + public abstract void execute(CommandSender sender, String[] args); +} diff --git a/HCF/src/secondlife/network/hcfactions/commands/CommandHandler.java b/HCF/src/secondlife/network/hcfactions/commands/CommandHandler.java new file mode 100644 index 0000000..7a46a33 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/commands/CommandHandler.java @@ -0,0 +1,75 @@ +package secondlife.network.hcfactions.commands; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; +import secondlife.network.hcfactions.HCFConfiguration; +import secondlife.network.hcfactions.HCF; +import secondlife.network.hcfactions.commands.arguments.*; +import secondlife.network.hcfactions.staff.commands.StaffModeCommand; +import secondlife.network.hcfactions.staff.commands.VanishCommand; +import secondlife.network.hcfactions.utilties.Handler; +import secondlife.network.vituz.utilties.Msg; + +import java.util.ArrayList; +import java.util.List; + +public class CommandHandler extends Handler implements CommandExecutor { + + private List commands; + + public CommandHandler(HCF plugin) { + super(plugin); + + this.commands = new ArrayList<>(); + + this.commands.add(new BalanceCommand(plugin)); + this.commands.add(new ChestCommand(plugin)); + this.commands.add(new CoordsCommand(plugin)); + if(!HCFConfiguration.kitMap) this.commands.add(new EOTWCommand(plugin)); + this.commands.add(new EventCommand(plugin)); + this.commands.add(new FirstJoinItemsCommand(plugin)); + this.commands.add(new FocusCommand(plugin)); + this.commands.add(new HelpCommand(plugin)); + this.commands.add(new LogoutCommand(plugin)); + if(!HCFConfiguration.kitMap) this.commands.add(new MapKitCommand(plugin)); + this.commands.add(new PayCommand(plugin)); + this.commands.add(new ReclaimCommand(plugin)); + if(!HCFConfiguration.kitMap) this.commands.add(new RegenCommand(plugin)); + this.commands.add(new SaveDataCommand(plugin)); + this.commands.add(new SetCommand(plugin)); + this.commands.add(new SpawnCommand(plugin)); + this.commands.add(new StaffModeCommand(plugin)); + this.commands.add(new StatsCommand(plugin)); + this.commands.add(new TellCoordsCommand(plugin)); + this.commands.add(new ToggleLightningCommand(plugin)); + this.commands.add(new VanishCommand(plugin)); + this.commands.add(new zSecondLifeCommand(plugin)); + + for(BaseCommand command : this.commands) { + this.getInstance().getCommand(command.getCommand()).setExecutor(this); + } + } + + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + for(BaseCommand baseCommand : this.commands) { + if(command.getName().equalsIgnoreCase(baseCommand.getCommand())) { + if(((sender instanceof ConsoleCommandSender)) && (baseCommand.isForPlayerUseOnly())) { + sender.sendMessage(Msg.NO_CONSOLE); + return true; + } + + if((!sender.hasPermission(baseCommand.getPermission())) && (!baseCommand.getPermission().equals(""))) { + sender.sendMessage(Msg.NO_PERMISSION); + return true; + } + + baseCommand.execute(sender, args); + return true; + } + } + + return true; + } +} diff --git a/HCF/src/secondlife/network/hcfactions/commands/arguments/BalanceCommand.java b/HCF/src/secondlife/network/hcfactions/commands/arguments/BalanceCommand.java new file mode 100644 index 0000000..6b74641 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/commands/arguments/BalanceCommand.java @@ -0,0 +1,71 @@ +package secondlife.network.hcfactions.commands.arguments; + +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import secondlife.network.hcfactions.HCF; +import secondlife.network.hcfactions.commands.BaseCommand; +import secondlife.network.hcfactions.data.HCFData; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Msg; +import secondlife.network.vituz.utilties.NumberUtils; +import secondlife.network.vituz.utilties.Permission; + +public class BalanceCommand extends BaseCommand { + + public BalanceCommand(HCF plugin) { + super(plugin); + + this.command = "balance"; + this.forPlayerUseOnly = true; + } + + @Override + public void execute(CommandSender sender, String[] args) { + Player player = (Player) sender; + + if(args.length == 0) { + HCFData data1 = HCFData.getByName(player.getName()); + + player.sendMessage(Color.translate("&eYour balance is &d$" + data1.getBalance() + "&e!")); + } else { + if(args.length == 1) { + Player target = Bukkit.getPlayer(args[0]); + + if(Msg.checkOffline(player, args[0])) return; + + HCFData data = HCFData.getByName(target.getName()); + + player.sendMessage(Color.translate("&eBalance of &d" + args[0] + " &eis &d$" + data.getBalance() + "&e!")); + } else if(args[0].equalsIgnoreCase("set") || args[0].equalsIgnoreCase("give") || args[0].equalsIgnoreCase("add")) { + if(!player.hasPermission(Permission.OP_PERMISSION)) { + player.sendMessage(Msg.NO_PERMISSION); + return; + } + + Player target = Bukkit.getPlayer(args[1]); + + if(Msg.checkOffline(player, args[1])) return; + + if(!NumberUtils.isInteger(args[2])) { + player.sendMessage(Color.translate("&cNumber must be integer!")); + return; + } + + int amount = Integer.parseInt(args[2]); + + if(amount > 100000) { + player.sendMessage(Color.translate("&cBalance limit is 100000!")); + return; + } + + HCFData data = HCFData.getByName(target.getName()); + + data.setBalance(data.getBalance() + amount); + + player.sendMessage(Color.translate("&eYou have set balance of &d" + args[1] + " &eto &d$" + data.getBalance() + "&e!")); + target.sendMessage(Color.translate("&eYour balance is now &d" + data.getBalance() + "&e!")); + } + } + } +} diff --git a/HCF/src/secondlife/network/hcfactions/commands/arguments/ChestCommand.java b/HCF/src/secondlife/network/hcfactions/commands/arguments/ChestCommand.java new file mode 100644 index 0000000..e1fed8b --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/commands/arguments/ChestCommand.java @@ -0,0 +1,46 @@ +package secondlife.network.hcfactions.commands.arguments; + +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import secondlife.network.hcfactions.HCFConfiguration; +import secondlife.network.hcfactions.HCF; +import secondlife.network.hcfactions.commands.BaseCommand; +import secondlife.network.hcfactions.data.HCFData; +import secondlife.network.hcfactions.handlers.RegisterHandler; +import secondlife.network.vituz.utilties.Color; + +public class ChestCommand extends BaseCommand { + + public ChestCommand(HCF plugin) { + super(plugin); + + this.command = "chest"; + this.forPlayerUseOnly = true; + } + + @Override + public void execute(CommandSender sender, String[] args) { + Player player = (Player) sender; + + if(args.length == 0) { + if(!HCFConfiguration.kitMap) { + player.sendMessage(Color.translate("&cThis command can only be used when kitmap is enabled!")); + return; + } + + if(HCFData.getByName(player.getName()).isEvent()) { + player.sendMessage(Color.translate("&cYou can't do this in your current state.")); + return; + } + + if(!RegisterHandler.getInstancee().getFactionManager().getFactionAt(player.getLocation()).isSafezone()) { + player.sendMessage(Color.translate("&cThis command can only be used in Safe-Zone claims!")); + return; + } + + player.openInventory(player.getEnderChest()); + } + } + +} diff --git a/HCF/src/secondlife/network/hcfactions/commands/arguments/CoordsCommand.java b/HCF/src/secondlife/network/hcfactions/commands/arguments/CoordsCommand.java new file mode 100644 index 0000000..8dbbb5d --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/commands/arguments/CoordsCommand.java @@ -0,0 +1,24 @@ +package secondlife.network.hcfactions.commands.arguments; + +import org.bukkit.command.CommandSender; + +import secondlife.network.hcfactions.HCF; +import secondlife.network.hcfactions.commands.BaseCommand; +import secondlife.network.hcfactions.utilties.file.ConfigFile; +import secondlife.network.vituz.utilties.Color; + +public class CoordsCommand extends BaseCommand { + + public CoordsCommand(HCF plugin) { + super(plugin); + + this.command = "coords"; + } + + @Override + public void execute(CommandSender sender, String[] args) { + for(String msg : ConfigFile.getStringList("coords")) { + sender.sendMessage(Color.translate(msg)); + } + } +} diff --git a/HCF/src/secondlife/network/hcfactions/commands/arguments/EOTWCommand.java b/HCF/src/secondlife/network/hcfactions/commands/arguments/EOTWCommand.java new file mode 100644 index 0000000..6f576a2 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/commands/arguments/EOTWCommand.java @@ -0,0 +1,119 @@ +package secondlife.network.hcfactions.commands.arguments; + +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.conversations.Conversable; +import org.bukkit.conversations.ConversationContext; +import org.bukkit.conversations.ConversationFactory; +import org.bukkit.conversations.Prompt; +import org.bukkit.conversations.StringPrompt; +import org.bukkit.entity.Player; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; + +import secondlife.network.hcfactions.HCF; +import secondlife.network.hcfactions.commands.BaseCommand; +import secondlife.network.hcfactions.factions.Faction; +import secondlife.network.hcfactions.factions.type.PlayerFaction; +import secondlife.network.hcfactions.game.events.eotw.EOTWHandler; +import secondlife.network.hcfactions.handlers.RegisterHandler; +import secondlife.network.hcfactions.staff.handlers.StaffModeHandler; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Msg; +import secondlife.network.vituz.utilties.StringUtils; + +public class EOTWCommand extends BaseCommand { + + private ConversationFactory factory; + public static boolean eotwffa = false; + + public EOTWCommand(HCF plugin) { + super(plugin); + + this.command = "eotw"; + this.forPlayerUseOnly = false; + + this.factory = new ConversationFactory(plugin).withFirstPrompt(new EotwPrompt()).withEscapeSequence("/no").withTimeout(10).withModality(false).withLocalEcho(true); + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(args.length == 0) { + if(!(sender instanceof ConsoleCommandSender)) { + sender.sendMessage(Msg.NO_PERMISSION); + return; + } + + Conversable conversable = (Conversable) sender; + conversable.beginConversation(factory.buildConversation(conversable)); + } else { + if(args[0].equalsIgnoreCase("ffa")) { + for(Player player : Bukkit.getOnlinePlayers()) { + if(StaffModeHandler.isInStaffMode(player)) return; + + for(Faction faction : RegisterHandler.getInstancee().getFactionManager().getFactions()) { + if(faction instanceof PlayerFaction) { + RegisterHandler.getInstancee().getFactionManager().removeFaction(faction, sender); + } + } + + Command.broadcastCommandMessage(Bukkit.getConsoleSender(), "All factions have been disbanded."); + + Bukkit.setWhitelist(true); + + player.setHealth(20); + player.setFoodLevel(20); + + player.removePotionEffect(PotionEffectType.SPEED); + player.removePotionEffect(PotionEffectType.INVISIBILITY); + player.removePotionEffect(PotionEffectType.FIRE_RESISTANCE); + player.removePotionEffect(PotionEffectType.INCREASE_DAMAGE); + + player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, Integer.MAX_VALUE, 1)); + player.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, Integer.MAX_VALUE, 0)); + player.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 0)); + + eotwffa = true; + + Command.broadcastCommandMessage(Bukkit.getConsoleSender(), "FFA players has recived potion effects."); + + Location loc = StringUtils.destringifyLocation(this.getInstance().getConfig().getString("World-Spawn.eotw-ffa")); + + player.teleport(loc); + } + } + + } + } + + private static class EotwPrompt extends StringPrompt { + @Override + public String getPromptText(ConversationContext context) { + return "Type Yes if you want to active EOTW Timer || Type No if you want to cancel this procces."; + } + + @Override + public Prompt acceptInput(ConversationContext context, String string) { + if(string.equalsIgnoreCase("yes")) { + boolean newStatus = !EOTWHandler.isEOTW(false); + + Conversable conversable = context.getForWhom(); + + if(conversable instanceof CommandSender) { + Command.broadcastCommandMessage((CommandSender) conversable, "has set EOTW mode to " + newStatus); + } else conversable.sendRawMessage(Color.translate("&7has set EOTW mode to " + newStatus)); + + EOTWHandler.setEOTW(newStatus); + } else if(string.equalsIgnoreCase("no")) { + context.getForWhom().sendRawMessage(Color.translate("&aSuccsesfuly canceled EOTW Timer procces.")); + } else { + context.getForWhom().sendRawMessage(Color.translate("&cEOTW Cancelled!")); + } + + return Prompt.END_OF_CONVERSATION; + } + } +} diff --git a/HCF/src/secondlife/network/hcfactions/commands/arguments/EventCommand.java b/HCF/src/secondlife/network/hcfactions/commands/arguments/EventCommand.java new file mode 100644 index 0000000..f8319c9 --- /dev/null +++ b/HCF/src/secondlife/network/hcfactions/commands/arguments/EventCommand.java @@ -0,0 +1,362 @@ +package secondlife.network.hcfactions.commands.arguments; + +import com.sk89q.worldedit.bukkit.WorldEditPlugin; +import com.sk89q.worldedit.bukkit.selections.Selection; +import org.apache.commons.lang.time.DurationFormatUtils; +import org.apache.commons.lang3.StringUtils; +import org.bukkit.Location; +import org.bukkit.World; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import secondlife.network.hcfactions.HCF; +import secondlife.network.hcfactions.commands.BaseCommand; +import secondlife.network.hcfactions.factions.Faction; +import secondlife.network.hcfactions.factions.FactionManager; +import secondlife.network.hcfactions.factions.claim.ClaimZone; +import secondlife.network.hcfactions.factions.type.games.CapturableFaction; +import secondlife.network.hcfactions.factions.type.games.EventFaction; +import secondlife.network.hcfactions.factions.utils.CaptureZone; +import secondlife.network.hcfactions.game.events.faction.KothFaction; +import secondlife.network.hcfactions.game.type.KothType; +import secondlife.network.hcfactions.handlers.RegisterHandler; +import secondlife.network.hcfactions.timers.GameHandler; +import secondlife.network.hcfactions.utilties.JavaUtils; +import secondlife.network.vituz.utilties.Color; +import secondlife.network.vituz.utilties.Msg; +import secondlife.network.vituz.utilties.Permission; +import secondlife.network.vituz.utilties.cuboid.Cuboid; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +public class EventCommand extends BaseCommand { + + public EventCommand(HCF plugin) { + super(plugin); + + this.command = "event"; + } + + @Override + public void execute(CommandSender sender, String[] args) { + if(sender instanceof Player) { + Player player = (Player) sender; + + if(player.hasPermission(Permission.OP_PERMISSION)) { + if(args.length == 0) { + this.sendUsage(player); + } else { + if(args[0].equalsIgnoreCase("create")) { + if(args.length == 1) { + player.sendMessage(Color.translate("&cYou must put Event Name!")); + return; + } + + if(args.length == 2) { + player.sendMessage(Color.translate("&cYou must put Event Type!")); + return; + } + + Faction faction = RegisterHandler.getInstancee().getFactionManager().getFaction(args[1]); + + if(faction != null) { + sender.sendMessage(Color.translate("&cThere is already a faction named " + args[1] + '.')); + return; + } + + String upperCase; + + switch(upperCase = args[2].toUpperCase()) { + case "KOTH": { + faction = new KothFaction(args[1], null); + break; + } + default: { + sendUsage(sender); + return; + } + } + + RegisterHandler.getInstancee().getFactionManager().createFaction(faction, sender); + + player.sendMessage(Color.translate("&aFaction of type &l" + args[2] + " &acreated with name &l" + args[1] + "&a.")); + } else if(args[0].equalsIgnoreCase("start")) { + if(args.length == 1) { + player.sendMessage(Color.translate("&cYou must put Event Name!")); + return; + } + + Faction faction = RegisterHandler.getInstancee().getFactionManager().getFaction(args[1]); + + if(!(faction instanceof EventFaction)) { + player.sendMessage(Color.translate("&cThere is no event named &l" + args[1] + "&c!")); + return; + } + + if(GameHandler.getGameHandler().tryContesting(((EventFaction) faction), sender)) { + player.sendMessage(Color.translate("&eYou have started &d" + faction.getName() + "&e!")); + } + } else if(args[0].equalsIgnoreCase("stop")) { + GameHandler.stopCooldown(); + + Msg.sendMessage("&d" + sender.getName() + " &ehas cancelled &d" + (GameHandler.getEventFaction() == null ? "the active event" : GameHandler.getEventFaction().getName() + "&e") + "&e!"); + GameHandler.getGameHandler().getActiveKoths().remove(GameHandler.getEventFaction()); + } else if(args[0].equalsIgnoreCase("claimfor")) { + if(args.length == 1) { + player.sendMessage(Color.translate("&cYou must put Event Name!")); + return; + } + + WorldEditPlugin worldEdit = RegisterHandler.getInstancee().getWorldEdit(); + + if(worldEdit == null) { + player.sendMessage(Color.translate("&cWorldEdit must be installed to set event claims.")); + return; + } + + Selection selection = worldEdit.getSelection(player); + + if(selection == null) { + player.sendMessage(Color.translate("&cYou must make a WorldEdit selection to do this.")); + return; + } + + if(selection.getWidth() < 5 || selection.getLength() < 5) { + player.sendMessage(Color.translate("&cEvent claim areas must be at least &l" + 5 + "&cx&l" + 5 + "&c!")); + return; + } + + Faction faction = RegisterHandler.getInstancee().getFactionManager().getFaction(args[1]); + + if(!(faction instanceof EventFaction)) { + player.sendMessage(Color.translate("&cThere is not an event faction named &l" + args[1] + "&c!")); + return; + } + + ((EventFaction) faction).setClaim(new Cuboid(selection.getMinimumPoint(), selection.getMaximumPoint()), player); + + player.sendMessage(Color.translate("&eYou have updated the claim for event &d" + faction.getName() + "&e!")); + } else if(args[0].equalsIgnoreCase("setcapzone")) { + if(args.length == 1) { + player.sendMessage(Color.translate("&cYou must put Event Name!")); + return; + } + + WorldEditPlugin worldEdit = RegisterHandler.getInstancee().getWorldEdit(); + + if(worldEdit == null) { + player.sendMessage(Color.translate("&cWorldEdit must be installed to set event claims.")); + return; + } + + Selection selection = worldEdit.getSelection(player); + + if(selection.getWidth() < CaptureZone.MINIMUM_SIZE_AREA || selection.getLength() < CaptureZone.MINIMUM_SIZE_AREA) { + player.sendMessage(Color.translate("&cCapzones must be at least &l" + 5 + "&cx&l" + 5 + "&c!")); + return; + } + + Faction faction = RegisterHandler.getInstancee().getFactionManager().getFaction(args[1]); + + if(!(faction instanceof CapturableFaction)) { + player.sendMessage(Color.translate("&cThere is not a capturable faction named &l" + args[1] + "&c!")); + return; + } + + CapturableFaction capturableFaction = (CapturableFaction) faction; + Collection claims = capturableFaction.getClaims(); + + if(claims.isEmpty()) { + player.sendMessage(Color.translate("&cCapture zones can only be inside the event claim!")); + return; + } + + ClaimZone claim = new ClaimZone(faction, selection.getMinimumPoint(), selection.getMaximumPoint()); + + World world = claim.getWorld(); + + int minimumX = claim.getMinimumX(); + int maximumX = claim.getMaximumX(); + + int minimumZ = claim.getMinimumZ(); + int maximumZ = claim.getMaximumZ(); + + FactionManager factionManager = RegisterHandler.getInstancee().getFactionManager(); + + for(int x = minimumX; x <= maximumX; x++) { + for(int z = minimumZ; z <= maximumZ; z++) { + Faction factionAt = factionManager.getFactionAt(world, x, z); + + if(factionAt != capturableFaction) { + player.sendMessage(Color.translate("&cCapture zones can only be inside the event claim!")); + return; + } + } + } + + CaptureZone captureZone; + + if (capturableFaction instanceof KothFaction) { + ((KothFaction) capturableFaction).setCaptureZone(captureZone = new CaptureZone(capturableFaction.getName(), claim, KothType.default_cap_millis)); + } else { + player.sendMessage(Color.translate("&cYou can only set capture zones for Conquest or KoTH factions.")); + return; + } + + player.sendMessage(Color.translate("&eYou have set capture zone &d" + captureZone.getDisplayName() + " &efor faction &d" + faction.getName() + "&e!")); + } else if(args[0].equalsIgnoreCase("tp")) { + if(args.length == 1) { + player.sendMessage(Color.translate("&cYou must put Event Name!")); + return; + } + + Faction faction = RegisterHandler.getInstancee().getFactionManager().getFaction(args[1]); + + if(!(faction instanceof KothFaction)) { + player.sendMessage(Color.translate("&cThere is no event named &l" + args[1] + "&c!")); + return; + } + + Location loc = ((KothFaction) faction).getCaptureZone().getCuboid().getCenter(); + + player.teleport(loc); + + player.sendMessage(Color.translate("&eYou have been teleported to &d" + args[1] + " &eevent!")); + } else if(args[0].equalsIgnoreCase("setcaptime")) { + if(args.length == 1) { + player.sendMessage(Color.translate("&cYou must put Event Name!")); + return; + } + + Faction faction = RegisterHandler.getInstancee().getFactionManager().getFaction(args[1]); + + if(faction == null || !(faction instanceof KothFaction)) { + player.sendMessage(Color.translate("&cThere is no a KoTH arena named &l" + args[1] + "&c!")); + return; + } + + long duration = JavaUtils.parse(StringUtils.join(args, ' ', 2, args.length)); + + if(duration == -1L) { + player.sendMessage(Color.translate("&cInvalid Duration.")); + return; + } + + KothFaction kothFaction = (KothFaction) faction; + CaptureZone captureZone = kothFaction.getCaptureZone(); + + if(captureZone == null) { + player.sendMessage(Color.translate("&c&l" + kothFaction.getDisplayName(sender) + " &cdoesn't have a capture zone set yet!")); + return; + } + + if(captureZone.isActive() && duration < captureZone.getRemainingCaptureMillis()) { + captureZone.setRemainingCaptureMillis(duration); + } + + captureZone.setDefaultCaptureMillis(duration); + player.sendMessage(Color.translate("&eYou have set the capture delay of KoTH arena &d" + kothFaction.getDisplayName(sender) + " &eto &d" + DurationFormatUtils.formatDurationWords(duration, true, true) + "&e!")); + } else if(args[0].equalsIgnoreCase("list")) { + List all = new ArrayList(); + + for(Faction faction : RegisterHandler.getInstancee().getFactionManager().getFactions()) { + if(faction instanceof KothFaction) { + all.add(faction.getName()); + } + } + + player.sendMessage(Color.translate("&eEvent List&7: &d" + all.toString().replace("[", "").replace("]", "").replace(",", "&e,&d"))); + } + + return; + } + } + } else { + if(args.length == 0) { + this.sendUsage(sender); + } else { + if(args[0].equalsIgnoreCase("create")) { + if(args.length == 1) { + sender.sendMessage(Color.translate("&cYou must put Event Name!")); + return; + } + + if(args.length == 2) { + sender.sendMessage(Color.translate("&cYou must put Event Type!")); + return; + } + + Faction faction = RegisterHandler.getInstancee().getFactionManager().getFaction(args[1]); + + if(faction != null) { + sender.sendMessage(Color.translate("&cThere is already a faction named " + args[1] + '.')); + return; + } + + String upperCase = args[2].toUpperCase(); + + switch(upperCase) { + case "KOTH": { + faction = new KothFaction(args[1], null); + break; + } + default: { + sendUsage(sender); + return; + } + } + + RegisterHandler.getInstancee().getFactionManager().createFaction(faction, sender); + + sender.sendMessage(Color.translate("&aFaction of type &l" + args[2] + " &acreated with name &l" + args[1] + "&a.")); + } else if(args[0].equalsIgnoreCase("start")) { + if(args.length == 1) { + sender.sendMessage(Color.translate("&cYou must put Event Name!")); + return; + } + + Faction faction = RegisterHandler.getInstancee().getFactionManager().getFaction(args[1]); + + if(!(faction instanceof EventFaction)) { + sender.sendMessage(Color.translate("&cThere is no event named &l" + args[1] + "&c!")); + return; + } + + if(GameHandler.getGameHandler().tryContesting(((EventFaction) faction), sender)) { + sender.sendMessage(Color.translate("&eYou have started &d" + faction.getName() + "&e!")); + GameHandler.getGameHandler().getActiveKoths().add((KothFaction) faction); + } + } else if(args[0].equalsIgnoreCase("stop")) { + Msg.sendMessage("*&d" + sender.getName() + " &ehas cancelled &d" + (GameHandler.getEventFaction() == null ? "the active event" : GameHandler.getEventFaction().getName() + "&e") + "&e!"); + GameHandler.getGameHandler().getActiveKoths().remove(GameHandler.getEventFaction()); + } else if(args[0].equalsIgnoreCase("list")) { + List all = new ArrayList<>(); + + for(Faction faction : RegisterHandler.getInstancee().getFactionManager().getFactions()) { + if(faction instanceof KothFaction) { + all.add(faction.getName()); + } + } + + sender.sendMessage(Color.translate("&eCurrent Events&7: &d" + all.toString().replace("[", "").replace("]", "").replace(",", "&e,&d"))); + } + } + } + } + + public void sendUsage(CommandSender sender) { + sender.sendMessage(Color.translate("&6&lEvent Help&7:")); + sender.sendMessage(Color.translate(" &e/event create &7- &dCreate an Event!")); + sender.sendMessage(Color.translate(" &e/event start &7- &dStart an Event!")); + sender.sendMessage(Color.translate(" &e/event stop &7- &dStop an active Event!")); + sender.sendMessage(Color.translate(" &e/event claimfor &7- &dClaim an Event!")); + sender.sendMessage(Color.translate(" &e/event setcapzone &7- &dSetCapZone of a Event!")); + sender.sendMessage(Color.translate(" &e/event tp &7- &dTeleport to the Event!")); + sender.sendMessage(Color.translate(" &e/event setcaptime