mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Make various things final
This commit is contained in:
parent
64a6389ebf
commit
4851655110
@ -40,7 +40,7 @@ import org.bukkit.event.server.PluginDisableEvent;
|
||||
|
||||
public class PlaceholderListener implements Listener {
|
||||
|
||||
private PlaceholderAPIPlugin plugin;
|
||||
private final PlaceholderAPIPlugin plugin;
|
||||
|
||||
public PlaceholderListener(PlaceholderAPIPlugin instance) {
|
||||
plugin = instance;
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.event.server.ServerLoadEvent;
|
||||
|
||||
public class ServerLoadEventListener implements Listener {
|
||||
|
||||
private PlaceholderAPIPlugin plugin;
|
||||
private final PlaceholderAPIPlugin plugin;
|
||||
|
||||
public ServerLoadEventListener(PlaceholderAPIPlugin instance) {
|
||||
plugin = instance;
|
||||
|
@ -36,8 +36,8 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class PlaceholderAPICommands implements CommandExecutor {
|
||||
|
||||
private PlaceholderAPIPlugin plugin;
|
||||
private CommandExecutor eCloud;
|
||||
private final PlaceholderAPIPlugin plugin;
|
||||
private final CommandExecutor eCloud;
|
||||
|
||||
public PlaceholderAPICommands(PlaceholderAPIPlugin i) {
|
||||
plugin = i;
|
||||
|
@ -24,7 +24,7 @@ import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||
|
||||
public class PlaceholderAPIConfig {
|
||||
|
||||
private PlaceholderAPIPlugin plugin;
|
||||
private final PlaceholderAPIPlugin plugin;
|
||||
|
||||
public PlaceholderAPIConfig(PlaceholderAPIPlugin i) {
|
||||
plugin = i;
|
||||
|
@ -27,7 +27,7 @@ import org.bukkit.event.HandlerList;
|
||||
public class ExpansionRegisterEvent extends Event {
|
||||
|
||||
private static final HandlerList HANDLERS = new HandlerList();
|
||||
private PlaceholderExpansion expansion;
|
||||
private final PlaceholderExpansion expansion;
|
||||
|
||||
public ExpansionRegisterEvent(PlaceholderExpansion expansion) {
|
||||
this.expansion = expansion;
|
||||
|
@ -27,7 +27,7 @@ import org.bukkit.event.HandlerList;
|
||||
public class ExpansionUnregisterEvent extends Event {
|
||||
|
||||
private static final HandlerList HANDLERS = new HandlerList();
|
||||
private PlaceholderExpansion expansion;
|
||||
private final PlaceholderExpansion expansion;
|
||||
|
||||
public ExpansionUnregisterEvent(PlaceholderExpansion expansion) {
|
||||
this.expansion = expansion;
|
||||
|
@ -28,8 +28,8 @@ import org.bukkit.event.HandlerList;
|
||||
public class PlaceholderHookUnloadEvent extends Event {
|
||||
|
||||
private static final HandlerList HANDLERS = new HandlerList();
|
||||
private String plugin;
|
||||
private PlaceholderHook hook;
|
||||
private final String plugin;
|
||||
private final PlaceholderHook hook;
|
||||
|
||||
public PlaceholderHookUnloadEvent(String plugin, PlaceholderHook placeholderHook) {
|
||||
this.plugin = plugin;
|
||||
|
@ -36,7 +36,7 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public final class ExpansionManager {
|
||||
private PlaceholderAPIPlugin plugin;
|
||||
private final PlaceholderAPIPlugin plugin;
|
||||
|
||||
public ExpansionManager(PlaceholderAPIPlugin instance) {
|
||||
plugin = instance;
|
||||
|
@ -39,7 +39,7 @@ public enum NMSVersion {
|
||||
SPIGOT_1_13_R2("v1_13_R2"),
|
||||
SPIGOT_1_14_R1("v1_14_R1");
|
||||
|
||||
private String version;
|
||||
private final String version;
|
||||
|
||||
NMSVersion(String version) {
|
||||
this.version = version;
|
||||
|
@ -22,9 +22,8 @@ package me.clip.placeholderapi.expansion;
|
||||
|
||||
public final class Version {
|
||||
|
||||
private boolean isSpigot;
|
||||
|
||||
private String version;
|
||||
private final boolean isSpigot;
|
||||
private final String version;
|
||||
|
||||
public Version(String version, boolean isSpigot) {
|
||||
this.version = version;
|
||||
|
@ -28,9 +28,8 @@ import org.bukkit.plugin.Plugin;
|
||||
@Deprecated
|
||||
public abstract class EZPlaceholderHook extends PlaceholderHook {
|
||||
|
||||
private String identifier;
|
||||
|
||||
private String plugin;
|
||||
private final String identifier;
|
||||
private final String plugin;
|
||||
|
||||
public EZPlaceholderHook(Plugin plugin, String identifier) {
|
||||
Validate.notNull(plugin, "Plugin can not be null!");
|
||||
|
@ -15,8 +15,9 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
||||
public class UpdateChecker implements Listener {
|
||||
|
||||
private final int RESOURCE_ID = 6245;
|
||||
private PlaceholderAPIPlugin plugin;
|
||||
private String spigotVersion, pluginVersion;
|
||||
private final PlaceholderAPIPlugin plugin;
|
||||
private String spigotVersion;
|
||||
private final String pluginVersion;
|
||||
private boolean updateAvailable;
|
||||
|
||||
public UpdateChecker(PlaceholderAPIPlugin i) {
|
||||
|
Loading…
Reference in New Issue
Block a user