mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Fix deny-exit flag causing plot kick to break
This commit is contained in:
@ -68,7 +68,7 @@ import java.util.UUID;
|
||||
MainUtil.sendMessage(player, C.INVALID_PLAYER, args[0]);
|
||||
return false;
|
||||
}
|
||||
if (player2.hasPermission("plots.admin.entry.denied")) {
|
||||
if (Permissions.hasPermission(player2, C.PERMISSION_ADMIN_ENTRY_DENIED)) {
|
||||
C.CANNOT_KICK_PLAYER.send(player, player2.getName());
|
||||
return false;
|
||||
}
|
||||
@ -81,10 +81,10 @@ import java.util.UUID;
|
||||
// Kick from server if you can't be teleported to spawn
|
||||
player2.kick(C.YOU_GOT_KICKED.s());
|
||||
} else {
|
||||
player2.teleport(newSpawn);
|
||||
player2.plotkick(newSpawn);
|
||||
}
|
||||
} else {
|
||||
player2.teleport(spawn);
|
||||
player2.plotkick(spawn);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -353,6 +353,17 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer {
|
||||
*/
|
||||
public abstract void teleport(Location location);
|
||||
|
||||
/**
|
||||
* Kick this player to a location
|
||||
*
|
||||
* @param location the target location
|
||||
*/
|
||||
public void plotkick(Location location) {
|
||||
setMeta("kick", true);
|
||||
teleport(location);
|
||||
deleteMeta("kick");
|
||||
}
|
||||
|
||||
/**
|
||||
* Set this compass target.
|
||||
*
|
||||
|
Reference in New Issue
Block a user