geforkt von Mirrors/Paper
Implement Translatable on villager Profession (#6542)
Dieser Commit ist enthalten in:
Ursprung
9b68f27212
Commit
28bc1df590
@ -309,6 +309,33 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -0,0 +0,0 @@ public interface Villager extends AbstractVillager {
|
||||
* Represents the various different Villager professions there may be.
|
||||
* Villagers have different trading options depending on their profession,
|
||||
*/
|
||||
- public enum Profession implements Keyed {
|
||||
+ public enum Profession implements Keyed, net.kyori.adventure.translation.Translatable { // Paper
|
||||
NONE,
|
||||
/**
|
||||
* Armorer profession. Wears a black apron. Armorers primarily trade for
|
||||
@@ -0,0 +0,0 @@ public interface Villager extends AbstractVillager {
|
||||
public NamespacedKey getKey() {
|
||||
return key;
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public @NotNull String translationKey() {
|
||||
+ return "entity.minecraft.villager." + this.key.getKey();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
// Paper start - Add villager reputation API
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren