mirror of
https://github.com/songoda/UltimateRepairing.git
synced 2024-11-26 04:25:17 +01:00
fixed
This commit is contained in:
parent
10a76686f3
commit
1c97d7f627
@ -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());
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user