|
@@ -72,8 +72,6 @@ public class ATM implements Listener, CommandExecutor {
|
|
|
|
|
|
private List<Inventory> openATMs = new ArrayList<Inventory>();
|
|
private List<Inventory> openATMs = new ArrayList<Inventory>();
|
|
|
|
|
|
- final String atmSignLabel = Main.finalconfig.getString("atm_sign_label");
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Creates a new atm instance with the {@link de.Linus122.TimeIsMoney.Main} class.
|
|
* Creates a new atm instance with the {@link de.Linus122.TimeIsMoney.Main} class.
|
|
*
|
|
*
|
|
@@ -251,7 +249,7 @@ public class ATM implements Listener, CommandExecutor {
|
|
if (e.getClickedBlock() != null) {
|
|
if (e.getClickedBlock() != null) {
|
|
if (e.getClickedBlock().getState() instanceof Sign) {
|
|
if (e.getClickedBlock().getState() instanceof Sign) {
|
|
Sign sign = (Sign) e.getClickedBlock().getState();
|
|
Sign sign = (Sign) e.getClickedBlock().getState();
|
|
- if (sign.getLine(0).equalsIgnoreCase(CC(atmSignLabel))) {
|
|
|
|
|
|
+ if (sign.getLine(0).equalsIgnoreCase(CC(Main.finalconfig.getString("atm_sign_label")))) {
|
|
if (!e.getPlayer().hasPermission("tim.atm.use")) {
|
|
if (!e.getPlayer().hasPermission("tim.atm.use")) {
|
|
e.getPlayer().sendMessage(CC(Main.finalconfig.getString("message_atm_noperms")));
|
|
e.getPlayer().sendMessage(CC(Main.finalconfig.getString("message_atm_noperms")));
|
|
} else {
|
|
} else {
|
|
@@ -419,12 +417,14 @@ public class ATM implements Listener, CommandExecutor {
|
|
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () -> {
|
|
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () -> {
|
|
if (b.getState() instanceof Sign) {
|
|
if (b.getState() instanceof Sign) {
|
|
Sign sign = (Sign) e.getBlock().getState();
|
|
Sign sign = (Sign) e.getBlock().getState();
|
|
- if (sign.getLine(0).equalsIgnoreCase("[ATM]") || sign.getLine(0).equalsIgnoreCase(atmSignLabel) || sign.getLine(0).equalsIgnoreCase(CC(atmSignLabel))) {
|
|
|
|
|
|
+ if (sign.getLine(0).equalsIgnoreCase("[ATM]")
|
|
|
|
+ || sign.getLine(0).equalsIgnoreCase(Main.finalconfig.getString("atm_sign_label"))
|
|
|
|
+ || sign.getLine(0).equalsIgnoreCase(CC(Main.finalconfig.getString("atm_sign_label")))) {
|
|
if (!e.getPlayer().hasPermission("tim.atm.place")) {
|
|
if (!e.getPlayer().hasPermission("tim.atm.place")) {
|
|
e.getPlayer().sendMessage(CC(Main.finalconfig.getString("message_atm_nopermbuild")));
|
|
e.getPlayer().sendMessage(CC(Main.finalconfig.getString("message_atm_nopermbuild")));
|
|
sign.setLine(0, "");
|
|
sign.setLine(0, "");
|
|
} else {
|
|
} else {
|
|
- sign.setLine(0, CC(atmSignLabel));
|
|
|
|
|
|
+ sign.setLine(0, CC(Main.finalconfig.getString("atm_sign_label")));
|
|
sign.update();
|
|
sign.update();
|
|
e.getPlayer().sendMessage(CC(Main.finalconfig.getString("message_atm_created")));
|
|
e.getPlayer().sendMessage(CC(Main.finalconfig.getString("message_atm_created")));
|
|
}
|
|
}
|