-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy path0023-Add-SLF4J-implementation.patch
35 lines (31 loc) · 1.34 KB
/
0023-Add-SLF4J-implementation.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: uRyanxD <[email protected]>
Date: Sat, 20 May 2023 12:22:50 -0300
Subject: [PATCH] Add SLF4J implementation
diff --git a/build.gradle.kts b/build.gradle.kts
index a739f2e6736456b3b03eee79771bac58e081e564..22a5fe9c59d1b2a8283e1ebb503c77b2be892fb5 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -19,6 +19,7 @@ dependencies {
// bundled with Minecraft, should be kept in sync
api("com.google.guava:guava:17.0")
api("com.google.code.gson:gson:2.2.4")
+ api("org.slf4j:slf4j-api:1.7.35") // PandaSpigot - Add SLF4J Logger
// testing
testImplementation("junit:junit:4.12")
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
index 7bdc809c6d99eb837c276d43ebae36cd8ddb07d6..aa75872e7f42b2b89532ed6023fa275e55b977c0 100644
--- a/src/main/java/org/bukkit/plugin/Plugin.java
+++ b/src/main/java/org/bukkit/plugin/Plugin.java
@@ -177,6 +177,12 @@ public interface Plugin extends TabExecutor {
*/
public Logger getLogger();
+ // PandaSpigot start - Add SLF4J logger
+ default org.slf4j.Logger getSLF4JLogger() {
+ return org.slf4j.LoggerFactory.getLogger(getLogger().getName());
+ }
+ // PandaSpigot end
+
/**
* Returns the name of the plugin.
* <p>