mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-14 22:56:18 +01:00
List is not a valid cause. Each element is its own cause.
Fixes WORLDGUARD-4140. Specifically, fixes not being able to break lilypads while in a boat, even through the player would normally be able to. Note that slowdown is client-side and getting stuck is due to Spigot not updating the client when the break is cancelled, which are unrelated to this issue (and not fixable by us).
This commit is contained in:
parent
179c324c80
commit
cb2c0870ec
@ -24,6 +24,7 @@
|
||||
import com.sk89q.worldedit.world.weather.WeatherType;
|
||||
import com.sk89q.worldedit.world.weather.WeatherTypes;
|
||||
import com.sk89q.worldguard.LocalPlayer;
|
||||
import io.papermc.lib.PaperLib;
|
||||
import org.bukkit.BanList.Type;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -179,6 +180,12 @@ public void resetFallDistance() {
|
||||
getPlayer().setFallDistance(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void teleport(Location location, String message) {
|
||||
PaperLib.teleportAsync(getPlayer(), BukkitAdapter.adapt(location))
|
||||
.thenApply(success -> { if (success) print(message); return success; });
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getGroups() {
|
||||
return plugin.getGroups(getPlayer());
|
||||
|
@ -270,7 +270,7 @@ private void addAll(@Nullable Object... element) {
|
||||
}
|
||||
}
|
||||
} else if (o instanceof Vehicle) {
|
||||
addAll(((Vehicle) o).getPassengers());
|
||||
((Vehicle) o).getPassengers().forEach(this::addAll);
|
||||
} else if (o instanceof AreaEffectCloud) {
|
||||
indirect = true;
|
||||
addAll(((AreaEffectCloud) o).getSource());
|
||||
|
Loading…
Reference in New Issue
Block a user