Fixed issues that QA found

This commit is contained in:
Sam 2018-05-03 23:47:43 +01:00 committed by Alexander Meech
parent b28fb9a99d
commit 1b8f01d4d5
5 changed files with 18 additions and 11 deletions

View File

@ -38,7 +38,6 @@ import nautilus.game.arcade.game.games.christmas.Christmas;
import nautilus.game.arcade.game.games.christmasnew.ChristmasNew; import nautilus.game.arcade.game.games.christmasnew.ChristmasNew;
import nautilus.game.arcade.game.games.deathtag.DeathTag; import nautilus.game.arcade.game.games.deathtag.DeathTag;
import nautilus.game.arcade.game.games.dragonescape.DragonEscape; import nautilus.game.arcade.game.games.dragonescape.DragonEscape;
import nautilus.game.arcade.game.games.dragonescape.DragonEscapeTeams;
import nautilus.game.arcade.game.games.dragons.Dragons; import nautilus.game.arcade.game.games.dragons.Dragons;
import nautilus.game.arcade.game.games.dragons.DragonsTeams; import nautilus.game.arcade.game.games.dragons.DragonsTeams;
import nautilus.game.arcade.game.games.draw.Draw; import nautilus.game.arcade.game.games.draw.Draw;
@ -134,7 +133,6 @@ public enum GameType
}, false), }, false),
DeathTag(DeathTag.class, GameDisplay.DeathTag), DeathTag(DeathTag.class, GameDisplay.DeathTag),
DragonEscape(DragonEscape.class, GameDisplay.DragonEscape), DragonEscape(DragonEscape.class, GameDisplay.DragonEscape),
DragonEscapeTeams(DragonEscapeTeams.class, GameDisplay.DragonEscapeTeams),
Dragons(Dragons.class, GameDisplay.Dragons), Dragons(Dragons.class, GameDisplay.Dragons),
DragonsTeams(DragonsTeams.class, GameDisplay.DragonsTeams), DragonsTeams(DragonsTeams.class, GameDisplay.DragonsTeams),
Draw(Draw.class, GameDisplay.Draw, new Pair[] Draw(Draw.class, GameDisplay.Draw, new Pair[]
@ -219,7 +217,7 @@ public enum GameType
Event(EventGame.class, GameDisplay.Event, new GameType[]{ Event(EventGame.class, GameDisplay.Event, new GameType[]{
GameType.BaconBrawl, GameType.Barbarians, GameType.Bridge, GameType.Build, GameType.Build, GameType.BaconBrawl, GameType.Barbarians, GameType.Bridge, GameType.Build, GameType.Build,
GameType.CastleSiege, GameType.ChampionsDominate, GameType.ChampionsTDM, GameType.Christmas, GameType.CastleSiege, GameType.ChampionsDominate, GameType.ChampionsTDM, GameType.Christmas,
GameType.DeathTag, GameType.DragonEscape, GameType.DragonEscapeTeams, GameType.Dragons, GameType.DeathTag, GameType.DragonEscape, GameType.Dragons,
GameType.Draw, GameType.Evolution, GameType.Gravity, GameType.Halloween, GameType.HideSeek, GameType.Draw, GameType.Evolution, GameType.Gravity, GameType.Halloween, GameType.HideSeek,
GameType.Micro, GameType.MilkCow, GameType.MineStrike, GameType.BawkBawkBattles, GameType.Micro, GameType.MilkCow, GameType.MineStrike, GameType.BawkBawkBattles,
GameType.OldMineWare, GameType.Paintball, GameType.Quiver, GameType.QuiverTeams, GameType.Runner, GameType.OldMineWare, GameType.Paintball, GameType.Quiver, GameType.QuiverTeams, GameType.Runner,

View File

@ -46,7 +46,7 @@ public class PerkCrispyBacon extends Perk
Player player = event.getPlayer(); Player player = event.getPlayer();
ItemStack itemStack = player.getItemInHand(); ItemStack itemStack = player.getItemInHand();
if (!UtilItem.isAxe(itemStack) || !Recharge.Instance.use(player, GetName(), COOLDOWN, true, true)) if (!hasPerk(player) || !UtilItem.isAxe(itemStack) || !Recharge.Instance.use(player, GetName(), COOLDOWN, true, true))
{ {
return; return;
} }
@ -61,7 +61,7 @@ public class PerkCrispyBacon extends Perk
.setTitle(String.valueOf(UtilMath.r(1000))) .setTitle(String.valueOf(UtilMath.r(1000)))
.build()); .build());
item.setVelocity(new Vector((Math.random() - 0.5) * 0.3, 0.4, (Math.random() - 0.5) * 0.3)); item.setVelocity(new Vector((Math.random() - 0.5) * 0.3, 0.4, (Math.random() - 0.5) * 0.3));
Manager.GetFire().Add(item, player, 10, 1, 5, 2, GetName(), false); Manager.GetFire().Add(item, player, 10, 1, 2, 2, GetName(), false);
} }
} }

View File

@ -19,6 +19,7 @@ import org.bukkit.event.player.PlayerInteractEntityEvent;
import mineplex.core.Managers; import mineplex.core.Managers;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.F; import mineplex.core.common.util.F;
import mineplex.core.common.util.MapUtil;
import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilServer;
@ -99,6 +100,13 @@ public class DeathTag extends SoloGame
public void ParseData() public void ParseData()
{ {
_lights = WorldData.GetCustomLocs("89"); _lights = WorldData.GetCustomLocs("89");
_lights.forEach(location ->
{
if (Math.random() < 0.5)
{
MapUtil.QuickChangeBlockAt(location, Material.WOOL, (byte) 15);
}
});
} }
@Override @Override
@ -206,7 +214,7 @@ public class DeathTag extends SoloGame
@EventHandler @EventHandler
public void applyConditions(UpdateEvent event) public void applyConditions(UpdateEvent event)
{ {
if (event.getType() != UpdateType.SLOW || !IsLive()) if (event.getType() != UpdateType.SEC || !IsLive())
{ {
return; return;
} }

View File

@ -28,6 +28,7 @@ import org.bukkit.event.HandlerList;
import org.bukkit.event.block.Action; import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockDamageEvent; import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import org.bukkit.event.player.PlayerEvent; import org.bukkit.event.player.PlayerEvent;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -330,8 +331,7 @@ public class DragonEscape extends SoloGame
{ {
if (!_warpTime.containsKey(score.Player) || UtilTime.elapsed(_warpTime.get(score.Player), 1000)) if (!_warpTime.containsKey(score.Player) || UtilTime.elapsed(_warpTime.get(score.Player), 1000))
{ {
score.Player.damage(500); Manager.GetDamage().NewDamageEvent(player, null, null, DamageCause.CUSTOM, 500, false, true, true, GetName(), "Cheating");
UtilPlayer.message(player, F.main("Game", "You were killed for trying to cheat!"));
return false; return false;
} }
} }
@ -531,14 +531,15 @@ public class DragonEscape extends SoloGame
@EventHandler @EventHandler
public void Warp(PlayerInteractEvent event) public void Warp(PlayerInteractEvent event)
{ {
if (event.getAction() != Action.PHYSICAL || IsLive()) if (event.getAction() == Action.PHYSICAL || !IsLive())
{ {
return; return;
} }
Player player = event.getPlayer(); Player player = event.getPlayer();
ItemStack itemStack = player.getItemInHand();
if (!UtilInv.IsItem(player.getItemInHand(), Material.ENDER_PEARL, (byte) 0)) if (itemStack == null || itemStack.getType() != Material.ENDER_PEARL)
{ {
return; return;
} }

View File

@ -493,7 +493,7 @@ public class BombLobbers extends TeamGame implements IThrown
for (Player player : GetPlayers(true)) for (Player player : GetPlayers(true))
{ {
if (GetTeam(player).equals(getSide(player.getLocation()))) if (!GetTeam(player).equals(getSide(player.getLocation())))
{ {
Manager.GetDamage().NewDamageEvent(player, null, null, DamageCause.CUSTOM, 500, false, true, true, GetName(), "Cheating"); Manager.GetDamage().NewDamageEvent(player, null, null, DamageCause.CUSTOM, 500, false, true, true, GetName(), "Cheating");
} }