drop endswith check

This commit is contained in:
Jesse Boyd 2019-04-11 13:18:26 +10:00
parent c5640e5038
commit a31dd987a5
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -89,7 +89,7 @@ public abstract class FawePlayer<T> extends Metadatable {
} }
if (obj instanceof Player) { if (obj instanceof Player) {
Player actor = LocationMaskedPlayerWrapper.unwrap((Player) obj); Player actor = LocationMaskedPlayerWrapper.unwrap((Player) obj);
if ((fieldBasePlayer != null && playerProxyClass.isAssignableFrom(obj.getClass())) || (fieldBasePlayer == null && obj.getClass().getName().endsWith("PlayerProxy"))) { if ((fieldBasePlayer != null && playerProxyClass.isAssignableFrom(obj.getClass())) ) {
try { try {
Player player = (Player) fieldBasePlayer.get(actor); Player player = (Player) fieldBasePlayer.get(actor);
FawePlayer<Object> result = wrap(player); FawePlayer<Object> result = wrap(player);