Skip to content

Commit bf77855

Browse files
committed
fix: correct notification configuration keys and method name for clarity
1 parent d737be4 commit bf77855

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/main/java/net/onelitefeather/antiredstoneclockremastered/service/impl/AdminNotificationService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void sendNotificationMessage(@NotNull Location location) {
5050

5151
@Override
5252
public boolean isEnabled() {
53-
return this.plugin.getConfig().getBoolean("clock.", true)
54-
|| this.plugin.getConfig().getStringList("notification.enabled").contains("console");
53+
return this.plugin.getConfig().getBoolean("clock.notifyAdmins", true)
54+
|| this.plugin.getConfig().getStringList("notification.enabled").contains("admins");
5555
}
5656
}

src/main/java/net/onelitefeather/antiredstoneclockremastered/service/impl/ConsoleNotificationService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void sendNotificationMessage(@NotNull Location location) {
4141

4242
@Override
4343
public boolean isEnabled() {
44-
return this.plugin.getConfig().getBoolean("clock.notifyAdmins", true)
45-
|| this.plugin.getConfig().getStringList("notification.enabled").contains("admins");
44+
return this.plugin.getConfig().getBoolean("clock.notifyConsole", true)
45+
|| this.plugin.getConfig().getStringList("notification.enabled").contains("console");
4646
}
4747
}

src/main/java/net/onelitefeather/antiredstoneclockremastered/service/impl/SignNotificationService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ public SignNotificationService(@NotNull AntiRedstoneClockRemastered plugin,
3333
this.regionService = regionService;
3434
this.metaValue = new FixedMetadataValue(plugin, Constants.META_KEY_ARCR_SIGN);
3535
if (isEnabled()) {
36-
this.warnForToLongText();
36+
this.warnForTooLongText();
3737
}
3838
}
3939

40-
private void warnForToLongText() {
40+
private void warnForTooLongText() {
4141
var size = this.plugin.getConfig().getStringList("notification.sign.back").size();
4242
if (size > Constants.MAX_SIGN_LINES) {
4343
LOGGER.warn("Sign notification 'back' side has too many lines: {}", size);

0 commit comments

Comments
 (0)