geforkt von Mirrors/Paper
Elder Guardian appearance API (#8455)
Dieser Commit ist enthalten in:
Ursprung
c0e803bfd2
Commit
683149f9a1
35
patches/api/Elder-Guardian-appearance-API.patch
Normale Datei
35
patches/api/Elder-Guardian-appearance-API.patch
Normale Datei
@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: SoSeDiK <mrsosedik@gmail.com>
|
||||
Date: Tue, 11 Oct 2022 20:38:47 +0300
|
||||
Subject: [PATCH] Elder Guardian appearance API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void lookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor);
|
||||
// Paper end - Teleport API
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Displays elder guardian effect with a sound
|
||||
+ *
|
||||
+ * @see #showElderGuardian(boolean)
|
||||
+ */
|
||||
+ default void showElderGuardian() {
|
||||
+ showElderGuardian(false);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Displays elder guardian effect and optionally plays a sound
|
||||
+ *
|
||||
+ * @param silent whether sound should be silenced
|
||||
+ */
|
||||
+ void showElderGuardian(boolean silent);
|
||||
+ // Paper end
|
||||
+
|
||||
@NotNull
|
||||
@Override
|
||||
Spigot spigot();
|
24
patches/server/Elder-Guardian-appearance-API.patch
Normale Datei
24
patches/server/Elder-Guardian-appearance-API.patch
Normale Datei
@ -0,0 +1,24 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: SoSeDiK <mrsosedik@gmail.com>
|
||||
Date: Tue, 11 Oct 2022 20:38:47 +0300
|
||||
Subject: [PATCH] Elder Guardian appearance API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void showElderGuardian(boolean silent) {
|
||||
+ if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F));
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public Player.Spigot spigot()
|
||||
{
|
||||
return this.spigot;
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren