Even cooler Eruption now.

This commit is contained in:
sigonasr2 2016-07-28 05:26:23 -05:00
parent 40f420bf89
commit 7187c1414a
4 changed files with 14 additions and 6 deletions

Binary file not shown.

View File

@ -1,6 +1,6 @@
name: TwosideKeeper name: TwosideKeeper
main: sig.plugin.TwosideKeeper.TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper
version: 3.7.1 version: 3.7.1r1
commands: commands:
money: money:
description: Tells the player the amount of money they are holding. description: Tells the player the amount of money they are holding.

View File

@ -355,9 +355,10 @@ public class NewCombat {
FallingBlock fb = (FallingBlock)b.getLocation().getWorld().spawnFallingBlock(b.getLocation().add(0,0.1,0),b.getType(),(byte)0); FallingBlock fb = (FallingBlock)b.getLocation().getWorld().spawnFallingBlock(b.getLocation().add(0,0.1,0),b.getType(),(byte)0);
fb.setVelocity(new Vector(0,Math.random()*1.35,0)); fb.setVelocity(new Vector(0,Math.random()*1.35,0));
fb.setMetadata("FAKE", new FixedMetadataValue(TwosideKeeper.plugin,true)); fb.setMetadata("FAKE", new FixedMetadataValue(TwosideKeeper.plugin,true));
b.breakNaturally(); //b.breakNaturally();
aPlugin.API.sendSoundlessExplosion(b.getLocation(), 3); b.setType(Material.AIR);
p.playSound(mon.getLocation(), Sound.BLOCK_CHORUS_FLOWER_DEATH, 1.0f, 1.0f); aPlugin.API.sendSoundlessExplosion(b.getLocation(), 1);
p.playSound(mon.getLocation(), Sound.ENTITY_GENERIC_EXPLODE, 1.0f, 1.0f);
} }
} }
} }

View File

@ -2628,7 +2628,14 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
if (ev.getEntity() instanceof FallingBlock) { if (ev.getEntity() instanceof FallingBlock) {
FallingBlock fb = (FallingBlock)ev.getEntity(); FallingBlock fb = (FallingBlock)ev.getEntity();
if (fb.hasMetadata("FAKE")) { if (fb.hasMetadata("FAKE")) {
ev.setCancelled(true); final Block b = ev.getBlock();
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
@Override
public void run() {
b.getLocation().getWorld().playSound(b.getLocation(), Sound.BLOCK_CHORUS_FLOWER_DEATH, 1.0f, 1.0f);
b.breakNaturally();
}
},1);
} }
} }
} }