Fixed some warnings.
This commit is contained in:
parent
7a3aa34b43
commit
a5adc828dc
12 changed files with 13 additions and 20 deletions
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
|||
|
||||
public class Config {
|
||||
private static Config instance = new Config();
|
||||
private Glimmer glim = Nemesis.getInstance().getGlimmer();
|
||||
private final Glimmer glim = Nemesis.getInstance().getGlimmer();
|
||||
private File file;
|
||||
|
||||
private List<Policy> policies = new ArrayList<>();
|
||||
|
|
@ -17,10 +17,10 @@ public class Config {
|
|||
private Config() {}
|
||||
|
||||
public void load() {
|
||||
List<Policy> newPolicies = glim.loadPoliciesFromFile(glim.loadConfigFile());
|
||||
policies = newPolicies;
|
||||
policies = glim.loadPoliciesFromFile(glim.loadConfigFile());
|
||||
}
|
||||
|
||||
// TODO: Implement config saving
|
||||
//
|
||||
// public void save() {
|
||||
// try {
|
||||
// config.save(file);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package io.github.adrianvic.nemesiseye;
|
||||
|
||||
import io.github.adrianvic.nemesiseye.commands.EyeCore;
|
||||
import io.github.adrianvic.nemesiseye.reflection.Glimmer;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
|
|
|||
|
|
@ -49,5 +49,5 @@ public class EyeCore {
|
|||
return List.of();
|
||||
}
|
||||
|
||||
public Map<String, Subcommand> getSubs() { return subs; };
|
||||
public Map<String, Subcommand> getSubs() { return subs; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package io.github.adrianvic.nemesiseye.commands.sub;
|
|||
|
||||
import io.github.adrianvic.nemesiseye.Config;
|
||||
import io.github.adrianvic.nemesiseye.policy.Policy;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import org.bukkit.entity.HumanEntity;
|
|||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class useEnchantment implements NodeHandler {
|
||||
private Glimmer glim = Nemesis.getInstance().getGlimmer();
|
||||
private final Glimmer glim = Nemesis.getInstance().getGlimmer();
|
||||
|
||||
@Override
|
||||
public boolean allows(HumanEntity entity, PolicyNode node, Action action) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import org.bukkit.entity.HumanEntity;
|
|||
|
||||
public class useItem implements NodeHandler {
|
||||
|
||||
private Glimmer glim = Nemesis.getInstance().getGlimmer();
|
||||
private final Glimmer glim = Nemesis.getInstance().getGlimmer();
|
||||
|
||||
@Override
|
||||
public boolean allows(HumanEntity entity, PolicyNode node, Action action) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue