Fix REntityServer click listener #230
@ -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) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren