geforkt von Mirrors/Paper
SPIGOT-7920: Expose enderpearls of Player
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
d3a23f42c3
Commit
a24f08778b
@ -34,6 +34,7 @@ import java.util.WeakHashMap;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.advancements.AdvancementProgress;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
@ -172,6 +173,7 @@ import org.bukkit.craftbukkit.util.CraftChatMessage;
|
||||
import org.bukkit.craftbukkit.util.CraftLocation;
|
||||
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||
import org.bukkit.entity.EnderPearl;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -1186,6 +1188,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<EnderPearl> getEnderPearls() {
|
||||
return getHandle().getEnderPearls().stream().map((e) -> (EnderPearl) e.getBukkitEntity()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Location getBedLocation() {
|
||||
Preconditions.checkState(isSleeping(), "Not sleeping");
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren