Fixed location comparison for DamnSpam block break
This commit is contained in:
@@ -249,7 +249,7 @@ public class DamnSpam implements Module, Listener {
|
|||||||
Player sender = event.getPlayer();
|
Player sender = event.getPlayer();
|
||||||
|
|
||||||
String typeStr = block.getType().toString().toLowerCase().replace("_", " ");
|
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()) {
|
if (!sender.isSneaking()) {
|
||||||
getLogger().message(sender, true, "You cannot destroy " + inputStr);
|
getLogger().message(sender, true, "You cannot destroy " + inputStr);
|
||||||
|
|||||||
Reference in New Issue
Block a user