Override more connection send methods

This commit is contained in:
fullwall 2023-10-09 00:56:44 +08:00
parent ba74dc8ad2
commit 58234c469c
2 changed files with 8 additions and 3 deletions

View File

@ -25,10 +25,18 @@ public class EmptyConnection extends Connection {
return true;
}
@Override
public void send(Packet packet) {
}
@Override
public void send(Packet packet, PacketSendListener genericfuturelistener) {
}
@Override
public void send(Packet packet, PacketSendListener genericfuturelistener, boolean flag) {
}
@Override
public void setListener(PacketListener pl) {
try {

View File

@ -1298,9 +1298,6 @@ public class NMSImpl implements NMSBridge {
public void removeFromWorld(org.bukkit.entity.Entity entity) {
Preconditions.checkNotNull(entity);
Entity nmsEntity = ((CraftEntity) entity).getHandle();
ServerLevel level = (ServerLevel) nmsEntity.level();
if (level.getEntity(entity.getEntityId()) == null)
return;
((ServerLevel) nmsEntity.level()).getChunkSource().removeEntity(nmsEntity);
}