mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
Take player visibility into account when sending notify-enter and notify-leave messages. Fixes PS-103.
This commit is contained in:
@ -32,6 +32,7 @@ import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.events.TeleportCause;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.player.ConsolePlayer;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.PlotWeather;
|
||||
import com.plotsquared.core.util.EconHandler;
|
||||
@ -354,6 +355,13 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
return this.player.isBanned();
|
||||
}
|
||||
|
||||
@Override public boolean canSee(final PlotPlayer<?> other) {
|
||||
if (other instanceof ConsolePlayer) {
|
||||
return true;
|
||||
} else {
|
||||
return this.player.canSee(((BukkitPlayer) other).getPlatformPlayer());
|
||||
}
|
||||
}
|
||||
|
||||
public PlayerTeleportEvent.TeleportCause getTeleportCause(@NotNull final TeleportCause cause) {
|
||||
switch (cause) {
|
||||
|
Reference in New Issue
Block a user