SteamWar/SpigotCore
Archiviert
13
0

Fix stuff from merge
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2023-02-23 11:03:36 +01:00
Ursprung 6302808676
Commit 833e6f5818

Datei anzeigen

@ -22,6 +22,7 @@ package de.steamwar.entity;
import com.comphenix.tinyprotocol.Reflection;
import com.comphenix.tinyprotocol.TinyProtocol;
import de.steamwar.core.Core;
import de.steamwar.core.FlatteningWrapper;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
@ -93,8 +94,11 @@ public class REntityServer implements Listener {
}
public void setCallback(EntityActionListener callback) {
boolean uninitialized = this.callback == null;
this.callback = callback;
TinyProtocol.instance.addFilter(useEntity, filter);
if(uninitialized)
TinyProtocol.instance.addFilter(useEntity, filter);
}
public void addPlayer(Player player) {
@ -261,7 +265,7 @@ public class REntityServer implements Listener {
}
private int viewRadius(Player player) {
return player.getClientViewDistance() / 2;
return FlatteningWrapper.impl.getViewDistance(player) / 2;
}
private long entityToId(REntity entity) {