mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixes #438
This commit is contained in:
parent
95ad199f52
commit
7cedc3befe
@ -28,11 +28,13 @@ import com.intellectualcrafters.plot.database.DBFunc;
|
||||
import com.intellectualcrafters.plot.object.Location;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.BlockManager;
|
||||
import com.intellectualcrafters.plot.util.EventUtil;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.Permissions;
|
||||
import com.intellectualcrafters.plot.util.bukkit.BukkitUtil;
|
||||
import com.intellectualcrafters.plot.util.bukkit.UUIDHandler;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -91,15 +93,10 @@ public class Deny extends SubCommand {
|
||||
}
|
||||
|
||||
private void handleKick(final UUID uuid, final Plot plot) {
|
||||
Player p = Bukkit.getPlayer(uuid);
|
||||
if (p != null && p.isOnline()) {
|
||||
if (PS.get().isPlotWorld(p.getWorld().getName())) {
|
||||
Plot pl = MainUtil.getPlot(BukkitUtil.getLocation(p));
|
||||
if (pl != null && pl.equals(plot)) {
|
||||
p.teleport(p.getWorld().getSpawnLocation());
|
||||
MainUtil.sendMessage(BukkitUtil.getPlayer(p), C.YOU_GOT_DENIED);
|
||||
}
|
||||
}
|
||||
PlotPlayer pp = UUIDHandler.getPlayer(uuid);
|
||||
if (pp != null && plot.equals(MainUtil.getPlot(pp.getLocation()))) {
|
||||
pp.teleport(BlockManager.manager.getSpawn(pp.getLocation().getWorld()));
|
||||
MainUtil.sendMessage(pp, C.YOU_GOT_DENIED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -447,8 +447,9 @@ public abstract class SchematicHandler {
|
||||
public void getCompoundTag(final String world, final PlotId id, RunnableVal<CompoundTag> whenDone) {
|
||||
if (!PS.get().getPlots(world).containsKey(id)) {
|
||||
whenDone.run();
|
||||
return;
|
||||
}
|
||||
final Location pos1 = MainUtil.getPlotBottomLoc(world, id).add(1, 0, 1);
|
||||
final Location pos1 = MainUtil.getPlotBottomLoc(world, id).add(1, -1, 1);
|
||||
final Location pos2 = MainUtil.getPlotTopLoc(world, id);
|
||||
getCompoundTag(world, pos1, pos2, whenDone);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user