This commit is contained in:
boy0001 2015-04-09 22:21:25 +10:00
parent 9ca5ba812d
commit 635a4bd7a4
3 changed files with 13 additions and 13 deletions

View File

@ -8,7 +8,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<artifactId>PlotSquared</artifactId> <artifactId>PlotSquared</artifactId>
<version>2.9.8</version> <version>2.9.9</version>
<name>PlotSquared</name> <name>PlotSquared</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<build> <build>

View File

@ -57,7 +57,7 @@ public class Kick extends SubCommand {
} }
Location otherLoc = player.getLocation(); Location otherLoc = player.getLocation();
if (!plr.getLocation().getWorld().equals(otherLoc.getWorld()) || !plot.equals(MainUtil.getPlot(otherLoc))) { if (!plr.getLocation().getWorld().equals(otherLoc.getWorld()) || !plot.equals(MainUtil.getPlot(otherLoc))) {
MainUtil.sendMessage(plr, C.INVALID_PLAYER.s().replaceAll("%player%", args[0])); MainUtil.sendMessage(plr, C.INVALID_PLAYER, args[0]);
return false; return false;
} }
player.teleport(BlockManager.manager.getSpawn(loc.getWorld())); player.teleport(BlockManager.manager.getSpawn(loc.getWorld()));

View File

@ -169,20 +169,20 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
if (!isPlotWorld(loc.getWorld())) { if (!isPlotWorld(loc.getWorld())) {
return; return;
} }
Plot plot = MainUtil.getPlot(loc);
if (plot == null) {
return;
}
Flag redstone = FlagManager.getPlotFlag(plot, "redstone");
if (redstone == null || (Boolean) redstone.getValue()) {
return;
}
if (!isPlotArea(loc)) {
return;
}
switch (block.getType()) { switch (block.getType()) {
case REDSTONE_COMPARATOR_OFF: case REDSTONE_COMPARATOR_OFF:
case REDSTONE_COMPARATOR_ON: { case REDSTONE_COMPARATOR_ON: {
Plot plot = MainUtil.getPlot(loc);
if (plot == null) {
return;
}
Flag redstone = FlagManager.getPlotFlag(plot, "redstone");
if (redstone == null || (Boolean) redstone.getValue()) {
return;
}
if (!isPlotArea(loc)) {
return;
}
event.setCancelled(true); event.setCancelled(true);
} }
} }