Ops, lava, not water

This commit is contained in:
LCastr0 2016-12-23 19:13:50 -02:00
parent c0afad0723
commit 9fad633b88

View File

@ -1228,9 +1228,12 @@ public class GadgetManager extends MiniPlugin
}
else if (material == Material.LAVA || material == Material.STATIONARY_LAVA)
{
SwimManager.addPlayerLava(uuid);
SwimManager.removePlayer(uuid);
Bukkit.getPluginManager().callEvent(new PlayerToggleSwimEvent(event.getPlayer(), false, true));
if (!SwimManager.isInLava(uuid))
{
SwimManager.addPlayerLava(uuid);
SwimManager.removePlayer(uuid);
Bukkit.getPluginManager().callEvent(new PlayerToggleSwimEvent(event.getPlayer(), true, false));
}
}
else
{