Update to 1.9

This commit is contained in:
addstar 2016-04-09 13:12:00 +10:00
parent 56f0844e1c
commit 6ce4d1ca26
9 changed files with 53 additions and 51 deletions

46
pom.xml
View File

@ -6,31 +6,38 @@
<name>BlockHunt</name>
<repositories>
<!-- Repository for Bukkit -->
<!-- Addstar repos -->
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public/</url>
<id>addstar-repo</id>
<url>http://maven.addstar.com.au/artifactory/ext-release-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>bukkit-maven</id>
<url>http://repo.bukkit.org/content/repositories/releases/</url>
<id>addstar-snapshot-repo</id>
<url>http://maven.addstar.com.au/artifactory/ext-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<!-- For spigot -->
<repository>
<id>md5-repo</id>
<url>http://repo.md-5.net/content/groups/public/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<!-- Other repositories -->
<repository>
<id>maven-central</id>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<!-- Addstar repo -->
<repository>
<id>addstar-repo</id>
<url>http://maven.addstar.com.au/artifactory/ext-release-local</url>
</repository>
</repositories>
<dependencies>
@ -38,21 +45,14 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.7.9-R0.2-SNAPSHOT</version>
<version>1.9-R0.1-SNAPSHOT</version>
</dependency>
<!-- CraftBukkit Dependency for experimental features
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.7.9-R0.1-SNAPSHOT</version>
</dependency>-->
<!-- LibsDiguises is required for hiding -->
<dependency>
<groupId>me.libraryaddict</groupId>
<groupId>me.libraryaddict.disguise</groupId>
<artifactId>LibsDisguises</artifactId>
<version>7.6.4</version>
<version>9.0.2</version>
</dependency>
</dependencies>

View File

@ -78,8 +78,10 @@ public class ArenaHandler {
}
for (ItemStack invitem : player.getInventory().getArmorContents()) {
if (invitem.getType() != Material.AIR) {
inventoryempty = false;
if (invitem != null) {
if (invitem.getType() != Material.AIR) {
inventoryempty = false;
}
}
}
@ -385,7 +387,7 @@ public class ArenaHandler {
for (Player player : arena.playersInArena) {
playerLeaveArena(player, false, false);
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1, 1);
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 1, 1);
}
arena.gameState = ArenaState.WAITING;
@ -434,7 +436,7 @@ public class ArenaHandler {
for (Player player : arena.playersInArena) {
playerLeaveArena(player, false, false);
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1, 1);
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 1, 1);
}
arena.gameState = ArenaState.WAITING;
@ -450,7 +452,7 @@ public class ArenaHandler {
for (Player player : arena.playersInArena) {
playerLeaveArena(player, false, false);
player.playSound(player.getLocation(), Sound.LEVEL_UP, 1, 1);
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 1, 1);
}
arena.gameState = ArenaState.WAITING;

View File

@ -208,19 +208,19 @@ public class BlockHunt extends JavaPlugin implements Listener {
} else if (arena.timer == 10) {
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-10");
} else if (arena.timer == 5) {
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ORB_PICKUP, 1, 0);
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 0);
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-5");
} else if (arena.timer == 4) {
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ORB_PICKUP, 1, 0);
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 0);
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-4");
} else if (arena.timer == 3) {
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ORB_PICKUP, 1, 1);
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-3");
} else if (arena.timer == 2) {
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ORB_PICKUP, 1, 1);
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-2");
} else if (arena.timer == 1) {
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ORB_PICKUP, 1, 2);
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 2);
ArenaHandler.sendFMessage(arena, ConfigC.normal_lobbyArenaIsStarting, "1-1");
}
} else {
@ -305,7 +305,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
infBow.addEnchantment(Enchantment.ARROW_INFINITE, 1);
player.getInventory().setItem(1, infBow);
player.getInventory().setItem(2, new ItemStack(Material.ARROW, 1));
player.playSound(player.getLocation(), Sound.ANVIL_USE, 1, 1);
player.playSound(player.getLocation(), Sound.BLOCK_ANVIL_USE, 1, 1);
}
if (W.seekertime.get(player) != null) {
@ -357,19 +357,19 @@ public class BlockHunt extends JavaPlugin implements Listener {
} else if (arena.timer == 10) {
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-10");
} else if (arena.timer == 5) {
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ORB_PICKUP, 1, 0);
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 0);
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-5");
} else if (arena.timer == 4) {
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ORB_PICKUP, 1, 0);
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 0);
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-4");
} else if (arena.timer == 3) {
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ORB_PICKUP, 1, 1);
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-3");
} else if (arena.timer == 2) {
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ORB_PICKUP, 1, 1);
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-2");
} else if (arena.timer == 1) {
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ORB_PICKUP, 1, 2);
arena.lobbyWarp.getWorld().playSound(arena.lobbyWarp, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 2);
ArenaHandler.sendFMessage(arena, ConfigC.normal_ingameArenaEnd, "1-1");
}
} else {
@ -414,7 +414,7 @@ public class BlockHunt extends JavaPlugin implements Listener {
}
block.addUnsafeEnchantment(Enchantment.DURABILITY, 10);
player.playSound(pLoc, Sound.ORB_PICKUP, 1, 1);
player.playSound(pLoc, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
W.hiddenLoc.put(player, moveLoc);
if (block.getDurability() != 0) {
MessageM.sendFMessage(

View File

@ -31,7 +31,7 @@ public class CMDremove extends DefaultCMD {
LocationSerializable signLoc = new LocationSerializable((Location) W.signs.getFile().get(sign + ".location"));
signLoc.getBlock().setType(Material.AIR);
signLoc.getWorld().playEffect(signLoc, Effect.MOBSPAWNER_FLAMES, 0);
signLoc.getWorld().playSound(signLoc, Sound.ENDERDRAGON_WINGS, 1, 1);
signLoc.getWorld().playSound(signLoc, Sound.ENTITY_ENDERDRAGON_FLAP, 1, 1);
W.signs.getFile().set(sign, null);
}
}

View File

@ -32,7 +32,7 @@ public class CMDwand extends DefaultCMD {
im.setLore(lores2);
wand.setItemMeta(im);
player.getInventory().addItem(wand);
player.playSound(player.getLocation(), Sound.ORB_PICKUP, 5, 0);
player.playSound(player.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 5, 0);
MessageM.sendFMessage(player, ConfigC.normal_wandGaveWand, "type-" + wand.getType().toString().replaceAll("_", " ").toLowerCase());
} else {
MessageM.sendFMessage(player, ConfigC.error_onlyIngame);

View File

@ -89,7 +89,7 @@ public class OnEntityDamageByEntityEvent implements Listener {
}
// The damage is allowed, so lets handle it!
player.getWorld().playSound(player.getLocation(), Sound.HURT_FLESH, 1, 1);
player.getWorld().playSound(player.getLocation(), Sound.ENTITY_PLAYER_HURT, 1, 1);
if (event.getDamage() >= player.getHealth()) {
player.setHealth(20);

View File

@ -120,7 +120,7 @@ public class OnPlayerInteractEvent implements Listener {
Block moveLocBlock = W.hiddenLoc.get(pl).getBlock();
if (moveLocBlock.getX() == pLoc.getX() && moveLocBlock.getY() == pLoc.getY() && moveLocBlock.getZ() == pLoc.getZ()) {
W.moveLoc.put(pl, new Location(pl.getWorld(), 0, 0, 0));
pl.getWorld().playSound(player.getLocation(), Sound.HURT_FLESH, 1, 1);
pl.getWorld().playSound(player.getLocation(), Sound.ENTITY_PLAYER_HURT, 1, 1);
SolidBlockHandler.makePlayerUnsolid(pl);
}
}

View File

@ -37,32 +37,32 @@ public class OnPlayerMoveEvent implements Listener {
if (loc.getBlockX() > maxX) {
event.setCancelled(true);
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
player.playSound(loc, Sound.ENTITY_GHAST_SHOOT, 1, 1);
player.teleport(arena.hidersWarp);
} else if (loc.getBlockX() < minX) {
event.setCancelled(true);
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
player.playSound(loc, Sound.ENTITY_GHAST_SHOOT, 1, 1);
player.teleport(arena.hidersWarp);
} else if (loc.getBlockZ() > maxZ) {
event.setCancelled(true);
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
player.playSound(loc, Sound.ENTITY_GHAST_SHOOT, 1, 1);
player.teleport(arena.hidersWarp);
} else if (loc.getBlockZ() < minZ) {
event.setCancelled(true);
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
player.playSound(loc, Sound.ENTITY_GHAST_SHOOT, 1, 1);
player.teleport(arena.hidersWarp);
} else if (loc.getBlockY() > maxY) {
event.setCancelled(true);
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
player.playSound(loc, Sound.ENTITY_GHAST_SHOOT, 1, 1);
player.teleport(arena.hidersWarp);
} else if (loc.getBlockY() < minY) {
event.setCancelled(true);
player.playEffect(loc, Effect.ENDER_SIGNAL, null);
player.playSound(loc, Sound.GHAST_FIREBALL, 1, 1);
player.playSound(loc, Sound.ENTITY_GHAST_SHOOT, 1, 1);
player.teleport(arena.hidersWarp);
}
}

View File

@ -47,7 +47,7 @@ public class SolidBlockHandler {
}
}
player.playSound(player.getLocation(), Sound.BAT_HURT, 1, 1);
player.playSound(player.getLocation(), Sound.ENTITY_BAT_HURT, 1, 1);
block.removeEnchantment(Enchantment.DURABILITY);
for (Player playerShow : Bukkit.getOnlinePlayers()) {