Skip to content

Commit

Permalink
Remove AnnoyingOptions#prefix
Browse files Browse the repository at this point in the history
Replaced by global placeholders which were added in an earlier commit
  • Loading branch information
srnyx committed Jan 22, 2023
1 parent 909e96a commit e8869e5
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -19,7 +19,7 @@ You can find the Javadocs at [jitpack.io/com/github/srnyx/annoying-api/latest/ja

### Importing

You can import the API using [Jitpack](https://jitpack.io/#xyz.srnyx/annoying-api). It's **HIGHLY** recommended to implement the API, all of the examples below will implement it. Make sure to replace `VERSION` with the version you want.
You can import the API using [Jitpack](https://jitpack.io/#xyz.srnyx/annoying-api). It's **HIGHLY** recommended to implement the API, all the examples below will implement it. Make sure to replace `VERSION` with the version you want.

- **Gradle Kotlin** (`build.gradle.kts`)**:**
```kotlin
Expand Down
Expand Up @@ -41,7 +41,6 @@ public class AnnoyingMessage {
public AnnoyingMessage(@NotNull AnnoyingPlugin plugin, @NotNull String key) {
this.plugin = plugin;
this.key = key;
replace("%prefix%", plugin.getMessagesString(plugin.options.prefix));
plugin.globalPlaceholders.forEach((placeholder, value) -> replace("%" + placeholder + "%", value));
}

Expand Down
5 changes: 0 additions & 5 deletions api/src/main/java/xyz/srnyx/annoyingapi/AnnoyingOptions.java
Expand Up @@ -21,11 +21,6 @@ public class AnnoyingOptions {
*/
@NotNull public String messagesFileName = "messages.yml";

/**
* <i>{@code OPTIONAL}</i> The {@link AnnoyingPlugin#messages} key for the plugin's prefix
*/
@NotNull public String prefix = "plugin.prefix";

/**
* <i>{@code OPTIONAL}</i> The {@link AnnoyingPlugin#messages} key for the plugin's global placeholders
*
Expand Down
Expand Up @@ -21,7 +21,6 @@ public ExamplePlugin() {

// Options
options.messagesFileName = "msgs.yml";
options.prefix = "prefix";
options.splitterJson = "splitter.json";
options.splitterPlaceholder = "splitter.placeholder";
options.noPermission = "no-permission";
Expand Down

0 comments on commit e8869e5

Please sign in to comment.