Final bug changes.
This commit is contained in:
parent
571d992dbe
commit
f21ca35638
@ -148,6 +148,10 @@ public class Evolution extends SoloGame
|
|||||||
|
|
||||||
DeathMessages = false;
|
DeathMessages = false;
|
||||||
|
|
||||||
|
this.InventoryClick = false;
|
||||||
|
|
||||||
|
this.InventoryOpenBlock = false;
|
||||||
|
|
||||||
Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.Attack);
|
Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.Attack);
|
||||||
|
|
||||||
registerStatTrackers(
|
registerStatTrackers(
|
||||||
@ -768,7 +772,7 @@ public class Evolution extends SoloGame
|
|||||||
int index = 0;
|
int index = 0;
|
||||||
for (Player player : GetPlayers(true))
|
for (Player player : GetPlayers(true))
|
||||||
{
|
{
|
||||||
if (index > 12)
|
if (index > 11)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Scoreboard.WriteOrdered("Score", C.cGreen + player.getName(), getScore(player), true);
|
Scoreboard.WriteOrdered("Score", C.cGreen + player.getName(), getScore(player), true);
|
||||||
|
@ -133,7 +133,7 @@ public class EvolveData
|
|||||||
private void setupViewingToken(EntityInsentient ent)
|
private void setupViewingToken(EntityInsentient ent)
|
||||||
{
|
{
|
||||||
Location playerEye = _token.Viewing.clone().add(.5, .62, .5);
|
Location playerEye = _token.Viewing.clone().add(.5, .62, .5);
|
||||||
Location entityHalf = _token.Platform.clone().add(.5, -1, .5).add(0, (ent.boundingBox.e - ent.boundingBox.b) / 2, 0);
|
Location entityHalf = _token.Platform.clone().add(.5, -1, .5).add(0, (ent.boundingBox.e - ent.boundingBox.b) * .75, 0);
|
||||||
|
|
||||||
Vector viewing = UtilAlg.getTrajectory(playerEye, entityHalf);
|
Vector viewing = UtilAlg.getTrajectory(playerEye, entityHalf);
|
||||||
_token.Viewing.setPitch(UtilAlg.GetPitch(viewing));
|
_token.Viewing.setPitch(UtilAlg.GetPitch(viewing));
|
||||||
@ -167,8 +167,36 @@ public class EvolveData
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
private void setupPlayer()
|
private void setupPlayer()
|
||||||
|
{
|
||||||
|
if (_token.Viewing.getX() != _player.getLocation().getX())
|
||||||
{
|
{
|
||||||
_player.teleport(_token.Viewing);
|
_player.teleport(_token.Viewing);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_token.Viewing.getY() != _player.getLocation().getY())
|
||||||
|
{
|
||||||
|
_player.teleport(_token.Viewing);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_token.Viewing.getZ() != _player.getLocation().getZ())
|
||||||
|
{
|
||||||
|
_player.teleport(_token.Viewing);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_token.Viewing.getPitch() != _player.getLocation().getPitch())
|
||||||
|
{
|
||||||
|
_player.teleport(_token.Viewing);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_token.Viewing.getYaw() != _player.getLocation().getYaw())
|
||||||
|
{
|
||||||
|
_player.teleport(_token.Viewing);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// _player.teleport(_token.Store);
|
// _player.teleport(_token.Store);
|
||||||
// _player.teleport(_token.Viewing);
|
// _player.teleport(_token.Viewing);
|
||||||
|
@ -23,8 +23,8 @@ import nautilus.game.arcade.GameType;
|
|||||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||||
import nautilus.game.arcade.events.PlayerDeathOutEvent;
|
import nautilus.game.arcade.events.PlayerDeathOutEvent;
|
||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import nautilus.game.arcade.game.GameTeam;
|
|
||||||
import nautilus.game.arcade.game.Game.GameState;
|
import nautilus.game.arcade.game.Game.GameState;
|
||||||
|
import nautilus.game.arcade.game.GameTeam;
|
||||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||||
import nautilus.game.arcade.kit.perks.event.PerkDestructorBlockEvent;
|
import nautilus.game.arcade.kit.perks.event.PerkDestructorBlockEvent;
|
||||||
|
|
||||||
@ -33,6 +33,8 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
|
import org.bukkit.block.Chest;
|
||||||
|
import org.bukkit.block.DoubleChest;
|
||||||
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;
|
||||||
@ -46,8 +48,8 @@ import org.bukkit.event.block.BlockIgniteEvent;
|
|||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.event.block.LeavesDecayEvent;
|
import org.bukkit.event.block.LeavesDecayEvent;
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||||
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
import org.bukkit.event.inventory.InventoryOpenEvent;
|
import org.bukkit.event.inventory.InventoryOpenEvent;
|
||||||
import org.bukkit.event.inventory.InventoryType;
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
@ -287,8 +289,19 @@ public class GameFlagManager implements Listener
|
|||||||
event.getInventory().getType() == InventoryType.HOPPER ||
|
event.getInventory().getType() == InventoryType.HOPPER ||
|
||||||
event.getInventory().getType() == InventoryType.MERCHANT ||
|
event.getInventory().getType() == InventoryType.MERCHANT ||
|
||||||
event.getInventory().getType() == InventoryType.ENDER_CHEST ||
|
event.getInventory().getType() == InventoryType.ENDER_CHEST ||
|
||||||
event.getInventory().getType() == InventoryType.WORKBENCH)
|
event.getInventory().getType() == InventoryType.WORKBENCH ||
|
||||||
|
event.getInventory().getType() == InventoryType.CHEST)
|
||||||
{
|
{
|
||||||
|
if (event.getInventory().getType() == InventoryType.CHEST)
|
||||||
|
{
|
||||||
|
if (event.getInventory().getHolder() instanceof Chest) || !(event.getInventory() instanceof DoubleChest))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
event.getPlayer().closeInventory();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
event.getPlayer().closeInventory();
|
event.getPlayer().closeInventory();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user