mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 08:32:07 -07:00
Fixed a further exploit with players attacking more things that they shouldn't.
This commit is contained in:
@@ -923,9 +923,10 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||
this.player.updateInventory(this.player.activeContainer);
|
||||
}
|
||||
} else if (packet7useentity.c == 1) {
|
||||
if (entity instanceof EntityItem) {
|
||||
disconnect("Attacking an item is not permitted");
|
||||
System.out.println("Player " + player.name + " tried to attack an item entity, so I have disconnected them for exploiting.");
|
||||
if ((entity instanceof EntityItem) || (entity instanceof EntityExperienceOrb) || (entity instanceof EntityArrow)) {
|
||||
String type = entity.getClass().getSimpleName();
|
||||
disconnect("Attacking an " + type + " is not permitted");
|
||||
System.out.println("Player " + player.name + " tried to attack an " + type + ", so I have disconnected them for exploiting.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user