ms update
This commit is contained in:
parent
3122397f7a
commit
9de3981dec
@ -67,7 +67,6 @@ import mineplex.hub.modules.NewsManager;
|
||||
import mineplex.hub.modules.ParkourManager;
|
||||
import mineplex.hub.modules.SoccerManager;
|
||||
import mineplex.hub.modules.TextManager;
|
||||
import mineplex.hub.modules.TrickOrTreatManager;
|
||||
import mineplex.hub.modules.WorldManager;
|
||||
import mineplex.hub.profile.gui.GUIProfile;
|
||||
import mineplex.hub.tutorial.TutorialManager;
|
||||
|
@ -195,7 +195,8 @@ public abstract class Game implements Listener
|
||||
public boolean AutomaticRespawn = true;
|
||||
|
||||
public double DeathSpectateSecs = 0;
|
||||
|
||||
public boolean DeathTeleport = true;
|
||||
|
||||
public boolean QuitOut = true;
|
||||
public boolean QuitDropItems = false;
|
||||
|
||||
@ -209,6 +210,7 @@ public abstract class Game implements Listener
|
||||
public int WorldWaterDamage = 0;
|
||||
public boolean WorldBoundaryKill = true;
|
||||
public boolean WorldBlockBurn = false;
|
||||
public boolean WorldBlockGrow = false;
|
||||
public boolean WorldFireSpread = false;
|
||||
public boolean WorldLeavesDecay = false;
|
||||
public boolean WorldSoilTrample = false;
|
||||
|
@ -266,6 +266,8 @@ public class MineStrike extends TeamGame
|
||||
|
||||
this.ItemDrop = true;
|
||||
|
||||
this.DeathTeleport = false;
|
||||
|
||||
this.InventoryClick = true;
|
||||
|
||||
this.JoinInProgress = true;
|
||||
@ -390,6 +392,8 @@ public class MineStrike extends TeamGame
|
||||
{
|
||||
//Dont Get Hit By Bullets
|
||||
((CraftPlayer) event.getEntity()).getHandle().spectating = true;
|
||||
|
||||
Manager.GetCondition().Factory().Blind("Ghost", event.getEntity(), event.getEntity(), 2.5, 0, false, false, false);
|
||||
}
|
||||
|
||||
// public void disguiseSneak(Player player, GameTeam team)
|
||||
@ -2974,4 +2978,69 @@ public class MineStrike extends TeamGame
|
||||
_bombHolder = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location GetSpectatorLocation()
|
||||
{
|
||||
if (SpectatorSpawn != null)
|
||||
return SpectatorSpawn;
|
||||
|
||||
Vector vec = new Vector(0, 0, 0);
|
||||
double count = 0;
|
||||
|
||||
for (GameTeam team : this.GetTeamList())
|
||||
{
|
||||
for (Location spawn : team.GetSpawns())
|
||||
{
|
||||
count++;
|
||||
vec.add(spawn.toVector());
|
||||
}
|
||||
}
|
||||
|
||||
SpectatorSpawn = new Location(this.WorldData.World, 0, 0, 0);
|
||||
|
||||
vec.multiply(1d / count);
|
||||
|
||||
SpectatorSpawn.setX(vec.getX());
|
||||
SpectatorSpawn.setY(vec.getY() + 50); //ADD 50
|
||||
SpectatorSpawn.setZ(vec.getZ());
|
||||
|
||||
// Move Up - Out Of Blocks
|
||||
while (!UtilBlock.airFoliage(SpectatorSpawn.getBlock())
|
||||
|| !UtilBlock.airFoliage(SpectatorSpawn.getBlock().getRelative(BlockFace.UP)))
|
||||
{
|
||||
SpectatorSpawn.add(0, 1, 0);
|
||||
}
|
||||
|
||||
int Up = 0;
|
||||
|
||||
// Move Up - Through Air
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
if (UtilBlock.airFoliage(SpectatorSpawn.getBlock().getRelative(BlockFace.UP)))
|
||||
{
|
||||
SpectatorSpawn.add(0, 1, 0);
|
||||
Up++;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Move Down - Out Of Blocks
|
||||
while (Up > 0 && !UtilBlock.airFoliage(SpectatorSpawn.getBlock())
|
||||
|| !UtilBlock.airFoliage(SpectatorSpawn.getBlock().getRelative(BlockFace.UP)))
|
||||
{
|
||||
SpectatorSpawn.subtract(0, 1, 0);
|
||||
Up--;
|
||||
}
|
||||
|
||||
SpectatorSpawn = SpectatorSpawn.getBlock().getLocation().add(0.5, 0.1, 0.5);
|
||||
|
||||
while (SpectatorSpawn.getBlock().getTypeId() != 0 || SpectatorSpawn.getBlock().getRelative(BlockFace.UP).getTypeId() != 0)
|
||||
SpectatorSpawn.add(0, 1, 0);
|
||||
|
||||
return SpectatorSpawn;
|
||||
}
|
||||
}
|
||||
|
@ -78,8 +78,6 @@ public class Gun extends StrikeItem
|
||||
//600RPM
|
||||
if (_gunStats.getFireRate() <= 100 && _gunStats.getFireRate() > 50)
|
||||
{
|
||||
System.out.println(player.getName() + " 600 RPM");
|
||||
|
||||
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(game.Manager.getPlugin(), new Runnable()
|
||||
{
|
||||
public void run()
|
||||
@ -93,8 +91,6 @@ public class Gun extends StrikeItem
|
||||
//1200RPM
|
||||
if (_gunStats.getFireRate() <= 50)
|
||||
{
|
||||
System.out.println(player.getName() + " 1200 RPM");
|
||||
|
||||
for (int i=1 ; i<4 ; i++)
|
||||
{
|
||||
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(game.Manager.getPlugin(), new Runnable()
|
||||
|
@ -47,6 +47,7 @@ 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.BlockGrowEvent;
|
||||
import org.bukkit.event.block.BlockIgniteEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.block.LeavesDecayEvent;
|
||||
@ -675,7 +676,7 @@ public class GameFlagManager implements Listener
|
||||
final Player player = event.getEntity();
|
||||
|
||||
//Visual
|
||||
Manager.GetCondition().Factory().Blind("Ghost", player, player, 2, 0, false, false, false);
|
||||
Manager.GetCondition().Factory().Blind("Ghost", player, player, 2.5, 0, false, false, false);
|
||||
|
||||
player.setFireTicks(0);
|
||||
player.setFallDistance(0);
|
||||
@ -709,7 +710,7 @@ public class GameFlagManager implements Listener
|
||||
}
|
||||
else
|
||||
{
|
||||
Manager.addSpectator(player, true);
|
||||
Manager.addSpectator(player, game.DeathTeleport);
|
||||
}
|
||||
|
||||
Manager.getPlugin().getServer().getScheduler().scheduleSyncDelayedTask(Manager.getPlugin(), new Runnable()
|
||||
@ -730,7 +731,6 @@ public class GameFlagManager implements Listener
|
||||
time = game.GetTeam(player).GetRespawnTime();
|
||||
|
||||
UtilInv.Clear(player);
|
||||
Manager.GetCondition().Factory().Blind("Ghost", player, player, 1.5, 0, false, false, false);
|
||||
Manager.GetCondition().Factory().Cloak("Ghost", player, player, time, false, false);
|
||||
player.setAllowFlight(true);
|
||||
player.setFlying(true);
|
||||
@ -745,7 +745,7 @@ public class GameFlagManager implements Listener
|
||||
|
||||
if (!game.IsAlive(player))
|
||||
{
|
||||
Manager.addSpectator(player, true);
|
||||
Manager.addSpectator(player, game.DeathTeleport);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ public class GameFlagManager implements Listener
|
||||
}
|
||||
else
|
||||
{
|
||||
Manager.addSpectator(player, true);
|
||||
Manager.addSpectator(player, game.DeathTeleport);
|
||||
}
|
||||
|
||||
player.setFireTicks(0);
|
||||
@ -1096,6 +1096,18 @@ public class GameFlagManager implements Listener
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void WorldBlockBurn(BlockGrowEvent event)
|
||||
{
|
||||
Game game = Manager.GetGame();
|
||||
if (game == null) return;
|
||||
|
||||
if (game.WorldBlockGrow)
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void WorldFireSpread(BlockIgniteEvent event)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user