Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
5e47a12531
@ -143,6 +143,10 @@ public abstract class Game implements Listener
|
||||
public boolean WorldWeatherEnabled = false;
|
||||
public int WorldWaterDamage = 0;
|
||||
public boolean WorldBoundaryKill = true;
|
||||
public boolean WorldBlockBurn = false;
|
||||
public boolean WorldFireSpread = false;
|
||||
public boolean WorldLeavesDecay = false;
|
||||
public boolean WorldSoilTrample = false;
|
||||
|
||||
public int HungerSet = -1;
|
||||
public int HealthSet = -1;
|
||||
|
@ -145,13 +145,13 @@ public class DragonEscape extends SoloGame
|
||||
|
||||
@EventHandler
|
||||
public void MoveDragon(UpdateEvent event)
|
||||
{
|
||||
{
|
||||
if (event.getType() != UpdateType.TICK)
|
||||
return;
|
||||
|
||||
if (_dragonData == null)
|
||||
return;
|
||||
|
||||
|
||||
_dragonData.Target = _waypoints.get(Math.min(_waypoints.size()-1, (GetWaypointIndex(_dragonData.Location) + 1)));
|
||||
|
||||
_dragonData.Move();
|
||||
@ -165,11 +165,14 @@ public class DragonEscape extends SoloGame
|
||||
|
||||
if (block.isLiquid())
|
||||
blockIterator.remove();
|
||||
|
||||
else if (block.getRelative(BlockFace.UP).isLiquid())
|
||||
blockIterator.remove();
|
||||
|
||||
else if (WorldData.MapName.contains("Hell") && block.getY() < 30)
|
||||
blockIterator.remove();
|
||||
|
||||
else if (WorldData.MapName.contains("Pirate") && block.getY() < 4)
|
||||
else if (WorldData.MapName.contains("Pirate") && (block.getY() < 6))
|
||||
blockIterator.remove();
|
||||
}
|
||||
|
||||
|
@ -1315,18 +1315,6 @@ public class SurvivalGames extends SoloGame
|
||||
player.playSound(player.getLocation(), Sound.ENDERDRAGON_GROWL, 1f, 1f);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void CropTrample(PlayerInteractEvent event)
|
||||
{
|
||||
if (event.getAction() != Action.PHYSICAL)
|
||||
return;
|
||||
|
||||
if (event.getPlayer().getLocation().getBlock().getRelative(BlockFace.DOWN).getType() != Material.SOIL)
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void CompassUpdate(UpdateEvent event)
|
||||
{
|
||||
|
@ -34,6 +34,10 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.block.BlockBurnEvent;
|
||||
import org.bukkit.event.block.BlockFromToEvent;
|
||||
import org.bukkit.event.block.BlockIgniteEvent;
|
||||
import org.bukkit.event.block.BlockIgniteEvent.IgniteCause;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
@ -870,6 +874,64 @@ public class GameFlagManager implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void WorldSoilTrample(PlayerInteractEvent event)
|
||||
{
|
||||
if (event.getAction() != Action.PHYSICAL)
|
||||
return;
|
||||
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (game.WorldSoilTrample)
|
||||
return;
|
||||
|
||||
if (event.getPlayer().getLocation().getBlock().getRelative(BlockFace.DOWN).getType() != Material.SOIL)
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void WorldBlockBurn(BlockBurnEvent event)
|
||||
{
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (game.WorldBlockBurn)
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void WorldFireSpread(BlockIgniteEvent event)
|
||||
{
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (event.getCause() != IgniteCause.SPREAD)
|
||||
return;
|
||||
|
||||
if (game.WorldFireSpread)
|
||||
return;
|
||||
|
||||
if (event.getBlock().getType() == Material.FIRE)
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void WorldLeavesDecay(BlockFromToEvent event)
|
||||
{
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (game.WorldLeavesDecay)
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void SpectatorMessage(UpdateEvent event)
|
||||
{
|
||||
|
@ -1017,7 +1017,8 @@ public class GameLobbyManager implements IPacketRunnable, Listener
|
||||
if (ent.GetKit().GetAvailability() == KitAvailability.Free || //Free
|
||||
donor.OwnsUnknownPackage(Manager.GetGame().GetName() + " " + ent.GetKit().GetName()) || //Green
|
||||
donor.OwnsUnknownPackage(Manager.GetServerConfig().ServerType + " ULTRA") || //Old - Single Game Ultra
|
||||
Manager.GetClients().Get(player).GetRank().Has(Rank.HELPER)) //STAFF
|
||||
Manager.GetClients().Get(player).GetRank().Has(Rank.HELPER) || //STAFF
|
||||
Manager.GetServerConfig().Tournament) //Tournament
|
||||
{
|
||||
entityName = ent.GetKit().GetAvailability().GetColor() + entityName;
|
||||
}
|
||||
|
@ -317,7 +317,8 @@ public class GamePlayerManager implements Listener
|
||||
if (kit.GetAvailability() == KitAvailability.Free || //Free
|
||||
donor.OwnsUnknownPackage(Manager.GetGame().GetName() + " " + kit.GetName()) || //Green
|
||||
donor.OwnsUnknownPackage(Manager.GetServerConfig().ServerType + " ULTRA") || //OLD - Single Game Ultras
|
||||
Manager.GetClients().Get(player).GetRank().Has(Rank.HELPER)) //STAFF
|
||||
Manager.GetClients().Get(player).GetRank().Has(Rank.HELPER) || //STAFF
|
||||
Manager.GetServerConfig().Tournament) //Tournament
|
||||
{
|
||||
Manager.GetGame().SetKit(player, kit, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user