Dieser Commit ist enthalten in:
Ursprung
6302808676
Commit
833e6f5818
@ -22,6 +22,7 @@ package de.steamwar.entity;
|
|||||||
import com.comphenix.tinyprotocol.Reflection;
|
import com.comphenix.tinyprotocol.Reflection;
|
||||||
import com.comphenix.tinyprotocol.TinyProtocol;
|
import com.comphenix.tinyprotocol.TinyProtocol;
|
||||||
import de.steamwar.core.Core;
|
import de.steamwar.core.Core;
|
||||||
|
import de.steamwar.core.FlatteningWrapper;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -93,8 +94,11 @@ public class REntityServer implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setCallback(EntityActionListener callback) {
|
public void setCallback(EntityActionListener callback) {
|
||||||
|
boolean uninitialized = this.callback == null;
|
||||||
this.callback = callback;
|
this.callback = callback;
|
||||||
TinyProtocol.instance.addFilter(useEntity, filter);
|
|
||||||
|
if(uninitialized)
|
||||||
|
TinyProtocol.instance.addFilter(useEntity, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addPlayer(Player player) {
|
public void addPlayer(Player player) {
|
||||||
@ -261,7 +265,7 @@ public class REntityServer implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int viewRadius(Player player) {
|
private int viewRadius(Player player) {
|
||||||
return player.getClientViewDistance() / 2;
|
return FlatteningWrapper.impl.getViewDistance(player) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private long entityToId(REntity entity) {
|
private long entityToId(REntity entity) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren