mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fix side location + fix brushtool mask
This commit is contained in:
parent
6671fd7e6d
commit
f22874970f
@ -487,7 +487,7 @@ public class MainUtil {
|
||||
final int z = bot.getZ();
|
||||
PlotManager manager = PS.get().getPlotManager(plot.world);
|
||||
final int y = Math.max(getHeighestBlock(plot.world, x, z), manager.getSignLoc(PS.get().getPlotWorld(plot.world), plot).getY());
|
||||
return new Location(plot.world, x, y + 1, z);
|
||||
return new Location(plot.world, x, y + 1, z - 1);
|
||||
}
|
||||
|
||||
public static boolean teleportPlayer(final PlotPlayer player, final Location from, final Plot plot) {
|
||||
|
@ -23,6 +23,7 @@ import com.sk89q.worldedit.EditSession.Stage;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldedit.command.tool.BrushTool;
|
||||
import com.sk89q.worldedit.command.tool.Tool;
|
||||
import com.sk89q.worldedit.event.extent.EditSessionEvent;
|
||||
import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
@ -82,9 +83,9 @@ public class WESubscriber {
|
||||
ItemStack item = objPlayer.getItemInHand();
|
||||
if (item != null && !hasMask) {
|
||||
try {
|
||||
BrushTool tool = session.getBrushTool(item.getTypeId());
|
||||
if (tool != null) {
|
||||
hasMask = tool.getMask() != null;
|
||||
Tool tool = session.getTool(item.getTypeId());
|
||||
if (tool != null && tool instanceof BrushTool) {
|
||||
hasMask = ((BrushTool) tool).getMask() != null;
|
||||
}
|
||||
}
|
||||
catch (Exception e) {}
|
||||
|
Loading…
Reference in New Issue
Block a user