mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 03:34:42 +02:00
Merge branch 'v5' into v6
# Conflicts: # .github/CODEOWNERS # Bukkit/pom.xml # Bukkit/src/main/java/com/plotsquared/bukkit/BukkitPlatform.java # Bukkit/src/main/java/com/plotsquared/bukkit/player/BukkitPlayer.java # Core/src/main/java/com/plotsquared/core/command/Alias.java # Core/src/main/java/com/plotsquared/core/command/HomeCommand.java # Core/src/main/java/com/plotsquared/core/command/Music.java # Core/src/main/java/com/plotsquared/core/listener/PlotListener.java # Core/src/main/java/com/plotsquared/core/player/ConsolePlayer.java # Core/src/main/java/com/plotsquared/core/player/PlotPlayer.java # Core/src/main/java/com/plotsquared/core/plot/flag/types/BlockTypeWrapper.java # build.gradle
This commit is contained in:
@ -33,6 +33,7 @@ import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.events.TeleportCause;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.permissions.PermissionHandler;
|
||||
import com.plotsquared.core.player.ConsolePlayer;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.PlotWeather;
|
||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||
@ -330,6 +331,13 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
return BukkitUtil.BUKKIT_AUDIENCES.player(this.player);
|
||||
}
|
||||
|
||||
@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(@Nonnull final TeleportCause cause) {
|
||||
switch (cause) {
|
||||
|
Reference in New Issue
Block a user