Deprecate Bukkit#getLogger (#10388)

* Deprecate Bukkit#getLogger

* fix typo in MaterialSetTags

* change to Internal and squash into other patch

* improve api note message

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
powercas_gamer 2024-04-06 23:20:29 +02:00
parent e1e5a33da4
commit 8a2bd44f1f
2 changed files with 31 additions and 1 deletions

View file

@ -518,7 +518,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ /**
+ * Covers the variants of a redstone torch.
+ */
+ public static final MaterialSetTag REDSTONE_TORCH = new MaterialSetTag(keyFor("restone_torch"))
+ public static final MaterialSetTag REDSTONE_TORCH = new MaterialSetTag(keyFor("redstone_torch"))
+ .add(Material.REDSTONE_TORCH, Material.REDSTONE_WALL_TORCH)
+ .ensureSize("REDSTONE_TORCH", 2).lock();
+

View file

@ -54,6 +54,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Nullable
public static MapView getMap(int id) {
return server.getMap(id);
@@ -0,0 +0,0 @@ public final class Bukkit {
* Returns the primary logger associated with this server instance.
*
* @return Logger associated with this server
+ * @see org.bukkit.plugin.Plugin#getSLF4JLogger()
+ * @apiNote This logger is for the Minecraft server software, not for specific plugins. You should
+ * use a logger for a specific plugin, either via {@link org.bukkit.plugin.Plugin#getSLF4JLogger()}
+ * or {@link org.bukkit.plugin.Plugin#getLogger()} or create a specific logger for a class via slf4j.
+ * That way, log messages contain contextual information about the source of the message.
*/
@NotNull
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper - internalize Bukkit#getLogger
public static Logger getLogger() {
return server.getLogger();
}
@@ -0,0 +0,0 @@ public final class Bukkit {
* @param name the name the player to retrieve
* @return an offline player
@ -533,6 +548,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Nullable
public MapView getMap(int id);
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* Returns the primary logger associated with this server instance.
*
* @return Logger associated with this server
+ * @see org.bukkit.plugin.Plugin#getSLF4JLogger()
+ * @apiNote This logger is for the Minecraft server software, not for specific plugins. You should
+ * use a logger for a specific plugin, either via {@link org.bukkit.plugin.Plugin#getSLF4JLogger()}
+ * or {@link org.bukkit.plugin.Plugin#getLogger()} or create a specific logger for a class via slf4j.
+ * That way, log messages contain contextual information about the source of the message.
*/
@NotNull
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper - internalize Bukkit#getLogger
public Logger getLogger();
/**
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @param name the name the player to retrieve
* @return an offline player