Hopefully fixed the #106 issue

Also removed mock check a while ago
This commit is contained in:
Norbi Peti 2019-09-15 03:33:30 +02:00
parent ef44aa8830
commit 3bd7b879c4
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
2 changed files with 11 additions and 3 deletions

View file

@ -9,6 +9,7 @@ import lombok.Setter;
import lombok.experimental.Delegate;
import org.bukkit.*;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.permissions.PermissibleBase;
@ -144,6 +145,16 @@ public abstract class DiscordConnectedPlayer extends DiscordSenderBase implement
location.getYaw(), location.getPitch());
}
@Override
public double getMaxHealth() {
return 20;
}
@Override
public Player getPlayer() {
return this;
}
@Getter
@Setter
private String displayName;

View file

@ -158,9 +158,6 @@ public class PlayerListWatcher {
modf.setAccessible(true);
modf.set(plf, plf.getModifiers() & ~Modifier.FINAL);
plf.set(mock, plf.get(plist));
} else {
if (!(mock instanceof PlayerListWatcher))
return false;
}
try {
server.getClass().getMethod("a", dplc).invoke(server, up ? mock : plist);