Updated to MC 1.5

This commit is contained in:
Wizjany 2013-03-03 01:17:41 -05:00 committed by wizjany
parent e9402c55e6
commit f07acea3e1
2 changed files with 37 additions and 9 deletions

View File

@ -40,13 +40,13 @@
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>worldedit</artifactId>
<version>5.4.4</version>
<version>5.5.2-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.4.5-R1.0</version>
<version>1.4.7-R1.0</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -862,7 +862,10 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
|| type == BlockID.DISPENSER
|| type == BlockID.FURNACE
|| type == BlockID.BURNING_FURNACE
|| type == BlockID.BREWING_STAND) {
|| type == BlockID.BREWING_STAND
|| type == BlockID.TRAPPED_CHEST
|| type == BlockID.HOPPER
|| type == BlockID.DROPPER) {
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
&& !set.canBuild(localPlayer)
&& !set.allows(DefaultFlag.CHEST_ACCESS, localPlayer)) {
@ -902,7 +905,9 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
|| type == BlockID.CAULDRON
|| type == BlockID.ENDER_CHEST // blah
|| type == BlockID.BEACON
|| type == BlockID.ANVIL) {
|| type == BlockID.ANVIL
|| type == BlockID.HOPPER
|| type == BlockID.DROPPER) {
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
&& !set.canBuild(localPlayer)
&& !set.allows(DefaultFlag.USE, localPlayer)) {
@ -913,6 +918,20 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
}
}
if (type == BlockID.REDSTONE_REPEATER_OFF
|| type == BlockID.REDSTONE_REPEATER_ON
|| type == BlockID.COMPARATOR_OFF
|| type == BlockID.COMPARATOR_ON) {
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
&& !set.canBuild(localPlayer)) {
// using build and not use because it can potentially damage a circuit and use is more general-purposed
player.sendMessage(ChatColor.DARK_RED + "You don't have permission to use that in this area.");
event.setUseInteractedBlock(Result.DENY);
event.setCancelled(true);
return;
}
}
if (type == BlockID.CAKE_BLOCK) {
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
&& !set.canBuild(localPlayer)
@ -927,7 +946,9 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
if (BlockType.isRailBlock(type)
&& (item.getTypeId() == ItemID.MINECART
|| item.getTypeId() == ItemID.POWERED_MINECART
|| item.getTypeId() == ItemID.STORAGE_MINECART)) {
|| item.getTypeId() == ItemID.STORAGE_MINECART
|| item.getTypeId() == ItemID.TNT_MINECART
|| item.getTypeId() == ItemID.HOPPER_MINECART)) {
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
&& !placedInSet.canBuild(localPlayer)
&& !placedInSet.allows(DefaultFlag.PLACE_VEHICLE, localPlayer)) {
@ -951,7 +972,7 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
}
if (wcfg.getBlacklist() != null) {
if (player.isSneaking() // sneak + right clicking no longer activates blocks as of some recent version
if (player.isSneaking() // sneak + right clicking no longer opens guis as of some recent version
|| (type != BlockID.CHEST
&& type != BlockID.DISPENSER
&& type != BlockID.FURNACE
@ -959,7 +980,10 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
&& type != BlockID.BREWING_STAND
&& type != BlockID.ENCHANTMENT_TABLE
&& type != BlockID.ANVIL
&& type != BlockID.ENDER_CHEST)) {
&& type != BlockID.ENDER_CHEST
&& type != BlockID.TRAPPED_CHEST
&& type != BlockID.HOPPER
&& type != BlockID.DROPPER)) {
if (!wcfg.getBlacklist().check(
new ItemUseBlacklistEvent(plugin.wrapPlayer(player), toVector(block),
item.getTypeId()), false, false)) {
@ -995,7 +1019,10 @@ private void handleBlockRightClick(PlayerInteractEvent event) {
|| type == BlockID.FURNACE
|| type == BlockID.BURNING_FURNACE
|| type == BlockID.ENCHANTMENT_TABLE
|| type == BlockID.BREWING_STAND)) {
|| type == BlockID.BREWING_STAND
|| type == BlockID.TRAPPED_CHEST
|| type == BlockID.HOPPER
|| type == BlockID.DROPPER)) {
if (wcfg.isChestProtected(block, player)) {
player.sendMessage(ChatColor.DARK_RED + "The chest is protected.");
@ -1083,7 +1110,8 @@ private void handlePhysicalInteract(PlayerInteractEvent event) {
LocalPlayer localPlayer = plugin.wrapPlayer(player);
if (type == BlockID.STONE_PRESSURE_PLATE || type == BlockID.WOODEN_PRESSURE_PLATE
|| type == BlockID.TRIPWIRE) {
|| type == BlockID.TRIPWIRE || type == BlockID.PRESSURE_PLATE_LIGHT
|| type == BlockID.PRESSURE_PLATE_HEAVY) {
if (!plugin.getGlobalRegionManager().hasBypass(player, world)
&& !set.canBuild(localPlayer)
&& !set.allows(DefaultFlag.USE, localPlayer)) {