fixed my muddling of perks
This commit is contained in:
parent
09d8367b4b
commit
2decc049c5
@ -6,12 +6,11 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.disguise.disguises.DisguiseEnderman;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.games.monsterleague.perks.PerkBlinkMonsterLeague;
|
||||
import nautilus.game.arcade.kit.KitAvailability;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import nautilus.game.arcade.kit.perks.PerkBlink;
|
||||
import nautilus.game.arcade.kit.perks.PerkDoubleJump;
|
||||
|
||||
public class KitEnderman extends LeagueKit
|
||||
@ -28,7 +27,7 @@ public class KitEnderman extends LeagueKit
|
||||
new Perk[]
|
||||
{
|
||||
new PerkDoubleJump("Double Jump", 1, 1, true),
|
||||
new PerkBlink("Blink", 32, 16000),
|
||||
new PerkBlinkMonsterLeague("Blink", 32, 16000),
|
||||
},
|
||||
EntityType.ENDERMAN,
|
||||
new ItemStack(Material.AIR), 1.4);
|
||||
|
@ -19,14 +19,15 @@ import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import nautilus.game.arcade.kit.SmashPerk;
|
||||
|
||||
public class PerkBlink extends SmashPerk
|
||||
public class PerkBlinkMonsterLeague extends Perk
|
||||
{
|
||||
private double _range = 32;
|
||||
private long _recharge = 24000;
|
||||
|
||||
public PerkBlink(String name, double range, long recharge)
|
||||
public PerkBlinkMonsterLeague(String name, double range, long recharge)
|
||||
{
|
||||
super("Blink", new String[]
|
||||
{
|
||||
@ -51,9 +52,6 @@ public class PerkBlink extends SmashPerk
|
||||
return;
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (isSuperActive(player))
|
||||
return;
|
||||
|
||||
if (!Kit.HasKit(player))
|
||||
return;
|
@ -17,11 +17,12 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import nautilus.game.arcade.kit.SmashPerk;
|
||||
|
||||
public class PerkBlink extends Perk
|
||||
public class PerkBlink extends SmashPerk
|
||||
{
|
||||
private String _name = "";
|
||||
private double _range;
|
||||
@ -45,17 +46,22 @@ public class PerkBlink extends Perk
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
if (event.getAction() != Action.LEFT_CLICK_AIR && event.getAction() != Action.LEFT_CLICK_BLOCK &&
|
||||
event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK)
|
||||
if (event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK)
|
||||
return;
|
||||
|
||||
if (UtilBlock.usable(event.getClickedBlock()))
|
||||
return;
|
||||
|
||||
if (!UtilGear.isAxe(event.getPlayer().getItemInHand()))
|
||||
return;
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (!Kit.HasKit(player))
|
||||
return;
|
||||
|
||||
if (isSuperActive(player))
|
||||
return;
|
||||
|
||||
if (!Recharge.Instance.use(player, _name, _recharge, true, true))
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user