Implemented OfflinePlayer
Dieser Commit ist enthalten in:
Ursprung
fe0cd5405b
Commit
0206757029
@ -806,4 +806,14 @@ public final class CraftServer implements Server {
|
|||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OfflinePlayer getOfflinePlayer(String name) {
|
||||||
|
OfflinePlayer result = getPlayer(name);
|
||||||
|
|
||||||
|
if (result == null) {
|
||||||
|
result = new CraftOfflinePlayer(this, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ import org.bukkit.plugin.Plugin;
|
|||||||
|
|
||||||
public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||||
private CraftInventoryPlayer inventory;
|
private CraftInventoryPlayer inventory;
|
||||||
private final PermissibleBase perm = new PermissibleBase(this);
|
protected final PermissibleBase perm = new PermissibleBase(this);
|
||||||
private boolean op;
|
private boolean op;
|
||||||
|
|
||||||
public CraftHumanEntity(final CraftServer server, final EntityHuman entity) {
|
public CraftHumanEntity(final CraftServer server, final EntityHuman entity) {
|
||||||
@ -110,7 +110,8 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|||||||
|
|
||||||
public void setOp(boolean value) {
|
public void setOp(boolean value) {
|
||||||
this.op = value;
|
this.op = value;
|
||||||
recalculatePermissions();
|
perm.recalculatePermissions();
|
||||||
|
perm.calculatePermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<PermissionAttachmentInfo> getEffectivePermissions() {
|
public Set<PermissionAttachmentInfo> getEffectivePermissions() {
|
||||||
|
@ -47,6 +47,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
} else {
|
} else {
|
||||||
server.getHandle().f(getName());
|
server.getHandle().f(getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
perm.recalculatePermissions();
|
||||||
|
perm.calculatePermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPlayer() {
|
public boolean isPlayer() {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren