diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index 543245d92..782242049 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -2,29 +2,45 @@ package mineplex.hub; import me.chiss.Core.MemoryFix.MemoryFix; import mineplex.core.account.CoreClientManager; +import mineplex.core.blockrestore.BlockRestore; import mineplex.core.command.CommandCenter; import mineplex.core.creature.Creature; import mineplex.core.disguise.DisguiseManager; import mineplex.core.donation.DonationManager; +import mineplex.core.energy.Energy; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.message.MessageManager; +import mineplex.core.movement.Movement; import mineplex.core.npc.NpcManager; import mineplex.core.packethandler.PacketHandler; import mineplex.core.pet.PetManager; import mineplex.core.portal.Portal; +import mineplex.core.projectile.ProjectileManager; import mineplex.core.punish.Punish; import mineplex.core.recharge.Recharge; import mineplex.core.spawn.Spawn; import mineplex.core.teleport.Teleport; import mineplex.core.updater.Updater; import mineplex.hub.server.ServerManager; +import mineplex.minecraft.game.classcombat.Class.ClassManager; +import mineplex.minecraft.game.classcombat.Condition.SkillConditionManager; +import mineplex.minecraft.game.classcombat.Skill.SkillFactory; +import mineplex.minecraft.game.classcombat.shop.ClassCombatCustomBuildShop; +import mineplex.minecraft.game.classcombat.shop.ClassCombatPurchaseShop; +import mineplex.minecraft.game.classcombat.shop.ClassCombatShop; +import mineplex.minecraft.game.classcombat.shop.ClassShopManager; +import mineplex.minecraft.game.core.IRelation; +import mineplex.minecraft.game.core.combat.CombatManager; +import mineplex.minecraft.game.core.damage.DamageManager; +import mineplex.minecraft.game.core.fire.Fire; import nautilus.minecraft.core.INautilusPlugin; import org.bukkit.Server; +import org.bukkit.entity.Player; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; -public class Hub extends JavaPlugin implements INautilusPlugin +public class Hub extends JavaPlugin implements INautilusPlugin, IRelation { private String WEB_CONFIG = "webServer"; @@ -48,15 +64,32 @@ public class Hub extends JavaPlugin implements INautilusPlugin new Punish(this, GetWebServerAddress()); Creature creature = new Creature(this); new MessageManager(this, clientManager); - new NpcManager(this, creature); + NpcManager npcManager = new NpcManager(this, creature); new PetManager(this, clientManager, donationManager, creature, GetWebServerAddress()); //Main Modules - new HubManager(this, clientManager, donationManager, new DisguiseManager(this, new PacketHandler(this))); + PacketHandler packetHandler = new PacketHandler(this); + new HubManager(this, clientManager, donationManager, new DisguiseManager(this, packetHandler)); new Stacker(this); new ServerManager(this, clientManager, donationManager, new Portal(this)); new MemoryFix(this); - new Teleport(this, clientManager, new Spawn(this)); + + CombatManager combatManager = new CombatManager(this); + BlockRestore blockRestore = new BlockRestore(this); + ProjectileManager throwManager = new ProjectileManager(this); + SkillConditionManager conditionManager = new SkillConditionManager(this); + + DamageManager damage = new DamageManager(this, combatManager, npcManager, new DisguiseManager(this, packetHandler)); + Fire fire = new Fire(this, conditionManager, damage); + Teleport teleport = new Teleport(this, clientManager, new Spawn(this)); + + SkillFactory skillManager = new SkillFactory(this, damage, this, combatManager, conditionManager, throwManager, blockRestore, fire, new Movement(this), teleport, new Energy(this), GetWebServerAddress()); + ClassManager classManager = new ClassManager(this, clientManager, donationManager, skillManager, GetWebServerAddress()); + + ClassShopManager shopManager = new ClassShopManager(this, classManager, skillManager, null); + new ClassCombatShop(shopManager, clientManager, donationManager, "Select Class Here"); + new ClassCombatPurchaseShop(shopManager, clientManager, donationManager, "Skill Shop"); + new ClassCombatCustomBuildShop(shopManager, clientManager, donationManager, "Class Setup"); //Updates getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1); @@ -93,4 +126,22 @@ public class Hub extends JavaPlugin implements INautilusPlugin { return GetRealServer().getPluginManager(); } + + @Override + public boolean CanHurt(Player a, Player b) + { + return false; + } + + @Override + public boolean CanHurt(String a, String b) + { + return false; + } + + @Override + public boolean IsSafe(Player a) + { + return true; + } } diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index a25a1b790..4464b653d 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -103,7 +103,7 @@ public class HubManager extends MiniClientPlugin else if (((LivingEntity)entity).getCustomName().equalsIgnoreCase("chiss")) _disguiseManager.Disguise(new DisguisePlayer(entity, "Chiss")); else if (((LivingEntity)entity).getCustomName().equalsIgnoreCase("Sterling_")) - _disguiseManager.Disguise(new DisguisePlayer(entity, "Sterling_")); + _disguiseManager.Disguise(new DisguisePlayer(entity, "sterling_")); else if (((LivingEntity)entity).getCustomName().equalsIgnoreCase("Spu_")) _disguiseManager.Disguise(new DisguisePlayer(entity, "Spu_")); } diff --git a/Plugins/Nautilus.Game.Core/src/nautilus/game/core/GamePlugin.java b/Plugins/Nautilus.Game.Core/src/nautilus/game/core/GamePlugin.java index 6a6267a89..1909028f0 100644 --- a/Plugins/Nautilus.Game.Core/src/nautilus/game/core/GamePlugin.java +++ b/Plugins/Nautilus.Game.Core/src/nautilus/game/core/GamePlugin.java @@ -137,8 +137,8 @@ public abstract class GamePlugin extends JavaPlugin implements IRelation ClassShopManager shopManager = new ClassShopManager(this, ClassManager, SkillManager, null); new ClassCombatShop(shopManager, ClientManager, DonationManager, "Select Class Here"); - new ClassCombatPurchaseShop(shopManager, ClientManager, DonationManager, "Purchase Skills Here"); - new ClassCombatCustomBuildShop(shopManager, ClientManager, DonationManager, "Customize Builds Here"); + new ClassCombatPurchaseShop(shopManager, ClientManager, DonationManager, "Skill Shop"); + new ClassCombatCustomBuildShop(shopManager, ClientManager, DonationManager, "Class Setup"); } protected abstract String GetServerName();