Added castle stuff for hub

This commit is contained in:
LCastr0 2017-04-26 01:12:43 -03:00
parent d36b44e32d
commit 19138eb501
11 changed files with 348 additions and 62 deletions

View File

@ -231,7 +231,6 @@ public class UtilAlg
return true;
}
public static boolean inBoundingBox(Location loc, Vector cornerA, Vector cornerB)
{

View File

@ -167,7 +167,8 @@ import mineplex.core.gadget.gadgets.particle.ParticleChristmasTree;
import mineplex.core.gadget.gadgets.particle.ParticleCoalFumes;
import mineplex.core.gadget.gadgets.particle.ParticleFairy;
import mineplex.core.gadget.gadgets.particle.ParticleFireRings;
import mineplex.core.gadget.gadgets.particle.ParticleKing;
import mineplex.core.gadget.gadgets.particle.king.CastleManager;
import mineplex.core.gadget.gadgets.particle.king.ParticleKing;
import mineplex.core.gadget.gadgets.particle.ParticleLegend;
import mineplex.core.gadget.gadgets.particle.spring.ParticleSpringHalo;
import mineplex.core.gadget.gadgets.particle.ParticleWingsAngel;
@ -268,6 +269,7 @@ public class GadgetManager extends MiniPlugin
private final IncognitoManager _incognitoManager;
private TreasureManager _treasureManager;
private SoulManager _soulManager;
private CastleManager _castleManager;
private Map<GadgetType, List<Gadget>> _gadgets;
@ -287,7 +289,7 @@ public class GadgetManager extends MiniPlugin
public GadgetManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, InventoryManager inventoryManager,
MountManager mountManager, PetManager petManager, PreferencesManager preferencesManager,
DisguiseManager disguiseManager, BlockRestore blockRestore, ProjectileManager projectileManager, AchievementManager achievementManager,
PacketHandler packetHandler, HologramManager hologramManager, IncognitoManager incognitoManager)
PacketHandler packetHandler, HologramManager hologramManager, IncognitoManager incognitoManager, CastleManager castleManager)
{
super("Gadget Manager", plugin);
@ -307,6 +309,7 @@ public class GadgetManager extends MiniPlugin
_boosterManager = new OutfitWindUpSuitBoosterManager(this);
_incognitoManager = incognitoManager;
_soulManager = new SoulManager();
_castleManager = castleManager;
createGadgets();
createSets();
@ -460,7 +463,7 @@ public class GadgetManager extends MiniPlugin
addGadget(new ParticleWingsLove(this));
addGadget(new ParticleSpringHalo(this));
addGadget(new ParticleWingsBee(this));
addGadget(new ParticleKing(this));
addGadget(new ParticleKing(this, _castleManager));
// Arrow Trails
addGadget(new ArrowTrailFrostLord(this));

View File

@ -0,0 +1,176 @@
package mineplex.core.gadget.gadgets.particle.king;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntitySpawnEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.MiniPlugin;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.gadget.gadgets.particle.king.events.UpdateKingEvent;
import mineplex.core.hologram.Hologram;
import mineplex.core.hologram.HologramManager;
/**
* Manages the castle in the main lobbies
*/
public class CastleManager extends MiniPlugin
{
private King _king;
private Location _castleLocationA = new Location(UtilWorld.getWorld("world"), 32, 71, -4);
private Location _castleLocationB = new Location(UtilWorld.getWorld("world"), 44, 82, 8);
private Location _removedKingLocation = new Location(UtilWorld.getWorld("world"), 28, 71, 6);
private Location _hologramLocation = new Location(UtilWorld.getWorld("world"), 28.5, 83, 2.5);
private HologramManager _hologramManager;
private Hologram _hologram;
private boolean _isHub = false;
public CastleManager(JavaPlugin plugin, HologramManager hologramManager, boolean isHub)
{
super("CastleManager", plugin);
_hologramManager = hologramManager;
_isHub = isHub;
spawnHologram();
}
/**
* Sets the lobby's king
* @param king The new king
*/
public void setKing(King king)
{
_king = king;
updateHologram();
}
/**
* Gets the current king
* @return The king of that lobby
*/
public King getKing()
{
return _king;
}
/**
* Checks if the server is a hub server or not
* @return
*/
public boolean isHub()
{
return _isHub;
}
/**
* Stops entities from spawning inside the castle
* @param event
*/
@EventHandler
public void onEntitySpawn(EntitySpawnEvent event)
{
if (event.getEntity() instanceof Player)
return;
if (UtilAlg.inBoundingBox(event.getLocation(), _castleLocationA, _castleLocationB))
{
event.setCancelled(true);
}
}
/**
* Stops players from walking inside the castle
* @param event
*/
@EventHandler
public void onPlayerMove(PlayerMoveEvent event)
{
Player player = event.getPlayer();
if (_king != null)
{
Player king = _king.getKing();
if (king.equals(player))
{
return;
}
}
Location fromLocation = event.getFrom();
Location toLocation = event.getTo();
if (!fromLocation.getWorld().equals(toLocation.getWorld())) return;
// Cancels movement
if (UtilAlg.inBoundingBox(toLocation, _castleLocationA, _castleLocationB))
{
Entity target = player;
while (target.getVehicle() != null)
{
target = target.getVehicle();
}
Location spawnLocation = new Location(target.getWorld(), 0, 64, 0);
UtilAction.velocity(target, UtilAlg.getTrajectory(target.getLocation(), spawnLocation).multiply(-1), 1.5, true, 0.8, 0, 1.0, true);
}
}
/**
* Removes old king from castle if they are still in it
* @param event
*/
@EventHandler
public void onUpdateKing(UpdateKingEvent event)
{
King oldKing = event.getOldKing();
King newKing = event.getNewKing();
if (oldKing != null && oldKing.getKing().isOnline())
{
// Removes old king from the throne
if (UtilAlg.inBoundingBox(oldKing.getKing().getLocation(), _castleLocationA, _castleLocationB))
{
oldKing.getKing().teleport(_removedKingLocation);
UtilPlayer.message(oldKing.getKing(), F.main("Kingdom", "You are no longer the king of that castle!"));
}
}
Bukkit.broadcastMessage(F.main("Kingdom", "" + F.name(newKing.getKing().getName()) + " is the new King of this lobby!"));
setKing(newKing);
}
/**
* Spawns the hologram above the castle
*/
private void spawnHologram()
{
_hologram = new Hologram(_hologramManager, _hologramLocation, "Mineplex Castle", "Current King: " + F.name("No one") + "!");
}
/**
* Updates the hologram above the castle
*/
private void updateHologram()
{
if (_hologram == null)
return;
if (_king != null && _king.getKing().isOnline())
{
_hologram.setText("Mineplex Castle", "Current King: " + F.name(_king.getKing().getName()) + "!");
}
else
{
_hologram.setText("Mineplex Castle", "Current King: " + F.name("No one") + "!");
}
}
}

View File

@ -0,0 +1,44 @@
package mineplex.core.gadget.gadgets.particle.king;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.entity.Player;
public class King
{
private Player _king;
private List<Player> _peasants = new ArrayList<>();
public King(Player king)
{
_king = king;
}
public Player getKing()
{
return _king;
}
public int amountOfPeasants()
{
return _peasants.size();
}
public void addPeasant(Player peasant)
{
_peasants.add(peasant);
}
public void removePeasant(Player peasant)
{
_peasants.remove(peasant);
}
public boolean hasPeasant(Player peasant)
{
return _peasants.contains(peasant);
}
}

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle;
package mineplex.core.gadget.gadgets.particle.king;
import java.awt.Color;
import java.time.Month;
@ -8,6 +8,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -27,6 +28,7 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.UtilTime;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.particle.king.events.UpdateKingEvent;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.gadget.types.OutfitGadget;
import mineplex.core.gadget.types.ParticleGadget;
@ -42,7 +44,10 @@ public class ParticleKing extends ParticleGadget
private ShapeWings _capeRed = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(0.2,0.2,0.2), 1, 0, false, ShapeWings.NO_ROTATION, ShapeWings.KINGS_CAPE);
private ShapeWings _capeWhite = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(0.1,0.1,0.1), 1, 0, true, ShapeWings.NO_ROTATION, ShapeWings.KINGS_CAPE);
public ParticleKing(GadgetManager manager)
private CastleManager _castleManager;
private boolean _inLobby = false;
public ParticleKing(GadgetManager manager, CastleManager castleManager)
{
super(manager, "King", UtilText.splitLinesToArray(new String[]
{
@ -50,6 +55,9 @@ public class ParticleKing extends ParticleGadget
}, LineFormat.LORE),
-14,
Material.GOLD_HELMET, (byte) 0, YearMonth.of(2017, Month.MAY));
_castleManager = castleManager;
if (_castleManager.isHub())
_inLobby = true;
}
@Override
@ -79,7 +87,11 @@ public class ParticleKing extends ParticleGadget
Manager.removeGadgetType(player, GadgetType.MORPH, this);
Manager.removeOutfit(player, OutfitGadget.ArmorSlot.HELMET);
player.getEquipment().setHelmet(new ItemStack(Material.GOLD_HELMET));
_kings.add(new King(player));
if (_inLobby)
{
_kings.add(new King(player));
updateKing();
}
}
@Override
@ -87,7 +99,11 @@ public class ParticleKing extends ParticleGadget
{
super.disableCustom(player, message);
player.getInventory().setHelmet(null);
_kings.removeIf(king -> king.getKing().equals(player));
if (_inLobby)
{
_kings.removeIf(king -> king.getKing().equals(player));
updateKing();
}
}
@EventHandler
@ -103,6 +119,9 @@ public class ParticleKing extends ParticleGadget
@EventHandler
public void tagPlayer(EntityDamageByEntityEvent event)
{
if (!_inLobby)
return;
if (!(event.getDamager() instanceof Player))
return;
@ -130,18 +149,19 @@ public class ParticleKing extends ParticleGadget
for (King king : _kings)
{
// Checks if the player is owned by anyone else, if it is, then remove
if (king.hasPlayer(clicked))
if (king.hasPeasant(clicked))
{
king.removePlayer(clicked);
UtilPlayer.message(king.getKing(), F.main("King", "" + F.name(clicker.getName()) + " stole one of your peasants! You now have " + F.count(king.count()) + " peasants!"));
king.removePeasant(clicked);
UtilPlayer.message(king.getKing(), F.main("King", "" + F.name(clicker.getName()) + " stole one of your peasants! You now have " + F.count(king.amountOfPeasants()) + " peasants!"));
}
// Finally, adds the player to the king that clicked the player
else if (king.getKing().equals(clicker))
{
king.addPlayer(clicked);
UtilPlayer.message(clicker, F.main("King", "You tagged " + F.name(clicked.getName()) + " as a peasant! You now have " + F.count(king.count()) + " peasants!"));
king.addPeasant(clicked);
UtilPlayer.message(clicker, F.main("King", "You tagged " + F.name(clicked.getName()) + " as a peasant! You now have " + F.count(king.amountOfPeasants()) + " peasants!"));
}
}
updateKing();
}
private boolean isPlayerCoolingDown(Player player)
@ -161,64 +181,53 @@ public class ParticleKing extends ParticleGadget
@EventHandler
public void onPlayerLeave(PlayerQuitEvent event)
{
if (!_inLobby)
return;
for (King king : _kings)
{
if (king.hasPlayer(event.getPlayer()))
if (king.hasPeasant(event.getPlayer()))
{
king.removePlayer(event.getPlayer());
UtilPlayer.message(king.getKing(), F.main("King", "The peasant " + F.name(event.getPlayer().getName()) + " left your kingdom! You now have " + F.count(king.count()) + " peasants!"));
king.removePeasant(event.getPlayer());
UtilPlayer.message(king.getKing(), F.main("King", "The peasant " + F.name(event.getPlayer().getName()) + " left your kingdom! You now have " + F.count(king.amountOfPeasants()) + " peasants!"));
}
}
_kings.removeIf(king -> king.getKing().equals(event.getPlayer()));
updateKing();
}
public King getLobbyKing()
private King getLobbyKing()
{
if (_kings.size() == 0)
return null;
King lobbyKing = null;
int peasants = 0;
for (King king : _kings)
{
if (lobbyKing == null)
lobbyKing = king;
else if (king.count() > peasants)
else if (king.amountOfPeasants() > peasants)
lobbyKing = king;
}
return lobbyKing;
}
private class King
private void updateKing()
{
private Player _king;
private List<Player> _players = new ArrayList<>();
public King(Player king)
if (_inLobby)
{
_king = king;
}
public Player getKing()
{
return _king;
}
public void addPlayer(Player player)
{
_players.add(player);
}
public void removePlayer(Player player)
{
_players.remove(player);
}
public boolean hasPlayer(Player player)
{
return _players.contains(player);
}
public int count()
{
return _players.size();
King king = getLobbyKing();
King oldKing = _castleManager.getKing();
if (king != null && oldKing != null)
{
if (!king.equals(oldKing))
{
Bukkit.getPluginManager().callEvent(new UpdateKingEvent(oldKing, king));
}
} else
{
Bukkit.getPluginManager().callEvent(new UpdateKingEvent(oldKing, king));
}
}
}
}

View File

@ -0,0 +1,43 @@
package mineplex.core.gadget.gadgets.particle.king.events;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import mineplex.core.gadget.gadgets.particle.king.King;
public class UpdateKingEvent extends Event
{
private static final HandlerList handlers = new HandlerList();
private King _newKing;
private King _oldKing;
public UpdateKingEvent(King newKing, King oldKing)
{
_newKing = newKing;
_oldKing = oldKing;
}
public King getNewKing()
{
return _newKing;
}
public King getOldKing()
{
return _oldKing;
}
@Override
public HandlerList getHandlers()
{
return handlers;
}
public static HandlerList getHandlerList()
{
return handlers;
}
}

View File

@ -84,6 +84,7 @@ import mineplex.core.facebook.FacebookManager;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.event.GadgetCollideEntityEvent;
import mineplex.core.gadget.gadgets.morph.MorphWither;
import mineplex.core.gadget.gadgets.particle.king.CastleManager;
import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.hologram.HologramManager;
@ -194,7 +195,8 @@ public class HubManager extends MiniPlugin implements IChatMessageFormatter
_inventoryManager = inventoryManager;
new BenefitManager(plugin, clientManager, _inventoryManager);
_gadgetManager = new GadgetManager(_plugin, clientManager, donationManager, _inventoryManager, _mountManager, petManager, preferences, disguiseManager, blockRestore, new ProjectileManager(plugin), achievementManager, packetHandler, hologramManager, incognito);
CastleManager castleManager = new CastleManager(_plugin, hologramManager, false);
_gadgetManager = new GadgetManager(_plugin, clientManager, donationManager, _inventoryManager, _mountManager, petManager, preferences, disguiseManager, blockRestore, new ProjectileManager(plugin), achievementManager, packetHandler, hologramManager, incognito, castleManager);
FacebookManager facebookManager = new FacebookManager(plugin, clientManager, donationManager, inventoryManager);
YoutubeManager youtubeManager = new YoutubeManager(plugin, clientManager, donationManager);

View File

@ -4,6 +4,13 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.UUID;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.HoverEvent.Action;
import net.md_5.bungee.api.chat.TextComponent;
import net.minecraft.server.v1_8_R3.EntityInsentient;
import net.minecraft.server.v1_8_R3.EntityPlayer;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
@ -69,6 +76,7 @@ import mineplex.core.donation.Donor;
import mineplex.core.facebook.FacebookManager;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.event.GadgetCollideEntityEvent;
import mineplex.core.gadget.gadgets.particle.king.CastleManager;
import mineplex.core.hologram.HologramManager;
import mineplex.core.incognito.IncognitoManager;
import mineplex.core.incognito.events.IncognitoHidePlayerEvent;
@ -131,12 +139,6 @@ import mineplex.minecraft.game.classcombat.item.event.ItemTriggerEvent;
import mineplex.minecraft.game.core.combat.DeathMessageType;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import mineplex.minecraft.game.core.condition.ConditionManager;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.HoverEvent.Action;
import net.md_5.bungee.api.chat.TextComponent;
import net.minecraft.server.v1_8_R3.EntityInsentient;
import net.minecraft.server.v1_8_R3.EntityPlayer;
public class HubManager extends MiniClientPlugin<HubClient> implements IChatMessageFormatter
{
@ -222,7 +224,8 @@ public class HubManager extends MiniClientPlugin<HubClient> implements IChatMess
_mountManager = new MountManager(_plugin, clientManager, donationManager, blockRestore, _disguiseManager);
_inventoryManager = inventoryManager;
new BenefitManager(plugin, clientManager, _inventoryManager);
_gadgetManager = new GadgetManager(_plugin, clientManager, donationManager, _inventoryManager, _mountManager, petManager, preferences, disguiseManager, blockRestore, Managers.get(ProjectileManager.class), achievementManager, packetHandler, hologramManager, incognito);
CastleManager castleManager = new CastleManager(_plugin, hologramManager, true);
_gadgetManager = new GadgetManager(_plugin, clientManager, donationManager, _inventoryManager, _mountManager, petManager, preferences, disguiseManager, blockRestore, Managers.get(ProjectileManager.class), achievementManager, packetHandler, hologramManager, incognito, castleManager);
FacebookManager facebookManager = new FacebookManager(plugin, clientManager, donationManager, inventoryManager);
YoutubeManager youtubeManager = new YoutubeManager(plugin, clientManager, donationManager);

View File

@ -3,7 +3,6 @@ package nautilus.game.arcade;
import java.io.File;
import java.util.HashMap;
import mineplex.core.aprilfools.AprilFoolsManager;
import net.minecraft.server.v1_8_R3.MinecraftServer;
import org.bukkit.Bukkit;
@ -24,6 +23,7 @@ import mineplex.core.achievement.AchievementManager;
import mineplex.core.antihack.AntiHack;
import mineplex.core.antihack.RelationProvider;
import mineplex.core.antihack.logging.AntihackLogger;
import mineplex.core.aprilfools.AprilFoolsManager;
import mineplex.core.blockrestore.BlockRestore;
import mineplex.core.blood.Blood;
import mineplex.core.boosters.BoosterManager;
@ -44,6 +44,7 @@ import mineplex.core.donation.DonationManager;
import mineplex.core.elo.EloManager;
import mineplex.core.friend.FriendManager;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.particle.king.CastleManager;
import mineplex.core.give.Give;
import mineplex.core.globalpacket.GlobalPacketManager;
import mineplex.core.hologram.HologramManager;
@ -86,6 +87,7 @@ import mineplex.minecraft.game.core.damage.DamageManager;
import nautilus.game.arcade.anticheatmetadata.GameInfoMetadata;
import nautilus.game.arcade.game.Game;
import nautilus.game.arcade.game.GameServerConfig;
import static mineplex.core.Managers.require;
public class Arcade extends JavaPlugin
@ -201,7 +203,8 @@ public class Arcade extends JavaPlugin
InventoryManager inventoryManager = new InventoryManager(this, _clientManager);
PetManager petManager = new PetManager(this, _clientManager, _donationManager, inventoryManager, disguiseManager, creature, blockRestore);
MountManager mountManager = new MountManager(this, _clientManager, _donationManager, blockRestore, disguiseManager);
GadgetManager gadgetManager = new GadgetManager(this, _clientManager, _donationManager, inventoryManager, mountManager, petManager, preferenceManager, disguiseManager, blockRestore, projectileManager, achievementManager, packetHandler, hologramManager, incognito);
CastleManager castleManager = new CastleManager(this, hologramManager, false);
GadgetManager gadgetManager = new GadgetManager(this, _clientManager, _donationManager, inventoryManager, mountManager, petManager, preferenceManager, disguiseManager, blockRestore, projectileManager, achievementManager, packetHandler, hologramManager, incognito, castleManager);
ThankManager thankManager = new ThankManager(this, _clientManager, _donationManager);
BoosterManager boosterManager = new BoosterManager(this, _serverConfiguration.getServerGroup().getBoosterGroup(), _clientManager, _donationManager, inventoryManager, thankManager);
CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager, mountManager, petManager, null, boosterManager);

View File

@ -24,6 +24,7 @@ import mineplex.core.donation.DonationManager;
import mineplex.core.elo.EloManager;
import mineplex.core.friend.FriendManager;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.particle.king.CastleManager;
import mineplex.core.give.Give;
import mineplex.core.hologram.HologramManager;
import mineplex.core.ignore.IgnoreManager;
@ -129,8 +130,9 @@ public class Hub extends JavaPlugin
InventoryManager inventoryManager = new InventoryManager(this, _clientManager);
PetManager petManager = new PetManager(this, _clientManager, _donationManager, inventoryManager, disguiseManager, creature, blockRestore);
MountManager mountManager = new MountManager(this, _clientManager, _donationManager, blockRestore, disguiseManager);
CastleManager castleManager = new CastleManager(this, hologramManager, false);
GadgetManager gadgetManager = new GadgetManager(this, _clientManager, _donationManager, inventoryManager, mountManager, petManager,
preferenceManager, disguiseManager, blockRestore, projectileManager, achievementManager, packetHandler, hologramManager, incognito);
preferenceManager, disguiseManager, blockRestore, projectileManager, achievementManager, packetHandler, hologramManager, incognito, castleManager);
ThankManager thankManager = new ThankManager(this, _clientManager, _donationManager);
BoosterManager boosterManager = new BoosterManager(this, serverConfiguration.getServerGroup().getBoosterGroup(), _clientManager, _donationManager, inventoryManager, thankManager);
RewardManager rewardManager = new RewardManager(_clientManager, _donationManager, inventoryManager, petManager, gadgetManager, statsManager);

View File

@ -1,6 +1,5 @@
package mineplex.gemhunters;
import mineplex.core.aprilfools.AprilFoolsManager;
import net.minecraft.server.v1_8_R3.MinecraftServer;
import org.bukkit.Bukkit;
@ -15,6 +14,7 @@ import mineplex.core.TimingsFix;
import mineplex.core.account.CoreClientManager;
import mineplex.core.achievement.AchievementManager;
import mineplex.core.antihack.AntiHack;
import mineplex.core.aprilfools.AprilFoolsManager;
import mineplex.core.beta.BetaWhitelist;
import mineplex.core.blockrestore.BlockRestore;
import mineplex.core.boosters.BoosterManager;
@ -36,6 +36,7 @@ import mineplex.core.elo.EloManager;
import mineplex.core.explosion.Explosion;
import mineplex.core.friend.FriendManager;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.particle.king.CastleManager;
import mineplex.core.give.Give;
import mineplex.core.hologram.HologramManager;
import mineplex.core.ignore.IgnoreManager;
@ -252,7 +253,8 @@ public class GemHunters extends JavaPlugin
MountManager mountManager = new MountManager(this, clientManager, donationManager, blockRestore, disguiseManager);
PetManager petManager = new PetManager(this, clientManager, donationManager, inventoryManager, disguiseManager, creature, blockRestore);
ProjectileManager projectileManager = new ProjectileManager(this);
GadgetManager gadgetManager = new GadgetManager(this, clientManager, donationManager, inventoryManager, mountManager, petManager, preferenceManager, disguiseManager, blockRestore, projectileManager, achievementManager, packetHandler, hologramManager, incognito);
CastleManager castleManager = new CastleManager(this, hologramManager, false);
GadgetManager gadgetManager = new GadgetManager(this, clientManager, donationManager, inventoryManager, mountManager, petManager, preferenceManager, disguiseManager, blockRestore, projectileManager, achievementManager, packetHandler, hologramManager, incognito, castleManager);
ThankManager thankManager = new ThankManager(this, clientManager, donationManager);
BoosterManager boosterManager = new BoosterManager(this, null, clientManager, donationManager, inventoryManager, thankManager);
CosmeticManager cosmeticManager = new CosmeticManager(this, clientManager, donationManager, inventoryManager, gadgetManager, mountManager, petManager, null, boosterManager);