More changes!
This commit is contained in:
parent
28fa092b20
commit
421d76b7f3
@ -26,6 +26,7 @@ import nautilus.game.arcade.game.modules.WorldBorderModule;
|
|||||||
import nautilus.game.arcade.game.modules.compass.CompassModule;
|
import nautilus.game.arcade.game.modules.compass.CompassModule;
|
||||||
import nautilus.game.arcade.kit.Kit;
|
import nautilus.game.arcade.kit.Kit;
|
||||||
import nautilus.game.arcade.kit.Perk;
|
import nautilus.game.arcade.kit.Perk;
|
||||||
|
import nautilus.game.arcade.kit.perks.PerkBomber;
|
||||||
import nautilus.game.arcade.kit.perks.PerkDestructor;
|
import nautilus.game.arcade.kit.perks.PerkDestructor;
|
||||||
import nautilus.game.arcade.ore.OreHider;
|
import nautilus.game.arcade.ore.OreHider;
|
||||||
import nautilus.game.arcade.ore.OreObsfucation;
|
import nautilus.game.arcade.ore.OreObsfucation;
|
||||||
@ -1076,6 +1077,16 @@ public class Bridge extends TeamGame implements OreObsfucation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void diamondOreExplode(PerkBomber.BomberExplodeDiamondBlock event)
|
||||||
|
{
|
||||||
|
event.setSpawnDrop(false);
|
||||||
|
event.getBlock().setType(Material.AIR);
|
||||||
|
|
||||||
|
Item item = event.getBlock().getWorld().dropItem(event.getBlock().getLocation().add(.5, .5, .5), new ItemStack(Material.DIAMOND_ORE));
|
||||||
|
item.setMetadata("owner", new FixedMetadataValue(Manager.getPlugin(), event.getPlayer().getUniqueId()));
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void itemPickup(PlayerPickupItemEvent event)
|
public void itemPickup(PlayerPickupItemEvent event)
|
||||||
{
|
{
|
||||||
@ -1630,6 +1641,7 @@ public class Bridge extends TeamGame implements OreObsfucation
|
|||||||
|
|
||||||
UtilPlayer.message(player, F.main("Game", "You used your " + F.elem(C.cAqua + "Early Game Revive") + "."));
|
UtilPlayer.message(player, F.main("Game", "You used your " + F.elem(C.cAqua + "Early Game Revive") + "."));
|
||||||
|
|
||||||
|
player.setFallDistance(0);
|
||||||
GetTeam(player).SpawnTeleport(player);
|
GetTeam(player).SpawnTeleport(player);
|
||||||
player.setHealth(20);
|
player.setHealth(20);
|
||||||
event.SetCancelled("Early Game Revive");
|
event.SetCancelled("Early Game Revive");
|
||||||
|
@ -29,7 +29,7 @@ public class RadiusCustomBridgeAnimation extends CustomBridgeAnimation
|
|||||||
@Override
|
@Override
|
||||||
public void onUpdate(UpdateType type)
|
public void onUpdate(UpdateType type)
|
||||||
{
|
{
|
||||||
if (type != UpdateType.FAST)
|
if (type != UpdateType.SEC)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ public class KitApple extends ProgressingKit
|
|||||||
};
|
};
|
||||||
|
|
||||||
private static final Perk[] PERKS = {
|
private static final Perk[] PERKS = {
|
||||||
new PerkApple(10000, 500)
|
new PerkApple(10000, 250)
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final ItemStack IN_HAND = new ItemStack(Material.APPLE);
|
private static final ItemStack IN_HAND = new ItemStack(Material.APPLE);
|
||||||
|
@ -26,7 +26,7 @@ public class KitDestructor extends ProgressingKit
|
|||||||
};
|
};
|
||||||
|
|
||||||
private static final Perk[] PERKS = {
|
private static final Perk[] PERKS = {
|
||||||
new PerkDestructor(40, 2, 400, 1.5, false)
|
new PerkDestructor(40, 2, 400, 3, false)
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final Achievement[] ACHIEVEMENTS = {
|
private static final Achievement[] ACHIEVEMENTS = {
|
||||||
|
@ -87,7 +87,7 @@ public class PerkApple extends Perk implements IThrown
|
|||||||
if (!Kit.HasKit(player))
|
if (!Kit.HasKit(player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!Recharge.Instance.use(player, getMessage(player) + " Throw", _throwDelay, true, false))
|
if (!Recharge.Instance.use(player, getMessage(player) + " Throw", _throwDelay, false, false))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -39,18 +39,30 @@ public class PerkBomber extends Perk
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final Block _block;
|
private final Block _block;
|
||||||
|
private boolean _spawnDrop;
|
||||||
|
|
||||||
public BomberExplodeDiamondBlock(Player who, Block block)
|
public BomberExplodeDiamondBlock(Player who, Block block)
|
||||||
{
|
{
|
||||||
super(who);
|
super(who);
|
||||||
|
|
||||||
_block = block;
|
_block = block;
|
||||||
|
_spawnDrop = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Block getBlock()
|
public Block getBlock()
|
||||||
{
|
{
|
||||||
return _block;
|
return _block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSpawnDrop(boolean b)
|
||||||
|
{
|
||||||
|
_spawnDrop = b;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean shouldSpawnDrop()
|
||||||
|
{
|
||||||
|
return _spawnDrop;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String THROWING_TNT_DISPLAY_NAME = F.item("Throwing TNT");
|
private static final String THROWING_TNT_DISPLAY_NAME = F.item("Throwing TNT");
|
||||||
@ -265,8 +277,13 @@ public class PerkBomber extends Perk
|
|||||||
|
|
||||||
if (block.getType() == Material.DIAMOND_ORE)
|
if (block.getType() == Material.DIAMOND_ORE)
|
||||||
{
|
{
|
||||||
Bukkit.getPluginManager().callEvent(new BomberExplodeDiamondBlock(player, block));
|
BomberExplodeDiamondBlock explodeEvent = new BomberExplodeDiamondBlock(player, block);
|
||||||
block.breakNaturally();
|
UtilServer.CallEvent(explodeEvent);
|
||||||
|
|
||||||
|
if (explodeEvent.shouldSpawnDrop())
|
||||||
|
{
|
||||||
|
block.breakNaturally();
|
||||||
|
}
|
||||||
it.remove();
|
it.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user