mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 21:59:05 +00:00
Chair + Hammer Pushing Functionality
This commit is contained in:
1 parent
ffcc8f603f
commit
eda6b72058
9 files changed
+274
-27
No files matched your search
@@ -93,6 +93,13 @@ public class PacketUtil {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case HAMMER:
|
||||
if (item.getItem() != CustomItems.tool || item.getItemDamage() != 0) {
|
||||
LogWriter.error(String.format("%s attempted to utilize a %s Packet without a Pather, they could be a hacker",
|
||||
player.getCommandSenderName(), type));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -149,6 +156,8 @@ public class PacketUtil {
|
||||
|| item.getItem() == Item.getItemFromBlock(CustomItems.redstoneBlock));
|
||||
case BRUSH:
|
||||
return item.getItem() == CustomItems.tool && item.getItemDamage() == 1;
|
||||
case HAMMER:
|
||||
return item.getItem() == CustomItems.tool && item.getItemDamage() == 0;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -186,6 +195,8 @@ public class PacketUtil {
|
||||
return "valid Block";
|
||||
case BRUSH:
|
||||
return "Paintbrush";
|
||||
case HAMMER:
|
||||
return "Hammer";
|
||||
default:
|
||||
return type.toString();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user