mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 03:34:42 +02:00
feature: add flag for beacon effects of other plots (#3627)
* feature: add flag for beacon effects of other plots Took 7 minutes * fix: don't add the beacon effect flag if the platform is not paper Took 2 minutes * fix: creating consistency in documentation Took 7 minutes * feature: add global paper setting for the beacon-effect * fix: description of the plot flag and rewrite of the listener * fix: renamed flag and added road support * fix: renamed flag and changed flag functionality * fix: added spigot fallback listener and fixed NPE * refactor: Address checkstyle violations * addition: remove beacon effects when player leaves a plot * fix: updated javadoc and fixed usage of the PlotListener#addEffect method * chore: Run license updater Co-authored-by: BuildTools <unconfigured@null.spigotmc.org> Co-authored-by: Alexander Brandes <mc.cache@web.de>
This commit is contained in:
@ -47,13 +47,13 @@ import org.bukkit.event.EventException;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||
import org.bukkit.plugin.RegisteredListener;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.checkerframework.checker.index.qual.NonNegative;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.sk89q.worldedit.world.gamemode.GameModes.ADVENTURE;
|
||||
import static com.sk89q.worldedit.world.gamemode.GameModes.CREATIVE;
|
||||
@ -348,6 +348,14 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
return BukkitUtil.BUKKIT_AUDIENCES.player(this.player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeEffect(@NonNull String name) {
|
||||
PotionEffectType type = PotionEffectType.getByName(name);
|
||||
if (type != null) {
|
||||
player.removePotionEffect(type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSee(final PlotPlayer<?> other) {
|
||||
if (other instanceof ConsolePlayer) {
|
||||
|
Reference in New Issue
Block a user