Update 1.13
This commit is contained in:
parent
3ab29fb333
commit
edbe0c06d3
10
pom.xml
10
pom.xml
@ -2,13 +2,13 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>nl.Steffion</groupId>
|
<groupId>nl.Steffion</groupId>
|
||||||
<artifactId>BlockHunt</artifactId>
|
<artifactId>BlockHunt</artifactId>
|
||||||
<version>0.3.0-SNAPSHOT</version>
|
<version>0.4.0-SNAPSHOT</version>
|
||||||
<name>BlockHunt</name>
|
<name>BlockHunt</name>
|
||||||
<properties>
|
<properties>
|
||||||
<plugin.version>${project.version}-${buildnumber}</plugin.version>
|
<plugin.version>${project.version}-${buildnumber}</plugin.version>
|
||||||
<buildnumber />
|
<buildnumber />
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<spigot.version>1.12.2-R0.1-SNAPSHOT</spigot.version>
|
<spigot.version>1.13.1-R0.1-SNAPSHOT</spigot.version>
|
||||||
</properties>
|
</properties>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:AddstarMC/Blockhunt.git</connection>
|
<connection>scm:git:git@github.com:AddstarMC/Blockhunt.git</connection>
|
||||||
@ -51,6 +51,10 @@
|
|||||||
<repository>
|
<repository>
|
||||||
<id>md_5-releases</id>
|
<id>md_5-releases</id>
|
||||||
<url>http://repo.md-5.net/content/repositories/releases/</url>
|
<url>http://repo.md-5.net/content/repositories/releases/</url>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>md_5-snapshots</id>
|
||||||
|
<url>http://repo.md-5.net/content/repositories/snapshots/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>dmulloy2-repo</id>
|
<id>dmulloy2-repo</id>
|
||||||
@ -68,7 +72,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>LibsDisguises</groupId>
|
<groupId>LibsDisguises</groupId>
|
||||||
<artifactId>LibsDisguises</artifactId>
|
<artifactId>LibsDisguises</artifactId>
|
||||||
<version>9.5.1-SNAPSHOT</version>
|
<version>9.6.0-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
@ -316,9 +316,9 @@ public class ArenaHandler {
|
|||||||
if (MemoryStorage.hiddenLocWater.get(player) != null) {
|
if (MemoryStorage.hiddenLocWater.get(player) != null) {
|
||||||
Block pBlock = MemoryStorage.hiddenLoc.get(player).getBlock();
|
Block pBlock = MemoryStorage.hiddenLoc.get(player).getBlock();
|
||||||
if (MemoryStorage.hiddenLocWater.get(player)) {
|
if (MemoryStorage.hiddenLocWater.get(player)) {
|
||||||
pl.sendBlockChange(pBlock.getLocation(), Material.STATIONARY_WATER, (byte) 0);
|
pl.sendBlockChange(pBlock.getLocation(), Bukkit.createBlockData(Material.WATER));
|
||||||
} else {
|
} else {
|
||||||
pl.sendBlockChange(pBlock.getLocation(), Material.AIR, (byte) 0);
|
pl.sendBlockChange(pBlock.getLocation(),Bukkit.createBlockData(Material.AIR));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -272,7 +272,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
|||||||
MemoryStorage.choosenBlock.remove(arenaPlayer);
|
MemoryStorage.choosenBlock.remove(arenaPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
MiscDisguise disguise = new MiscDisguise(DisguiseType.FALLING_BLOCK, block.getTypeId(), block.getDurability());
|
MiscDisguise disguise = new MiscDisguise(DisguiseType.FALLING_BLOCK, block.getType(),0);
|
||||||
DisguiseAPI.disguiseToAll(arenaPlayer, disguise);
|
DisguiseAPI.disguiseToAll(arenaPlayer, disguise);
|
||||||
|
|
||||||
arenaPlayer.teleport(arena.hidersWarp);
|
arenaPlayer.teleport(arena.hidersWarp);
|
||||||
@ -325,7 +325,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
|||||||
arena.timer = arena.timer - 1;
|
arena.timer = arena.timer - 1;
|
||||||
if (arena.timer > 0) {
|
if (arena.timer > 0) {
|
||||||
if (arena.timer == arena.gameTime - arena.timeUntilHidersSword) {
|
if (arena.timer == arena.gameTime - arena.timeUntilHidersSword) {
|
||||||
ItemStack sword = new ItemStack(Material.WOOD_SWORD, 1);
|
ItemStack sword = new ItemStack(Material.WOODEN_SWORD, 1);
|
||||||
sword.addUnsafeEnchantment(Enchantment.KNOCKBACK, 1);
|
sword.addUnsafeEnchantment(Enchantment.KNOCKBACK, 1);
|
||||||
for (Player arenaPlayer : arena.playersInArena) {
|
for (Player arenaPlayer : arena.playersInArena) {
|
||||||
if (!arena.seekers.contains(arenaPlayer)) {
|
if (!arena.seekers.contains(arenaPlayer)) {
|
||||||
@ -401,8 +401,8 @@ public class BlockHunt extends JavaPlugin implements Listener {
|
|||||||
} else {
|
} else {
|
||||||
Block pBlock = player.getLocation().getBlock();
|
Block pBlock = player.getLocation().getBlock();
|
||||||
if (pBlock.getType().equals(Material.AIR) || pBlock.getType().equals(Material.WATER)
|
if (pBlock.getType().equals(Material.AIR) || pBlock.getType().equals(Material.WATER)
|
||||||
|| pBlock.getType().equals(Material.STATIONARY_WATER)) {
|
|| pBlock.getType().equals(Material.WATER)) {
|
||||||
if (pBlock.getType().equals(Material.WATER) || pBlock.getType().equals(Material.STATIONARY_WATER)) {
|
if (pBlock.getType().equals(Material.WATER) || pBlock.getType().equals(Material.WATER)) {
|
||||||
MemoryStorage.hiddenLocWater.put(player, true);
|
MemoryStorage.hiddenLocWater.put(player, true);
|
||||||
} else {
|
} else {
|
||||||
MemoryStorage.hiddenLocWater.put(player, false);
|
MemoryStorage.hiddenLocWater.put(player, false);
|
||||||
|
@ -30,7 +30,7 @@ public class CMDremove extends DefaultCMD {
|
|||||||
Location signLoc = (Location) MemoryStorage.signs.getFile().get(sign + ".location");
|
Location signLoc = (Location) MemoryStorage.signs.getFile().get(sign + ".location");
|
||||||
signLoc.getBlock().setType(Material.AIR);
|
signLoc.getBlock().setType(Material.AIR);
|
||||||
signLoc.getWorld().playEffect(signLoc, Effect.MOBSPAWNER_FLAMES, 0);
|
signLoc.getWorld().playEffect(signLoc, Effect.MOBSPAWNER_FLAMES, 0);
|
||||||
signLoc.getWorld().playSound(signLoc, Sound.ENTITY_ENDERDRAGON_FLAP, 1, 1);
|
signLoc.getWorld().playSound(signLoc, Sound.ENTITY_ENDER_DRAGON_FLAP, 1, 1);
|
||||||
MemoryStorage.signs.getFile().set(sign, null);
|
MemoryStorage.signs.getFile().set(sign, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ public class OnInventoryClickEvent implements Listener {
|
|||||||
if (inv.getName().contains("DisguiseBlocks")) {
|
if (inv.getName().contains("DisguiseBlocks")) {
|
||||||
if (event.getCurrentItem() != null) {
|
if (event.getCurrentItem() != null) {
|
||||||
if (!event.getCurrentItem().getType().isBlock()) {
|
if (!event.getCurrentItem().getType().isBlock()) {
|
||||||
if (!event.getCurrentItem().getType().equals(Material.FLOWER_POT_ITEM)) {
|
if (!event.getCurrentItem().getType().equals(Material.FLOWER_POT)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
MessageManager.sendFMessage(player, ConfigC.error_setNotABlock);
|
MessageManager.sendFMessage(player, ConfigC.error_setNotABlock);
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ public class OnInventoryClickEvent implements Listener {
|
|||||||
} else if (inv.getName().contains(MessageManager.replaceAll((String) MemoryStorage.config.get(ConfigC.shop_BlockHuntPassv2Name)))) {
|
} else if (inv.getName().contains(MessageManager.replaceAll((String) MemoryStorage.config.get(ConfigC.shop_BlockHuntPassv2Name)))) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
if (event.getCurrentItem().getType() != Material.AIR) {
|
if (event.getCurrentItem().getType() != Material.AIR) {
|
||||||
if (event.getCurrentItem().getType().equals(Material.WOOL) && event.getCurrentItem().getDurability() == (short) 11) {
|
if (event.getCurrentItem().getType().equals(Material.BLUE_WOOL)) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Arena arena : MemoryStorage.arenaList) {
|
for (Arena arena : MemoryStorage.arenaList) {
|
||||||
if (arena.playersInArena.contains(player)) {
|
if (arena.playersInArena.contains(player)) {
|
||||||
@ -135,7 +135,7 @@ public class OnInventoryClickEvent implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (event.getCurrentItem().getType().equals(Material.WOOL) && event.getCurrentItem().getDurability() == (short) 14) {
|
} else if (event.getCurrentItem().getType().equals(Material.RED_WOOL)) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Arena arena : MemoryStorage.arenaList) {
|
for (Arena arena : MemoryStorage.arenaList) {
|
||||||
if (arena.playersInArena.contains(player)) {
|
if (arena.playersInArena.contains(player)) {
|
||||||
|
@ -36,7 +36,7 @@ public class OnInventoryCloseEvent implements Listener {
|
|||||||
for (ItemStack item : inv.getContents()) {
|
for (ItemStack item : inv.getContents()) {
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
if (!item.getType().equals(Material.PAPER)) {
|
if (!item.getType().equals(Material.PAPER)) {
|
||||||
if (item.getType().equals(Material.FLOWER_POT_ITEM)) {
|
if (item.getType().equals(Material.FLOWER_POT)) {
|
||||||
blocks.add(new ItemStack(Material.FLOWER_POT));
|
blocks.add(new ItemStack(Material.FLOWER_POT));
|
||||||
} else {
|
} else {
|
||||||
blocks.add(item);
|
blocks.add(item);
|
||||||
|
@ -63,7 +63,7 @@ public class OnPlayerInteractEvent implements Listener {
|
|||||||
|
|
||||||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
if (event.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||||
if (event.getClickedBlock() != null) {
|
if (event.getClickedBlock() != null) {
|
||||||
if (event.getClickedBlock().getType().equals(Material.SIGN_POST) || event.getClickedBlock().getType().equals(Material.WALL_SIGN)) {
|
if (event.getClickedBlock().getType().equals(Material.SIGN) || event.getClickedBlock().getType().equals(Material.WALL_SIGN)) {
|
||||||
if (SignsHandler.isSign(event.getClickedBlock().getLocation())) {
|
if (SignsHandler.isSign(event.getClickedBlock().getLocation())) {
|
||||||
Sign sign = (Sign) event.getClickedBlock().getState();
|
Sign sign = (Sign) event.getClickedBlock().getState();
|
||||||
if (sign.getLine(1) != null) {
|
if (sign.getLine(1) != null) {
|
||||||
@ -92,7 +92,7 @@ public class OnPlayerInteractEvent implements Listener {
|
|||||||
|
|
||||||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
if (event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
||||||
if (event.getClickedBlock().getType() != Material.AIR) {
|
if (event.getClickedBlock().getType() != Material.AIR) {
|
||||||
if (event.getClickedBlock().getType().equals(Material.ENCHANTMENT_TABLE) || event.getClickedBlock().getType().equals(Material.WORKBENCH)
|
if (event.getClickedBlock().getType().equals(Material.ENCHANTING_TABLE) || event.getClickedBlock().getType().equals(Material.CRAFTING_TABLE)
|
||||||
|| event.getClickedBlock().getType().equals(Material.FURNACE) || event.getClickedBlock().getType().equals(Material.CHEST)
|
|| event.getClickedBlock().getType().equals(Material.FURNACE) || event.getClickedBlock().getType().equals(Material.CHEST)
|
||||||
|| event.getClickedBlock().getType().equals(Material.ANVIL) || event.getClickedBlock().getType().equals(Material.ENDER_CHEST)
|
|| event.getClickedBlock().getType().equals(Material.ANVIL) || event.getClickedBlock().getType().equals(Material.ENDER_CHEST)
|
||||||
|| event.getClickedBlock().getType().equals(Material.JUKEBOX) || block.getRelative(event.getBlockFace()).getType().equals(Material.FIRE)) {
|
|| event.getClickedBlock().getType().equals(Material.JUKEBOX) || block.getRelative(event.getBlockFace()).getType().equals(Material.FIRE)) {
|
||||||
@ -142,13 +142,13 @@ public class OnPlayerInteractEvent implements Listener {
|
|||||||
|
|
||||||
if (item.getItemMeta().getDisplayName().equals(MessageManager.replaceAll((String) MemoryStorage.config.get(ConfigC.shop_BlockHuntPassv2Name)))) {
|
if (item.getItemMeta().getDisplayName().equals(MessageManager.replaceAll((String) MemoryStorage.config.get(ConfigC.shop_BlockHuntPassv2Name)))) {
|
||||||
Inventory BlockHuntPass = Bukkit.createInventory(null, 9, MessageManager.replaceAll("\u00A7r" + MemoryStorage.config.get(ConfigC.shop_BlockHuntPassv2Name)));
|
Inventory BlockHuntPass = Bukkit.createInventory(null, 9, MessageManager.replaceAll("\u00A7r" + MemoryStorage.config.get(ConfigC.shop_BlockHuntPassv2Name)));
|
||||||
ItemStack BlockHuntPassSEEKER = new ItemStack(Material.WOOL, 1, (short) 11);
|
ItemStack BlockHuntPassSEEKER = new ItemStack(Material.BLUE_WOOL, 1);
|
||||||
ItemMeta BlockHuntPassIM = BlockHuntPassSEEKER.getItemMeta();
|
ItemMeta BlockHuntPassIM = BlockHuntPassSEEKER.getItemMeta();
|
||||||
BlockHuntPassIM.setDisplayName(MessageManager.replaceAll("&eSEEKER"));
|
BlockHuntPassIM.setDisplayName(MessageManager.replaceAll("&eSEEKER"));
|
||||||
BlockHuntPassSEEKER.setItemMeta(BlockHuntPassIM);
|
BlockHuntPassSEEKER.setItemMeta(BlockHuntPassIM);
|
||||||
BlockHuntPass.setItem(1, BlockHuntPassSEEKER);
|
BlockHuntPass.setItem(1, BlockHuntPassSEEKER);
|
||||||
|
|
||||||
ItemStack BlockHuntPassHIDER = new ItemStack(Material.WOOL, 1, (short) 14);
|
ItemStack BlockHuntPassHIDER = new ItemStack(Material.RED_WOOL, 1);
|
||||||
BlockHuntPassIM.setDisplayName(MessageManager.replaceAll("&eHIDER"));
|
BlockHuntPassIM.setDisplayName(MessageManager.replaceAll("&eHIDER"));
|
||||||
BlockHuntPassHIDER.setItemMeta(BlockHuntPassIM);
|
BlockHuntPassHIDER.setItemMeta(BlockHuntPassIM);
|
||||||
BlockHuntPass.setItem(7, BlockHuntPassHIDER);
|
BlockHuntPass.setItem(7, BlockHuntPassHIDER);
|
||||||
|
@ -92,7 +92,7 @@ public class SignsHandler {
|
|||||||
MemoryStorage.signs.load();
|
MemoryStorage.signs.load();
|
||||||
for (String sign : MemoryStorage.signs.getFile().getKeys(false)) {
|
for (String sign : MemoryStorage.signs.getFile().getKeys(false)) {
|
||||||
Location loc = (Location) MemoryStorage.signs.getFile().get(sign + ".location");
|
Location loc = (Location) MemoryStorage.signs.getFile().get(sign + ".location");
|
||||||
if (loc.getBlock().getType().equals(Material.SIGN_POST) || loc.getBlock().getType().equals(Material.WALL_SIGN)) {
|
if (loc.getBlock().getType().equals(Material.SIGN) || loc.getBlock().getType().equals(Material.WALL_SIGN)) {
|
||||||
Sign signblock = (Sign) loc.getBlock().getState();
|
Sign signblock = (Sign) loc.getBlock().getState();
|
||||||
String[] lines = signblock.getLines();
|
String[] lines = signblock.getLines();
|
||||||
if (sign.contains("leave")) {
|
if (sign.contains("leave")) {
|
||||||
|
@ -35,12 +35,12 @@ public class SolidBlockHandler {
|
|||||||
if (!pl.equals(player)) {
|
if (!pl.equals(player)) {
|
||||||
if (MemoryStorage.hiddenLocWater.get(player) != null) {
|
if (MemoryStorage.hiddenLocWater.get(player) != null) {
|
||||||
if (MemoryStorage.hiddenLocWater.get(player)) {
|
if (MemoryStorage.hiddenLocWater.get(player)) {
|
||||||
pl.sendBlockChange(pBlock.getLocation(), Material.STATIONARY_WATER, (byte) 0);
|
pl.sendBlockChange(pBlock.getLocation(), Bukkit.createBlockData(Material.WATER));
|
||||||
} else {
|
} else {
|
||||||
pl.sendBlockChange(pBlock.getLocation(), Material.AIR, (byte) 0);
|
pl.sendBlockChange(pBlock.getLocation(), Bukkit.createBlockData(Material.AIR));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pl.sendBlockChange(pBlock.getLocation(), Material.AIR, (byte) 0);
|
pl.sendBlockChange(pBlock.getLocation(), Bukkit.createBlockData(Material.AIR));
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryStorage.hiddenLocWater.remove(player);
|
MemoryStorage.hiddenLocWater.remove(player);
|
||||||
@ -54,7 +54,7 @@ public class SolidBlockHandler {
|
|||||||
playerShow.showPlayer(player);
|
playerShow.showPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
MiscDisguise disguise = new MiscDisguise(DisguiseType.FALLING_BLOCK, block.getTypeId(), block.getDurability());
|
MiscDisguise disguise = new MiscDisguise(DisguiseType.FALLING_BLOCK, block.getType(), 0);
|
||||||
DisguiseAPI.disguiseToAll(player, disguise);
|
DisguiseAPI.disguiseToAll(player, disguise);
|
||||||
|
|
||||||
MessageManager.sendFMessage(player, ConfigC.normal_ingameNoMoreSolid);
|
MessageManager.sendFMessage(player, ConfigC.normal_ingameNoMoreSolid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user