Core edits
This commit is contained in:
parent
616c444c16
commit
df60659786
@ -1,6 +1,7 @@
|
|||||||
package nautilus.game.arcade.game.games.lobbers;
|
package nautilus.game.arcade.game.games.lobbers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
@ -13,6 +14,7 @@ import mineplex.core.common.util.UtilParticle.ParticleType;
|
|||||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
|
import mineplex.core.explosion.ExplosionEvent;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
@ -31,6 +33,7 @@ import org.bukkit.ChatColor;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.entity.TNTPrimed;
|
import org.bukkit.entity.TNTPrimed;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -231,6 +234,28 @@ public class BombLobbers extends TeamGame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
@EventHandler
|
||||||
|
public void damageBlocks(ExplosionEvent event)
|
||||||
|
{
|
||||||
|
if (!Manager.GetGame().IsLive())
|
||||||
|
return;
|
||||||
|
|
||||||
|
Iterator<Block> iterator = event.GetBlocks().iterator();
|
||||||
|
|
||||||
|
while (iterator.hasNext())
|
||||||
|
{
|
||||||
|
Block block = iterator.next();
|
||||||
|
|
||||||
|
if (block.getData() == 0)
|
||||||
|
{
|
||||||
|
block.setData((byte) 2);
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private GameTeam getSide(Location entityLoc)
|
private GameTeam getSide(Location entityLoc)
|
||||||
{
|
{
|
||||||
Location nearest = UtilAlg.findClosest(entityLoc, new ArrayList<Location>(_averageSpawns.values()));
|
Location nearest = UtilAlg.findClosest(entityLoc, new ArrayList<Location>(_averageSpawns.values()));
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package nautilus.game.arcade.game.games.lobbers.kits.perks;
|
package nautilus.game.arcade.game.games.lobbers.kits.perks;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
@ -9,7 +8,6 @@ import mineplex.core.common.util.UtilBlock;
|
|||||||
import mineplex.core.common.util.UtilEvent;
|
import mineplex.core.common.util.UtilEvent;
|
||||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||||
import mineplex.core.common.util.UtilInv;
|
import mineplex.core.common.util.UtilInv;
|
||||||
import mineplex.core.explosion.ExplosionEvent;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.game.games.lobbers.events.TNTThrowEvent;
|
import nautilus.game.arcade.game.games.lobbers.events.TNTThrowEvent;
|
||||||
@ -81,30 +79,6 @@ public class PerkWaller extends Perk
|
|||||||
_wallBlocks.addAll(buildWall(event.getClickedBlock().getLocation(), event.getPlayer().getLocation().getYaw()));
|
_wallBlocks.addAll(buildWall(event.getClickedBlock().getLocation(), event.getPlayer().getLocation().getYaw()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@EventHandler
|
|
||||||
public void explode(ExplosionEvent event)
|
|
||||||
{
|
|
||||||
if (!Manager.GetGame().IsLive())
|
|
||||||
return;
|
|
||||||
|
|
||||||
Iterator<Block> iterator = event.GetBlocks().iterator();
|
|
||||||
|
|
||||||
while (iterator.hasNext())
|
|
||||||
{
|
|
||||||
Block block = iterator.next();
|
|
||||||
|
|
||||||
if (_wallBlocks.contains(block.getLocation()))
|
|
||||||
{
|
|
||||||
if (block.getData() != 2)
|
|
||||||
{
|
|
||||||
block.setData((byte) 2);
|
|
||||||
iterator.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void explodeTNT(UpdateEvent event)
|
public void explodeTNT(UpdateEvent event)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user