use of net.minecraft.server.v1_11_R1.OpListEntry in project Denizen-For-Bukkit by DenizenScript.
the class PlayerHelper_v1_11_R1 method setTemporaryOp.
@Override
public void setTemporaryOp(Player player, boolean op) {
MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
GameProfile profile = ((CraftPlayer) player).getProfile();
OpList opList = server.getPlayerList().getOPs();
if (op) {
int permLevel = server.q();
opList.add(new OpListEntry(profile, permLevel, opList.b(profile)));
} else {
opList.remove(profile);
}
player.recalculatePermissions();
}
use of net.minecraft.server.v1_11_R1.OpListEntry in project Denizen-For-Bukkit by DenizenScript.
the class PlayerHelper_v1_10_R1 method setTemporaryOp.
@Override
public void setTemporaryOp(Player player, boolean op) {
MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
GameProfile profile = ((CraftPlayer) player).getProfile();
OpList opList = server.getPlayerList().getOPs();
if (op) {
int permLevel = server.q();
opList.add(new OpListEntry(profile, permLevel, opList.b(profile)));
} else {
opList.remove(profile);
}
player.recalculatePermissions();
}
use of net.minecraft.server.v1_11_R1.OpListEntry in project Denizen-For-Bukkit by DenizenScript.
the class PlayerHelper_v1_8_R3 method setTemporaryOp.
@Override
public void setTemporaryOp(Player player, boolean op) {
MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
GameProfile profile = ((CraftPlayer) player).getProfile();
OpList opList = server.getPlayerList().getOPs();
if (op) {
int permLevel = server.p();
opList.add(new OpListEntry(profile, permLevel, opList.b(profile)));
} else {
opList.remove(profile);
}
player.recalculatePermissions();
}
use of net.minecraft.server.v1_11_R1.OpListEntry in project Denizen-For-Bukkit by DenizenScript.
the class PlayerHelper_v1_9_R2 method setTemporaryOp.
@Override
public void setTemporaryOp(Player player, boolean op) {
MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
GameProfile profile = ((CraftPlayer) player).getProfile();
OpList opList = server.getPlayerList().getOPs();
if (op) {
int permLevel = server.q();
opList.add(new OpListEntry(profile, permLevel, opList.b(profile)));
} else {
opList.remove(profile);
}
player.recalculatePermissions();
}
Aggregations