This commit is contained in:
Brianna O'Keefe 2018-11-23 18:50:15 -05:00
parent 10a76686f3
commit 1c97d7f627
3 changed files with 10 additions and 8 deletions

View File

@ -25,7 +25,7 @@ public class CommandManager implements CommandExecutor {
this.instance = instance;
instance.getCommand("UltimateRepairing").setExecutor(this);
instance.getCommand("rpanvil").setExecutor(this);
instance.getCommand("uranvil").setExecutor(this);
AbstractCommand commandUltimateRepairing = addCommand(new CommandUltimateRepairing());
addCommand(new CommandURAnvil());

View File

@ -63,7 +63,7 @@ public class Editor {
}
public void toggleHologram(Player player) {
String loc = ArconixAPI.getApi().serialize().serializeLocation(editing.get(player));
String loc = ArconixAPI.getApi().serialize().serializeLocation(editing.get(player.getUniqueId()));
if (instance.getConfig().getString("data.anvil." + loc + ".active") == null)
instance.getConfig().set("data.anvil." + loc + ".active", true);
@ -74,11 +74,11 @@ public class Editor {
}
instance.getHologramHandler().updateHolograms();
instance.saveConfig();
open(player, editing.get(player));
open(player, editing.get(player.getUniqueId()));
}
public void toggleInfinity(Player player) {
String loc = ArconixAPI.getApi().serialize().serializeLocation(editing.get(player));
String loc = ArconixAPI.getApi().serialize().serializeLocation(editing.get(player.getUniqueId()));
if (instance.getConfig().getString("data.anvil." + loc + ".active") == null)
instance.getConfig().set("data.anvil." + loc + ".active", true);
if (instance.getConfig().getString("data.anvil." + loc + ".inf") == null) {
@ -87,11 +87,11 @@ public class Editor {
instance.getConfig().set("data.anvil." + loc + ".inf", null);
}
instance.saveConfig();
open(player, editing.get(player));
open(player, editing.get(player.getUniqueId()));
}
public void toggleParticles(Player player) {
String loc = ArconixAPI.getApi().serialize().serializeLocation(editing.get(player));
String loc = ArconixAPI.getApi().serialize().serializeLocation(editing.get(player.getUniqueId()));
if (instance.getConfig().getString("data.anvil." + loc + ".active") == null)
instance.getConfig().set("data.anvil." + loc + ".active", true);
if (instance.getConfig().getString("data.anvil." + loc + ".particles") == null) {
@ -100,7 +100,7 @@ public class Editor {
instance.getConfig().set("data.anvil." + loc + ".particles", null);
}
instance.saveConfig();
open(player, editing.get(player));
open(player, editing.get(player.getUniqueId()));
}
public boolean isEditing(Player player) {

View File

@ -61,7 +61,9 @@ public class InteractListeners implements Listener {
repair = true;
} else
repair = true;
} else if (p.isSneaking() && p.hasPermission("ultimaterepairing.admin")) {
} else if (p.isSneaking()
&& p.hasPermission("ultimaterepairing.admin")
&& e.getAction() == Action.RIGHT_CLICK_BLOCK) {
instance.getEditor().open(p, e.getClickedBlock());
e.setCancelled(true);
}