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 {
|
public class PlaceholderListener implements Listener {
|
||||||
|
|
||||||
private PlaceholderAPIPlugin plugin;
|
private final PlaceholderAPIPlugin plugin;
|
||||||
|
|
||||||
public PlaceholderListener(PlaceholderAPIPlugin instance) {
|
public PlaceholderListener(PlaceholderAPIPlugin instance) {
|
||||||
plugin = instance;
|
plugin = instance;
|
||||||
|
@ -9,7 +9,7 @@ import org.bukkit.event.server.ServerLoadEvent;
|
|||||||
|
|
||||||
public class ServerLoadEventListener implements Listener {
|
public class ServerLoadEventListener implements Listener {
|
||||||
|
|
||||||
private PlaceholderAPIPlugin plugin;
|
private final PlaceholderAPIPlugin plugin;
|
||||||
|
|
||||||
public ServerLoadEventListener(PlaceholderAPIPlugin instance) {
|
public ServerLoadEventListener(PlaceholderAPIPlugin instance) {
|
||||||
plugin = instance;
|
plugin = instance;
|
||||||
|
@ -36,8 +36,8 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
public class PlaceholderAPICommands implements CommandExecutor {
|
public class PlaceholderAPICommands implements CommandExecutor {
|
||||||
|
|
||||||
private PlaceholderAPIPlugin plugin;
|
private final PlaceholderAPIPlugin plugin;
|
||||||
private CommandExecutor eCloud;
|
private final CommandExecutor eCloud;
|
||||||
|
|
||||||
public PlaceholderAPICommands(PlaceholderAPIPlugin i) {
|
public PlaceholderAPICommands(PlaceholderAPIPlugin i) {
|
||||||
plugin = i;
|
plugin = i;
|
||||||
|
@ -24,7 +24,7 @@ import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
|||||||
|
|
||||||
public class PlaceholderAPIConfig {
|
public class PlaceholderAPIConfig {
|
||||||
|
|
||||||
private PlaceholderAPIPlugin plugin;
|
private final PlaceholderAPIPlugin plugin;
|
||||||
|
|
||||||
public PlaceholderAPIConfig(PlaceholderAPIPlugin i) {
|
public PlaceholderAPIConfig(PlaceholderAPIPlugin i) {
|
||||||
plugin = i;
|
plugin = i;
|
||||||
|
@ -27,7 +27,7 @@ import org.bukkit.event.HandlerList;
|
|||||||
public class ExpansionRegisterEvent extends Event {
|
public class ExpansionRegisterEvent extends Event {
|
||||||
|
|
||||||
private static final HandlerList HANDLERS = new HandlerList();
|
private static final HandlerList HANDLERS = new HandlerList();
|
||||||
private PlaceholderExpansion expansion;
|
private final PlaceholderExpansion expansion;
|
||||||
|
|
||||||
public ExpansionRegisterEvent(PlaceholderExpansion expansion) {
|
public ExpansionRegisterEvent(PlaceholderExpansion expansion) {
|
||||||
this.expansion = expansion;
|
this.expansion = expansion;
|
||||||
|
@ -27,7 +27,7 @@ import org.bukkit.event.HandlerList;
|
|||||||
public class ExpansionUnregisterEvent extends Event {
|
public class ExpansionUnregisterEvent extends Event {
|
||||||
|
|
||||||
private static final HandlerList HANDLERS = new HandlerList();
|
private static final HandlerList HANDLERS = new HandlerList();
|
||||||
private PlaceholderExpansion expansion;
|
private final PlaceholderExpansion expansion;
|
||||||
|
|
||||||
public ExpansionUnregisterEvent(PlaceholderExpansion expansion) {
|
public ExpansionUnregisterEvent(PlaceholderExpansion expansion) {
|
||||||
this.expansion = expansion;
|
this.expansion = expansion;
|
||||||
|
@ -28,8 +28,8 @@ import org.bukkit.event.HandlerList;
|
|||||||
public class PlaceholderHookUnloadEvent extends Event {
|
public class PlaceholderHookUnloadEvent extends Event {
|
||||||
|
|
||||||
private static final HandlerList HANDLERS = new HandlerList();
|
private static final HandlerList HANDLERS = new HandlerList();
|
||||||
private String plugin;
|
private final String plugin;
|
||||||
private PlaceholderHook hook;
|
private final PlaceholderHook hook;
|
||||||
|
|
||||||
public PlaceholderHookUnloadEvent(String plugin, PlaceholderHook placeholderHook) {
|
public PlaceholderHookUnloadEvent(String plugin, PlaceholderHook placeholderHook) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
@ -36,7 +36,7 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
public final class ExpansionManager {
|
public final class ExpansionManager {
|
||||||
private PlaceholderAPIPlugin plugin;
|
private final PlaceholderAPIPlugin plugin;
|
||||||
|
|
||||||
public ExpansionManager(PlaceholderAPIPlugin instance) {
|
public ExpansionManager(PlaceholderAPIPlugin instance) {
|
||||||
plugin = instance;
|
plugin = instance;
|
||||||
|
@ -39,7 +39,7 @@ public enum NMSVersion {
|
|||||||
SPIGOT_1_13_R2("v1_13_R2"),
|
SPIGOT_1_13_R2("v1_13_R2"),
|
||||||
SPIGOT_1_14_R1("v1_14_R1");
|
SPIGOT_1_14_R1("v1_14_R1");
|
||||||
|
|
||||||
private String version;
|
private final String version;
|
||||||
|
|
||||||
NMSVersion(String version) {
|
NMSVersion(String version) {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
|
@ -22,9 +22,8 @@ package me.clip.placeholderapi.expansion;
|
|||||||
|
|
||||||
public final class Version {
|
public final class Version {
|
||||||
|
|
||||||
private boolean isSpigot;
|
private final boolean isSpigot;
|
||||||
|
private final String version;
|
||||||
private String version;
|
|
||||||
|
|
||||||
public Version(String version, boolean isSpigot) {
|
public Version(String version, boolean isSpigot) {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
|
@ -28,9 +28,8 @@ import org.bukkit.plugin.Plugin;
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public abstract class EZPlaceholderHook extends PlaceholderHook {
|
public abstract class EZPlaceholderHook extends PlaceholderHook {
|
||||||
|
|
||||||
private String identifier;
|
private final String identifier;
|
||||||
|
private final String plugin;
|
||||||
private String plugin;
|
|
||||||
|
|
||||||
public EZPlaceholderHook(Plugin plugin, String identifier) {
|
public EZPlaceholderHook(Plugin plugin, String identifier) {
|
||||||
Validate.notNull(plugin, "Plugin can not be null!");
|
Validate.notNull(plugin, "Plugin can not be null!");
|
||||||
|
@ -15,8 +15,9 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
|||||||
public class UpdateChecker implements Listener {
|
public class UpdateChecker implements Listener {
|
||||||
|
|
||||||
private final int RESOURCE_ID = 6245;
|
private final int RESOURCE_ID = 6245;
|
||||||
private PlaceholderAPIPlugin plugin;
|
private final PlaceholderAPIPlugin plugin;
|
||||||
private String spigotVersion, pluginVersion;
|
private String spigotVersion;
|
||||||
|
private final String pluginVersion;
|
||||||
private boolean updateAvailable;
|
private boolean updateAvailable;
|
||||||
|
|
||||||
public UpdateChecker(PlaceholderAPIPlugin i) {
|
public UpdateChecker(PlaceholderAPIPlugin i) {
|
||||||
|
Loading…
Reference in New Issue
Block a user