forked from LogBlock/LogBlock
Merge pull request #440 from DarkArc/1_6_1
Updated Smart Logging for MC 1.6.1
This commit is contained in:
2
pom.xml
2
pom.xml
@ -45,7 +45,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.5-R0.1-SNAPSHOT</version>
|
||||
<version>1.6.1-R0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
|
@ -46,14 +46,14 @@ public class ToolListener implements Listener
|
||||
final Tool tool = toolsByType.get(type);
|
||||
final Player player = event.getPlayer();
|
||||
if (tool != null && (action == Action.RIGHT_CLICK_BLOCK || action == Action.LEFT_CLICK_BLOCK) && logblock.hasPermission(player, "logblock.tools." + tool.name)) {
|
||||
if (!isLogged(player.getWorld())) {
|
||||
player.sendMessage(ChatColor.RED + "This world is not currently logged.");
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
final ToolBehavior behavior = action == Action.RIGHT_CLICK_BLOCK ? tool.rightClickBehavior : tool.leftClickBehavior;
|
||||
final ToolData toolData = getSession(player).toolData.get(tool);
|
||||
if (behavior != ToolBehavior.NONE && toolData.enabled) {
|
||||
if (!isLogged(player.getWorld())) {
|
||||
player.sendMessage(ChatColor.RED + "This world is not currently logged.");
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
final Block block = event.getClickedBlock();
|
||||
final QueryParams params = toolData.params;
|
||||
params.loc = null;
|
||||
|
@ -60,7 +60,7 @@ public class BukkitUtils
|
||||
relativeBreakable.add(Material.COCOA);
|
||||
|
||||
// Blocks that break when they are on top of a block
|
||||
relativeTopBreakable = new HashSet<Material>(31);
|
||||
relativeTopBreakable = new HashSet<Material>(32);
|
||||
relativeTopBreakable.add(Material.SAPLING);
|
||||
relativeTopBreakable.add(Material.LONG_GRASS);
|
||||
relativeTopBreakable.add(Material.DEAD_BUSH);
|
||||
@ -92,6 +92,7 @@ public class BukkitUtils
|
||||
relativeTopBreakable.add(Material.REDSTONE_COMPARATOR_OFF);
|
||||
relativeTopBreakable.add(Material.WOODEN_DOOR);
|
||||
relativeTopBreakable.add(Material.IRON_DOOR);
|
||||
relativeTopBreakable.add(Material.CARPET);
|
||||
|
||||
// Blocks that fall
|
||||
relativeTopFallables = new HashSet<Material>(4);
|
||||
@ -101,7 +102,7 @@ public class BukkitUtils
|
||||
relativeTopFallables.add(Material.ANVIL);
|
||||
|
||||
// Blocks that break falling entities
|
||||
fallingEntityKillers = new HashSet<Material>(31);
|
||||
fallingEntityKillers = new HashSet<Material>(32);
|
||||
fallingEntityKillers.add(Material.SIGN_POST);
|
||||
fallingEntityKillers.add(Material.WALL_SIGN);
|
||||
fallingEntityKillers.add(Material.STONE_PLATE);
|
||||
@ -133,6 +134,7 @@ public class BukkitUtils
|
||||
fallingEntityKillers.add(Material.REDSTONE_COMPARATOR_ON);
|
||||
fallingEntityKillers.add(Material.REDSTONE_COMPARATOR_OFF);
|
||||
fallingEntityKillers.add(Material.DAYLIGHT_DETECTOR);
|
||||
fallingEntityKillers.add(Material.CARPET);
|
||||
|
||||
// Crop Blocks
|
||||
cropBlocks = new HashSet<Material>(5);
|
||||
|
Reference in New Issue
Block a user