From 1f53daf41606d0d07f53eac581350f0ff9ca10a0 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Mon, 23 Aug 2021 01:58:15 +0200 Subject: [PATCH] Some more corrections --- wiki/PlaceholderExpansion.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wiki/PlaceholderExpansion.md b/wiki/PlaceholderExpansion.md index 60ff3ce..984b071 100644 --- a/wiki/PlaceholderExpansion.md +++ b/wiki/PlaceholderExpansion.md @@ -148,7 +148,7 @@ It is worth noting that it is a bit more difficult to make a separate jar file t One way to bypass this is to override the `canRegister()` method with the following code: ```java -SomePlugin plugin; // This would be the plugin your expansion depends on +private SomePlugin plugin = null; // This would be the plugin your expansion depends on @Override public boolean canregister() { @@ -171,7 +171,7 @@ import me.clip.placeholderapi.expansion.PlaceholderExpansion; public class SomeExpansion extends PlaceholderExpansion { - SomePlugin plugin; // This instance is assigned in canRegister() + private SomePlugin plugin; // This instance is assigned in canRegister() @Override public String getAuthor() { @@ -225,7 +225,7 @@ Here is a small code example of how dependency injection may look: ```java public class SomeExpansion extends PlaceholderExpansion { - final SomePlugin plugin; // The instance is created in the constructor and won't be modified, so it can be final + private final SomePlugin plugin; // The instance is created in the constructor and won't be modified, so it can be final public SomeExpansion(SomePlugin plugin) { this.plugin = plugin; @@ -246,7 +246,7 @@ import me.clip.placeholderapi.expansion.PlaceholderExpansion; public class SomeExpansion extends PlaceholderExpansion { -private SomePlugin plugin; + private final SomePlugin plugin; public SomeExpansion(SomePlugin plugin) { this.plugin = plugin; @@ -332,7 +332,7 @@ import me.clip.placeholderapi.expansion.Relational; public class SomeExpansion extends PlaceholderExpansion implements Relational { - SomePlugin plugin; + private final SomePlugin plugin; public SomeExpansion(SomePlugin plugin) { this.plugin = plugin;