mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
Fixed CraftPlayer.isOnline
By: Tahg <tahgtahv@gmail.com>
This commit is contained in:
parent
514167e661
commit
e0eb9be1ba
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
package org.bukkit.craftbukkit;
|
package org.bukkit.craftbukkit;
|
||||||
|
|
||||||
import net.minecraft.server.EntityPlayer;
|
import net.minecraft.server.EntityPlayer;
|
||||||
@ -8,6 +7,7 @@ import org.bukkit.Location;
|
|||||||
import org.bukkit.Player;
|
import org.bukkit.Player;
|
||||||
|
|
||||||
public class CraftPlayer extends CraftHumanEntity implements Player {
|
public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
private EntityPlayerMP entity;
|
private EntityPlayerMP entity;
|
||||||
|
|
||||||
public CraftPlayer(CraftServer server, EntityPlayerMP entity) {
|
public CraftPlayer(CraftServer server, EntityPlayerMP entity) {
|
||||||
@ -15,10 +15,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOnline() {
|
public boolean isOp() {
|
||||||
return server.getHandle().g(getName());
|
return server.getHandle().g(getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isOnline() {
|
||||||
|
for (EntityPlayerMP player : server.getHandle().b) {
|
||||||
|
if (player.aw.equalsIgnoreCase(getName())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EntityPlayerMP getHandle() {
|
public EntityPlayerMP getHandle() {
|
||||||
return entity;
|
return entity;
|
||||||
|
Loading…
Reference in New Issue
Block a user