Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
141f51ee83
Commit
a01bc9aaaf
@ -503,14 +503,7 @@ public class PacketProcessor {
|
|||||||
boolean drawn = source.readBoolean();
|
boolean drawn = source.readBoolean();
|
||||||
boolean offHand = source.readBoolean();
|
boolean offHand = source.readBoolean();
|
||||||
|
|
||||||
execSync(() -> {
|
execSync(() -> REntity.getEntity(entityId).setBowDrawn(drawn, offHand));
|
||||||
REntity entity = REntity.getEntity(entityId);
|
|
||||||
if(entity != null) {
|
|
||||||
entity.setBowDrawn(drawn, offHand);
|
|
||||||
} else {
|
|
||||||
Bukkit.getLogger().log(Level.SEVERE, "Bow drawn of nonexistent player? " + entityId + " " + Arrays.toString(lastPackets.toArray()));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void damage() throws IOException {
|
private void damage() throws IOException {
|
||||||
|
@ -316,15 +316,17 @@ public interface Recorder {
|
|||||||
|
|
||||||
default void write(int id, Object... objects){
|
default void write(int id, Object... objects){
|
||||||
DataOutputStream stream = getStream();
|
DataOutputStream stream = getStream();
|
||||||
try {
|
synchronized (stream) {
|
||||||
stream.writeByte(id);
|
try {
|
||||||
for(Object o : objects) {
|
stream.writeByte(id);
|
||||||
writeObject(stream, o);
|
for(Object o : objects) {
|
||||||
|
writeObject(stream, o);
|
||||||
|
}
|
||||||
|
stream.flush();
|
||||||
|
} catch (IOException e) {
|
||||||
|
Bukkit.getLogger().log(Level.SEVERE, "Could not write", e);
|
||||||
|
disable();
|
||||||
}
|
}
|
||||||
stream.flush();
|
|
||||||
} catch (IOException e) {
|
|
||||||
Bukkit.getLogger().log(Level.SEVERE, "Could not write", e);
|
|
||||||
disable();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren