Disable using cosmetics inside mavericks hub
This commit is contained in:
parent
464c9fcdc3
commit
d7d8ef021e
@ -1,9 +1,5 @@
|
||||
package mineplex.hub.modules.mavericks;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.cosmetic.CosmeticManager;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
@ -12,6 +8,11 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.EntityPortalEnterEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.cosmetic.CosmeticManager;
|
||||
import mineplex.core.gadget.event.GadgetEnableEvent;
|
||||
/**
|
||||
* A small teleportation manager to manage the portal from the hub to the mavericks world and back.
|
||||
*/
|
||||
@ -40,7 +41,16 @@ public class MavericksPortalManager extends MiniPlugin
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onEntier(EntityPortalEnterEvent event)
|
||||
public void onEnable(GadgetEnableEvent event)
|
||||
{
|
||||
if (event.getPlayer().getWorld().equals(_destMavericks.getWorld()))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onEnter(EntityPortalEnterEvent event)
|
||||
{
|
||||
if (!(event.getEntity() instanceof Player))
|
||||
{
|
||||
@ -57,6 +67,7 @@ public class MavericksPortalManager extends MiniPlugin
|
||||
|
||||
_cosmeticManager.getPetManager().disableAll(p);
|
||||
_cosmeticManager.getMountManager().DisableAll(p);
|
||||
_cosmeticManager.getGadgetManager().disableAll(p);
|
||||
|
||||
if (box == _portalHubMavericks)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user