Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-436: Add spectator camera API.
Dieser Commit ist enthalten in:
Ursprung
53433de98d
Commit
f4ecc39ffc
@ -1,5 +1,6 @@
|
||||
package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@ -1313,4 +1314,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
collection.add(new AttributeModifiable(getHandle().getAttributeMap(), (new AttributeRanged(null, "generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSpectatorTarget(org.bukkit.entity.Entity entity) {
|
||||
Preconditions.checkArgument(getGameMode() == GameMode.SPECTATOR, "Player must be in spectator mode");
|
||||
getHandle().setSpectatorTarget((entity == null) ? null : ((CraftEntity) entity).getHandle());
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren