-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b35adc
commit b4f04ff
Showing
3 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: powercas_gamer <cas@mizule.dev> | ||
Date: Mon, 15 Jul 2024 02:07:49 +0000 | ||
Subject: [PATCH] add Plugin#getDataPath | ||
|
||
|
||
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java | ||
index 0ff8b53f900092dc419d61a8ede0a7cd72a2e1e1..29ce61fce75606fbcc63b798fc8f13d3eafd2b74 100644 | ||
--- a/src/main/java/org/bukkit/plugin/Plugin.java | ||
+++ b/src/main/java/org/bukkit/plugin/Plugin.java | ||
@@ -26,6 +26,19 @@ public interface Plugin extends TabExecutor, io.papermc.paper.plugin.lifecycle.e | ||
@NotNull | ||
public File getDataFolder(); | ||
|
||
+ // Paper start - add getDataPath() | ||
+ /** | ||
+ * Returns the path that the plugin data files are located in. | ||
+ * The folder may not yet exist. | ||
+ * | ||
+ * @see #getDataFolder() | ||
+ * @return The folder | ||
+ */ | ||
+ default @NotNull java.nio.file.Path getDataPath() { | ||
+ return getDataFolder().toPath(); | ||
+ } | ||
+ // Paper end - add getDataPath() | ||
+ | ||
/** | ||
* Returns the plugin.yml file containing the details for this plugin | ||
* |