Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
71c84c8132
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9a80d38c SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-722: Add EntityRemoveEvent 258086d9 SPIGOT-7417, PR-967: Add Sign#getTargetSide and Sign#getAllowedEditor ffaba051 SPIGOT-7584: Add missing Tag.ITEMS_NON_FLAMMABLE_WOOD CraftBukkit Changes: 98b6c1ac7 SPIGOT-7589 Fix NullPointerException when bans expire a2736ddb0 SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-1008: Add EntityRemoveEvent 5bf12cb89 SPIGOT-7565: Throw a more descriptive error message when a developer tries to spawn an entity from a CraftBukkit class 76d95fe7e SPIGOT-7417, PR-1343: Add Sign#getTargetSide and Sign#getAllowedEditor Spigot Changes: e9ec5485 Rebuild patches f1b62e0c Rebuild patches
86 Zeilen
2.7 KiB
Diff
86 Zeilen
2.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Fri, 1 Oct 2021 08:04:43 -0700
|
|
Subject: [PATCH] Add missing team sidebar display slots
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/scoreboard/DisplaySlot.java b/src/main/java/org/bukkit/scoreboard/DisplaySlot.java
|
|
index 4959bec21d152a17fe4ca9d3f448aef482a05b5e..21cd2ba659504c3a1eb95226539a5701d0c324db 100644
|
|
--- a/src/main/java/org/bukkit/scoreboard/DisplaySlot.java
|
|
+++ b/src/main/java/org/bukkit/scoreboard/DisplaySlot.java
|
|
@@ -1,26 +1,55 @@
|
|
package org.bukkit.scoreboard;
|
|
|
|
+import net.kyori.adventure.text.format.NamedTextColor; // Paper
|
|
/**
|
|
* Locations for displaying objectives to the player
|
|
*/
|
|
public enum DisplaySlot {
|
|
- BELOW_NAME,
|
|
- PLAYER_LIST,
|
|
- SIDEBAR,
|
|
- SIDEBAR_BLACK,
|
|
- SIDEBAR_DARK_BLUE,
|
|
- SIDEBAR_DARK_GREEN,
|
|
- SIDEBAR_DARK_AQUA,
|
|
- SIDEBAR_DARK_RED,
|
|
- SIDEBAR_DARK_PURPLE,
|
|
- SIDEBAR_GOLD,
|
|
- SIDEBAR_GRAY,
|
|
- SIDEBAR_DARK_GRAY,
|
|
- SIDEBAR_BLUE,
|
|
- SIDEBAR_GREEN,
|
|
- SIDEBAR_AQUA,
|
|
- SIDEBAR_RED,
|
|
- SIDEBAR_LIGHT_PURPLE,
|
|
- SIDEBAR_YELLOW,
|
|
- SIDEBAR_WHITE;
|
|
+ // Paper start
|
|
+ BELOW_NAME("below_name"),
|
|
+ PLAYER_LIST("list"),
|
|
+ SIDEBAR("sidebar"),
|
|
+ SIDEBAR_TEAM_BLACK(NamedTextColor.BLACK),
|
|
+ SIDEBAR_TEAM_DARK_BLUE(NamedTextColor.DARK_BLUE),
|
|
+ SIDEBAR_TEAM_DARK_GREEN(NamedTextColor.DARK_GREEN),
|
|
+ SIDEBAR_TEAM_DARK_AQUA(NamedTextColor.DARK_AQUA),
|
|
+ SIDEBAR_TEAM_DARK_RED(NamedTextColor.DARK_RED),
|
|
+ SIDEBAR_TEAM_DARK_PURPLE(NamedTextColor.DARK_PURPLE),
|
|
+ SIDEBAR_TEAM_GOLD(NamedTextColor.GOLD),
|
|
+ SIDEBAR_TEAM_GRAY(NamedTextColor.GRAY),
|
|
+ SIDEBAR_TEAM_DARK_GRAY(NamedTextColor.DARK_GRAY),
|
|
+ SIDEBAR_TEAM_BLUE(NamedTextColor.BLUE),
|
|
+ SIDEBAR_TEAM_GREEN(NamedTextColor.GREEN),
|
|
+ SIDEBAR_TEAM_AQUA(NamedTextColor.AQUA),
|
|
+ SIDEBAR_TEAM_RED(NamedTextColor.RED),
|
|
+ SIDEBAR_TEAM_LIGHT_PURPLE(NamedTextColor.LIGHT_PURPLE),
|
|
+ SIDEBAR_TEAM_YELLOW(NamedTextColor.YELLOW),
|
|
+ SIDEBAR_TEAM_WHITE(NamedTextColor.WHITE);
|
|
+
|
|
+ public static final net.kyori.adventure.util.Index<String, DisplaySlot> NAMES = net.kyori.adventure.util.Index.create(DisplaySlot.class, DisplaySlot::getId);
|
|
+
|
|
+ private final String id;
|
|
+
|
|
+ DisplaySlot(@org.jetbrains.annotations.NotNull String id) {
|
|
+ this.id = id;
|
|
+ }
|
|
+
|
|
+ DisplaySlot(@org.jetbrains.annotations.NotNull NamedTextColor color) {
|
|
+ this.id = "sidebar.team." + color;
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * Get the string id of this display slot.
|
|
+ *
|
|
+ * @return the string id
|
|
+ */
|
|
+ public @org.jetbrains.annotations.NotNull String getId() {
|
|
+ return id;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public String toString() {
|
|
+ return this.id;
|
|
+ }
|
|
+ // Paper end
|
|
}
|