fixed a few skywars bugs
improved warning for bridges
This commit is contained in:
parent
9a0ac821a2
commit
4e06a1aae3
@ -46,6 +46,7 @@ import mineplex.core.common.util.MapUtil;
|
|||||||
import mineplex.core.common.util.UtilBlock;
|
import mineplex.core.common.util.UtilBlock;
|
||||||
import mineplex.core.common.util.UtilEvent;
|
import mineplex.core.common.util.UtilEvent;
|
||||||
import mineplex.core.common.util.UtilGear;
|
import mineplex.core.common.util.UtilGear;
|
||||||
|
import mineplex.core.common.util.UtilTextMiddle;
|
||||||
import mineplex.core.common.util.UtilWorld;
|
import mineplex.core.common.util.UtilWorld;
|
||||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
@ -238,7 +239,14 @@ public class Bridge extends TeamGame implements OreObsfucation
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (WorldWaterDamage > 0)
|
if (WorldWaterDamage > 0)
|
||||||
Announce(F.main(C.cWhite + C.Bold + "WARNING", C.cRed + C.Bold + "Water is very hot/cold and will hurt you!"));
|
{
|
||||||
|
if (WorldData.MapName.equals("Volcanic Islands"))
|
||||||
|
UtilTextMiddle.display(C.cRed + "Warning", "Water is Boiling Hot", 10, 60, 20);
|
||||||
|
else if (WorldData.MapName.equals("Icelands"))
|
||||||
|
UtilTextMiddle.display(C.cRed + "Warning", "Water is Freezing Cold", 10, 60, 20);
|
||||||
|
else
|
||||||
|
UtilTextMiddle.display(C.cRed + "Warning", "Water is Deadly", 10, 60, 20);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//parse
|
//parse
|
||||||
|
@ -21,6 +21,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.common.util.UtilTextMiddle;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||||
import mineplex.core.explosion.ExplosionEvent;
|
import mineplex.core.explosion.ExplosionEvent;
|
||||||
@ -477,6 +478,18 @@ public class Skywars extends SoloGame
|
|||||||
_lastChicken = System.currentTimeMillis();
|
_lastChicken = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void sandMapWarning(GameStateChangeEvent event)
|
||||||
|
{
|
||||||
|
if (event.GetState() != Game.GameState.Live)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (WorldData.MapName.equals("Sahara"))
|
||||||
|
{
|
||||||
|
UtilTextMiddle.display(C.cRed + "Warning", "Red Sand is Unstable", 10, 60, 20);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void createIslandOres(GameStateChangeEvent event)
|
public void createIslandOres(GameStateChangeEvent event)
|
||||||
{
|
{
|
||||||
@ -920,11 +933,11 @@ public class Skywars extends SoloGame
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void mobLoot(EntityDeathEvent event)
|
public void mobLoot(EntityDeathEvent event)
|
||||||
{
|
{
|
||||||
event.getDrops().clear();
|
|
||||||
|
|
||||||
//Zombie Loot
|
//Zombie Loot
|
||||||
if (event.getEntity() instanceof Zombie && _zombies.containsKey((Zombie)event.getEntity()))
|
if (event.getEntity() instanceof Zombie && _zombies.containsKey((Zombie)event.getEntity()))
|
||||||
{
|
{
|
||||||
|
event.getDrops().clear();
|
||||||
|
|
||||||
double r = Math.random();
|
double r = Math.random();
|
||||||
|
|
||||||
if (r > 0.80) event.getDrops().add(_middleArmor.getLoot());
|
if (r > 0.80) event.getDrops().add(_middleArmor.getLoot());
|
||||||
@ -935,6 +948,8 @@ public class Skywars extends SoloGame
|
|||||||
//Chicken Loot
|
//Chicken Loot
|
||||||
else if (event.getEntity() instanceof Chicken)
|
else if (event.getEntity() instanceof Chicken)
|
||||||
{
|
{
|
||||||
|
event.getDrops().clear();
|
||||||
|
|
||||||
event.getDrops().add(new ItemStack(Material.FEATHER, 1 + UtilMath.r(4)));
|
event.getDrops().add(new ItemStack(Material.FEATHER, 1 + UtilMath.r(4)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ import org.bukkit.block.BlockFace;
|
|||||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.entity.Projectile;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
@ -842,6 +843,14 @@ public class GameFlagManager implements Listener
|
|||||||
{
|
{
|
||||||
if (!game.isInsideMap(player) && game.IsAlive(player))
|
if (!game.isInsideMap(player) && game.IsAlive(player))
|
||||||
{
|
{
|
||||||
|
//Riding a Projectile, edgecase
|
||||||
|
if (player.getVehicle() != null && player.getVehicle() instanceof Projectile)
|
||||||
|
{
|
||||||
|
player.getVehicle().remove();
|
||||||
|
player.leaveVehicle();
|
||||||
|
((CraftPlayer)player).getHandle().spectating = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Manager.IsAlive(player) || ((CraftPlayer)player).getHandle().spectating)
|
if (!Manager.IsAlive(player) || ((CraftPlayer)player).getHandle().spectating)
|
||||||
{
|
{
|
||||||
player.teleport(game.GetSpectatorLocation());
|
player.teleport(game.GetSpectatorLocation());
|
||||||
|
Loading…
Reference in New Issue
Block a user