Archived
0

Fixed location comparison for DamnSpam block break

This commit is contained in:
David Panić
2019-04-17 20:05:01 +02:00
parent 2798f11221
commit 8fe29a75ae

View File

@@ -249,7 +249,7 @@ public class DamnSpam implements Module, Listener {
Player sender = event.getPlayer();
String typeStr = block.getType().toString().toLowerCase().replace("_", " ");
String inputStr = (block.getLocation().equals(event.getBlock()) ? "this " + typeStr : "the " + typeStr + " attached to that block");
String inputStr = (block.getLocation().equals(event.getBlock().getLocation()) ? "this " + typeStr : "the " + typeStr + " attached to that block");
if (!sender.isSneaking()) {
getLogger().message(sender, true, "You cannot destroy " + inputStr);