Fix Skywars eating/bowing/whatevering bug
This commit is contained in:
parent
5ca9b79333
commit
7290b83466
@ -1014,14 +1014,15 @@ public abstract class Skyfall extends Game
|
|||||||
if (System.currentTimeMillis() > _disabledElytras.get(player.getUniqueId()))
|
if (System.currentTimeMillis() > _disabledElytras.get(player.getUniqueId()))
|
||||||
{
|
{
|
||||||
player.getInventory().setChestplate(new ItemStack(Material.ELYTRA));
|
player.getInventory().setChestplate(new ItemStack(Material.ELYTRA));
|
||||||
|
_disabledElytras.remove(player.getUniqueId());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (player.getInventory().getChestplate() != null)
|
if (player.getInventory().getChestplate() != null)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main("Game", C.cRed + "Your Elytra is disabled!"));
|
UtilPlayer.message(player, F.main("Game", C.cRed + "Your Elytra is disabled!"));
|
||||||
|
player.getInventory().setChestplate(null);
|
||||||
}
|
}
|
||||||
player.getInventory().setChestplate(null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ import nautilus.game.arcade.kit.Perk;
|
|||||||
* Perk that removes attacked
|
* Perk that removes attacked
|
||||||
* Players Elytra for the
|
* Players Elytra for the
|
||||||
* specified amount of
|
* specified amount of
|
||||||
* tim ein milliseconds.
|
* time in milliseconds.
|
||||||
*
|
*
|
||||||
* @author xXVevzZXx
|
* @author xXVevzZXx
|
||||||
*/
|
*/
|
||||||
@ -50,7 +50,7 @@ public class PerkRemoveElytra extends Perk
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void stunnEnemy(CustomDamageEvent event)
|
public void stunEnemy(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
if (Manager.GetGame() == null)
|
if (Manager.GetGame() == null)
|
||||||
return;
|
return;
|
||||||
@ -83,14 +83,15 @@ public class PerkRemoveElytra extends Perk
|
|||||||
if (System.currentTimeMillis() > _disabled.get(player.getUniqueId()))
|
if (System.currentTimeMillis() > _disabled.get(player.getUniqueId()))
|
||||||
{
|
{
|
||||||
player.getInventory().setChestplate(new ItemStack(Material.ELYTRA));
|
player.getInventory().setChestplate(new ItemStack(Material.ELYTRA));
|
||||||
|
_disabled.remove(player.getUniqueId());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (player.getInventory().getChestplate() != null)
|
if (player.getInventory().getChestplate() != null)
|
||||||
{
|
{
|
||||||
UtilPlayer.message(player, F.main("Game", C.cRed + "Your Elytra is disabled!"));
|
UtilPlayer.message(player, F.main("Game", C.cRed + "Your Elytra is disabled!"));
|
||||||
|
player.getInventory().setChestplate(null);
|
||||||
}
|
}
|
||||||
player.getInventory().setChestplate(null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user