mirror of
https://github.com/PaperMC/Paper.git
synced 2025-04-29 07:04:51 +02:00
parent
b6be7cd0ae
commit
cd9d6d6998
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ import com.google.common.base.Preconditions;
|
|||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
@ -243,7 +244,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||
Preconditions.checkArgument(location != null, "location cannot be null");
|
||||
location.checkFinite();
|
||||
// Paper start - Teleport passenger API
|
||||
Set<io.papermc.paper.entity.TeleportFlag> flagSet = Set.of(flags);
|
||||
Set<io.papermc.paper.entity.TeleportFlag> flagSet = new HashSet<>(List.of(flags)); // Wrap into list while multiple old flags link to the same new one
|
||||
boolean dismount = !flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_VEHICLE);
|
||||
boolean retainPassengers = flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS);
|
||||
// Don't allow teleporting between worlds while keeping passengers
|
||||
|
|
Loading…
Add table
Reference in a new issue