Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
7ff3765ba4
@ -119,13 +119,13 @@ public abstract class ItemGadget extends Gadget
|
||||
}
|
||||
|
||||
//Recharge
|
||||
if (!Recharge.Instance.use(player, GetName(), _recharge, true, false))
|
||||
if (!Recharge.Instance.use(player, GetName(), _recharge, _recharge > 1000, false))
|
||||
return;
|
||||
|
||||
//Use Gems
|
||||
if (_gemsPerUse > 0)
|
||||
{
|
||||
if (Manager.Manager.GetDonation().Get(player.getName()).GetGems() > _gemsPerUse)
|
||||
if (Manager.Manager.GetDonation().Get(player.getName()).GetGems() >= _gemsPerUse)
|
||||
{
|
||||
Manager.Manager.GetDonation().RewardGemsLater(GetName(), player.getName(), -_gemsPerUse);
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
name: MapParser
|
||||
main: Mineplex.MapParser
|
||||
main: mineplex.mapparser.MapParser
|
||||
version: 1
|
@ -2,6 +2,7 @@ package nautilus.game.arcade.game.games.castlesiege;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
@ -70,8 +71,10 @@ public class CastleSiege extends TeamGame
|
||||
private long _tntSpawn = 0;
|
||||
private ArrayList<Location> _tntSpawns = new ArrayList<Location>();
|
||||
private ArrayList<Location> _tntWeakness = new ArrayList<Location>();
|
||||
|
||||
private HashMap<Player, FallingBlock> _tntCarry = new HashMap<Player, FallingBlock>();
|
||||
|
||||
private HashSet<Player> _tntCarryEnd = new HashSet<Player>();
|
||||
|
||||
private ArrayList<Location> _kingLocs;
|
||||
private Creature _king;
|
||||
private Location _kingLoc;
|
||||
@ -593,7 +596,12 @@ public class CastleSiege extends TeamGame
|
||||
if (!_tntCarry.containsKey(player))
|
||||
return;
|
||||
|
||||
_tntCarry.remove(player).remove();
|
||||
//Remove the TNT
|
||||
_tntCarry.get(player).remove();
|
||||
|
||||
//Flag for Removal
|
||||
_tntCarryEnd.add(player);
|
||||
|
||||
|
||||
TNTPrimed tnt = player.getWorld().spawn(player.getEyeLocation(), TNTPrimed.class);
|
||||
tnt.setFuseTicks(0);
|
||||
@ -603,8 +611,12 @@ public class CastleSiege extends TeamGame
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void TNTDamageDivert(ProjectileHitEvent event)
|
||||
{
|
||||
for (Player player : _tntCarry.keySet())
|
||||
Iterator<Player> playerIterator = _tntCarry.keySet().iterator();
|
||||
|
||||
while (playerIterator.hasNext())
|
||||
{
|
||||
Player player = playerIterator.next();
|
||||
|
||||
if (player.getPassenger() == null)
|
||||
continue;
|
||||
|
||||
@ -621,7 +633,14 @@ public class CastleSiege extends TeamGame
|
||||
|
||||
event.getEntity().remove();
|
||||
}
|
||||
|
||||
if (_tntCarryEnd.contains(player))
|
||||
{
|
||||
playerIterator.remove();
|
||||
}
|
||||
}
|
||||
|
||||
_tntCarryEnd.clear();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user