1.14 support, better error handling #108

Merged
NorbiPeti merged 22 commits from dev into master 2019-10-30 18:43:31 +00:00
2 changed files with 11 additions and 3 deletions
Showing only changes of commit 3bd7b879c4 - Show all commits

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);