mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fixes #250
This commit is contained in:
parent
9ca5ba812d
commit
635a4bd7a4
@ -8,7 +8,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<artifactId>PlotSquared</artifactId>
|
||||
<version>2.9.8</version>
|
||||
<version>2.9.9</version>
|
||||
<name>PlotSquared</name>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
|
@ -57,7 +57,7 @@ public class Kick extends SubCommand {
|
||||
}
|
||||
Location otherLoc = player.getLocation();
|
||||
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;
|
||||
}
|
||||
player.teleport(BlockManager.manager.getSpawn(loc.getWorld()));
|
||||
|
@ -169,20 +169,20 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi
|
||||
if (!isPlotWorld(loc.getWorld())) {
|
||||
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()) {
|
||||
case REDSTONE_COMPARATOR_OFF:
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user