mirror of https://github.com/taoneill/war.git
Initial 1.14 support
This commit is contained in:
parent
7b982c2687
commit
15513b96fd
|
@ -107,7 +107,7 @@
|
|||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.13-R0.1-SNAPSHOT</version>
|
||||
<version>1.14-R0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
|
|
|
@ -327,7 +327,7 @@ public class Team {
|
|||
this.getTeamConfig().resolveInt(
|
||||
TeamConfig.LIFEPOOL)).split("\n");
|
||||
}
|
||||
signBlock.setType(Material.SIGN);
|
||||
signBlock.setType(Material.OAK_SIGN);
|
||||
org.bukkit.block.Sign block = (org.bukkit.block.Sign) signBlock
|
||||
.getState();
|
||||
org.bukkit.material.Sign data = (Sign) block.getData();
|
||||
|
|
|
@ -334,7 +334,7 @@ public class WarPlayerListener implements Listener {
|
|||
latestLocations.put(player.getName(), playerLoc);
|
||||
|
||||
// Signs can automatically teleport you to specific or random warzones
|
||||
if (playerLoc.getBlock().getType() == Material.SIGN) {
|
||||
if (playerLoc.getBlock().getType() == Material.OAK_SIGN) {
|
||||
Sign sign = (Sign) playerLoc.getBlock().getState();
|
||||
if (sign.getLine(0).equals("[zone]")) {
|
||||
Warzone indicated = Warzone.getZoneByName(sign.getLine(1));
|
||||
|
|
|
@ -213,7 +213,7 @@ public class WarHub {
|
|||
}
|
||||
|
||||
// War hub sign
|
||||
locationBlock.getRelative(front, 2).setType(Material.SIGN);
|
||||
locationBlock.getRelative(front, 2).setType(Material.OAK_SIGN);
|
||||
String[] lines = War.war.getString("sign.warhub").split("\n");
|
||||
org.bukkit.block.Sign locationBlockFront = (org.bukkit.block.Sign) locationBlock.getRelative(front, 2).getState();
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
@ -256,7 +256,7 @@ public class WarHub {
|
|||
|
||||
Block zoneGate = this.zoneGateBlocks.get(zone.getName());
|
||||
if (zoneGate != null) {
|
||||
zoneGate.getRelative(BlockFace.UP, 2).getRelative(back, 1).setType(Material.WALL_SIGN);
|
||||
zoneGate.getRelative(BlockFace.UP, 2).getRelative(back, 1).setType(Material.OAK_WALL_SIGN);
|
||||
org.bukkit.block.Sign block = (org.bukkit.block.Sign) zoneGate.getRelative(BlockFace.UP, 2).getRelative(back, 1).getState();
|
||||
org.bukkit.material.Sign data = (Sign) block.getData();
|
||||
data.setFacingDirection(this.getOrientation().getOppositeFace());
|
||||
|
|
|
@ -368,7 +368,7 @@ public class ZoneLobby {
|
|||
|
||||
// set zone sign
|
||||
Block zoneSignBlock = this.lobbyMiddleWallBlock.getBlock().getRelative(this.wall, 4);
|
||||
zoneSignBlock.setType(Material.SIGN);
|
||||
zoneSignBlock.setType(Material.OAK_SIGN);
|
||||
org.bukkit.block.Sign block = (org.bukkit.block.Sign) zoneSignBlock.getState();
|
||||
org.bukkit.material.Sign data = (Sign) block.getData();
|
||||
data.setFacingDirection(this.wall);
|
||||
|
@ -768,11 +768,12 @@ public class ZoneLobby {
|
|||
block = gate.getRelative(direction).getRelative(BlockFace.UP, 2);
|
||||
}
|
||||
|
||||
block.setType(Material.WALL_SIGN);
|
||||
block.setType(Material.OAK_WALL_SIGN);
|
||||
org.bukkit.block.Sign state = (org.bukkit.block.Sign) block.getState();
|
||||
org.bukkit.material.Sign data = (Sign) state.getData();
|
||||
data.setFacingDirection(direction);
|
||||
state.setData(data);
|
||||
org.bukkit.block.data.type.WallSign data = (org.bukkit.block.data.type.WallSign) block.getBlockData();
|
||||
data.setFacing(direction);
|
||||
|
||||
state.setBlockData(data);
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
state.setLine(i, lines[i]);
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ public class ZoneWallGuard {
|
|||
Material.TALL_GRASS,
|
||||
Material.VINE,
|
||||
Material.LILY_PAD,
|
||||
Material.DANDELION_YELLOW,
|
||||
Material.ROSE_RED,
|
||||
Material.YELLOW_DYE,
|
||||
Material.RED_DYE,
|
||||
Material.RED_MUSHROOM,
|
||||
Material.BROWN_MUSHROOM,
|
||||
Material.DEAD_BUSH,
|
||||
|
|
|
@ -58,7 +58,7 @@ public class UIManager implements Listener {
|
|||
|
||||
if (uiMap.containsKey(player)) {
|
||||
ChestUI ui = uiMap.get(player);
|
||||
if (inventory.getName().equals(ui.getTitle())) {
|
||||
if (event.getView().getTitle().equals(ui.getTitle())) {
|
||||
if (ui.processClick(clicked, inventory)) {
|
||||
event.setCancelled(true);
|
||||
player.closeInventory();
|
||||
|
|
Loading…
Reference in New Issue