Skip to content

Commit 9047beb

Browse files
committed
Add more information to warnings
1 parent 1f07f44 commit 9047beb

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

core/src/main/java/net/licks92/WirelessRedstone/Signs/WirelessReceiver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ protected void changeState(boolean newState, String channelName) {
8080

8181
if (blockFace == null) {
8282
block.setType(Material.AIR);
83-
WirelessRedstone.getWRLogger().warning("Receiver at " + block.getLocation().toString() + " is in a invalid position!");
83+
WirelessRedstone.getWRLogger().warning("Receiver " + toString() + " is in a invalid position!");
8484
return;
8585
}
8686

8787
if (!Utils.getAxisBlockFaces(false).contains(blockFace)) {
8888
block.setType(Material.AIR);
89-
WirelessRedstone.getWRLogger().warning("Receiver at " + block.getLocation().toString() + " has an invalid BlockFace! " +
89+
WirelessRedstone.getWRLogger().warning("Receiver " + toString() + " has an invalid BlockFace! " +
9090
"The BlockFace needs to be one of these values values=[north, south, west, east]");
9191
return;
9292
}
@@ -107,7 +107,7 @@ protected void changeState(boolean newState, String channelName) {
107107
} else {
108108
block.setType(CompatMaterial.SIGN.getMaterial());
109109
if (!(block.getState() instanceof Sign)) {
110-
WirelessRedstone.getWRLogger().warning("Block at " + block.getLocation() + " is not a Sign but the plugin does expect it to be a Sign. " +
110+
WirelessRedstone.getWRLogger().warning("Receiver " + toString() + " is not a Sign but the plugin does expect it to be a Sign. " +
111111
"Is the sign at a valid location?");
112112
return;
113113
}
@@ -121,7 +121,7 @@ protected void changeState(boolean newState, String channelName) {
121121

122122
public void changeSignContent(Block block, String channelName) {
123123
if (!(block.getState() instanceof Sign)) {
124-
WirelessRedstone.getWRLogger().warning("Block at " + block.getLocation() + " is not a Sign but the plugin does expect it to be a Sign. " +
124+
WirelessRedstone.getWRLogger().warning("Receiver " + toString() + " is not a Sign but the plugin does expect it to be a Sign. " +
125125
"Is the sign at a valid location?");
126126
return;
127127
}

core/src/main/java/net/licks92/WirelessRedstone/Signs/WirelessReceiverClock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void turnOff(String channelName) {
5959
@Override
6060
public void changeSignContent(Block block, String channelName) {
6161
if (!(block.getState() instanceof Sign)) {
62-
WirelessRedstone.getWRLogger().warning("Block at " + block.getLocation() + " is not a Sign but the plugin does expect it to be a Sign. " +
62+
WirelessRedstone.getWRLogger().warning("Receiver " + toString() + " is not a Sign but the plugin does expect it to be a Sign. " +
6363
"Is the sign at a valid location?");
6464
return;
6565
}

core/src/main/java/net/licks92/WirelessRedstone/Signs/WirelessReceiverDelayer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void turnOff(String channelName) {
4545
@Override
4646
public void changeSignContent(Block block, String channelName) {
4747
if (!(block.getState() instanceof Sign)) {
48-
WirelessRedstone.getWRLogger().warning("Block at " + block.getLocation() + " is not a Sign but the plugin does expect it to be a Sign. " +
48+
WirelessRedstone.getWRLogger().warning("Receiver " + toString() + " is not a Sign but the plugin does expect it to be a Sign. " +
4949
"Is the sign at a valid location?");
5050
return;
5151
}

core/src/main/java/net/licks92/WirelessRedstone/Signs/WirelessReceiverInverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void turnOff(String channelName) {
3232
@Override
3333
public void changeSignContent(Block block, String channelName) {
3434
if (!(block.getState() instanceof Sign)) {
35-
WirelessRedstone.getWRLogger().warning("Block at " + block.getLocation() + " is not a Sign but the plugin does expect it to be a Sign. " +
35+
WirelessRedstone.getWRLogger().warning("Receiver " + toString() + " is not a Sign but the plugin does expect it to be a Sign. " +
3636
"Is the sign at a valid location?");
3737
return;
3838
}

core/src/main/java/net/licks92/WirelessRedstone/Signs/WirelessReceiverSwitch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public void turnOff(String channelName) {
4545
@Override
4646
public void changeSignContent(Block block, String channelName) {
4747
if (!(block.getState() instanceof Sign)) {
48-
WirelessRedstone.getWRLogger().warning("Block at " + block.getLocation() + " is not a Sign but the plugin does expect it to be a Sign. " +
48+
WirelessRedstone.getWRLogger().warning("Receiver " + toString() + " is not a Sign but the plugin does expect it to be a Sign. " +
4949
"Is the sign at a valid location?");
5050
return;
5151
}

0 commit comments

Comments
 (0)