Fixed issue with gadget command re-enabling after running

This commit is contained in:
LCastr0 2017-02-15 19:11:43 -02:00 committed by cnr
parent 81f38cf06b
commit 0befc7d967

View File

@ -617,12 +617,6 @@ public class GadgetManager extends MiniPlugin
event.getPlayer().setFlySpeed(0.1f);
// Loads saved gadgets
_userGadgetPersistence.load(event.getPlayer());
// Disables gadgets if there are more than 100 players in a server
if (UtilServer.getPlayers().length >= 100)
{
setGadgetEnabled(false);
}
}
public List<Gadget> getGadgets(GadgetType gadgetType)
@ -980,12 +974,6 @@ public class GadgetManager extends MiniPlugin
event.getPlayer().setWalkSpeed(0.2f);
event.getPlayer().setFlySpeed(0.1f);
_soulManager.giveSoul(event.getPlayer());
// Enables gadgets if there are less than 100 players
if (UtilServer.getPlayers().length < 100)
{
setGadgetEnabled(true);
}
}
@EventHandler