Merge branch 'monster-maze' of

http://Mysticate@184.154.0.242:7990/scm/min/mineplex.git into
monster-maze

Conflicts:
	Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/monstermaze/Maze.java
This commit is contained in:
Mysticate 2015-09-26 00:00:46 -04:00
commit 8e9a3e90a7
2 changed files with 18 additions and 9 deletions

View File

@ -40,6 +40,7 @@ import nautilus.game.arcade.game.games.monstermaze.kits.KitSmasher;
import org.bukkit.Bukkit;
import org.bukkit.Color;
import org.bukkit.EntityEffect;
import org.bukkit.FireworkEffect.Type;
import org.bukkit.Location;
import org.bukkit.Material;
@ -748,7 +749,7 @@ public class Maze implements Listener
if (event.getPlayer().getItemInHand() == null)
return;
if (event.getPlayer().getItemInHand().getType() != Material.ANVIL)
if (event.getPlayer().getItemInHand().getType() != Material.COAL)
return;
Player player = event.getPlayer();
@ -762,18 +763,26 @@ public class Maze implements Listener
event.setCancelled(true);
UtilInv.remove(player, Material.ANVIL, (byte)0, 1);
UtilInv.remove(player, Material.COAL, (byte)0, 1);
UtilInv.Update(player);
for(Entity ent : UtilEnt.getInRadius(player.getLocation(), 3).keySet())
for(final Entity ent : UtilEnt.getInRadius(player.getLocation(), 3).keySet())
{
if(_ents.containsKey(ent))
{
Location loc = ent.getLocation();
final Location loc = ent.getLocation();
UtilFirework.playFirework(loc, Type.BURST, Color.BLACK, false, false);
ent.teleport(UtilAlg.Random(_spawns));
}
ent.playEffect(EntityEffect.HURT);
UtilAction.velocity(ent, UtilAlg.getTrajectory(player, ent), 1, false, 0, 0.5, 1.2, true);
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(Host.getArcadeManager().getPlugin(), new Runnable() {
@Override
public void run() {
UtilFirework.playFirework(loc, Type.BALL_LARGE, Color.BLACK, false, false);
ent.teleport(UtilAlg.Random(_spawns));
}
}, 0L, 2000L);
}
}
Bukkit.getPluginManager().callEvent(new AbilityUseEvent(player));

View File

@ -35,13 +35,13 @@ public class KitSmasher extends Kit
}
},
EntityType.SKELETON,
new ItemStack(Material.ANVIL));
new ItemStack(Material.COAL));
}
@Override
public void GiveItems(Player player)
{
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.ANVIL, (byte)0, 3,
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.COAL, (byte)0, 3,
C.cYellow + C.Bold + "Right Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Smash"));
}
}