Search in sources :

Example 96 with CraftServer

use of org.bukkit.craftbukkit.v1_8_R1.CraftServer in project Citizens2 by CitizensDev.

the class NMSImpl method removeFromServerPlayerList.

@Override
public void removeFromServerPlayerList(Player player) {
    EntityPlayer handle = (EntityPlayer) NMSImpl.getHandle(player);
    ((CraftServer) Bukkit.getServer()).getHandle().players.remove(handle);
}
Also used : EntityPlayer(net.minecraft.server.v1_8_R3.EntityPlayer) CraftServer(org.bukkit.craftbukkit.v1_8_R3.CraftServer)

Example 97 with CraftServer

use of org.bukkit.craftbukkit.v1_8_R1.CraftServer in project Citizens2 by CitizensDev.

the class NMSImpl method removeFromServerPlayerList.

@Override
public void removeFromServerPlayerList(Player player) {
    EntityPlayer handle = (EntityPlayer) NMSImpl.getHandle(player);
    ((CraftServer) Bukkit.getServer()).getHandle().players.remove(handle);
}
Also used : EntityPlayer(net.minecraft.server.v1_16_R3.EntityPlayer) CraftServer(org.bukkit.craftbukkit.v1_16_R3.CraftServer)

Example 98 with CraftServer

use of org.bukkit.craftbukkit.v1_8_R1.CraftServer in project GSit by Gecolay.

the class GPoseSeat method createNPC.

private ServerPlayer createNPC() {
    MinecraftServer mcs = ((CraftServer) Bukkit.getServer()).getServer();
    ServerLevel sl = ((CraftWorld) s.getLocation().getWorld()).getHandle();
    GameProfile pf = new GameProfile(UUID.randomUUID(), GPM.getMManager().toColoredString(s.getPlayer().getName()));
    pf.getProperties().putAll(cp.getGameProfile().getProperties());
    return new ServerPlayer(mcs, sl, pf);
}
Also used : ServerLevel(net.minecraft.server.level.ServerLevel) GameProfile(com.mojang.authlib.GameProfile) ServerPlayer(net.minecraft.server.level.ServerPlayer) CraftServer(org.bukkit.craftbukkit.v1_18_R1.CraftServer) CraftWorld(org.bukkit.craftbukkit.v1_18_R1.CraftWorld) MinecraftServer(net.minecraft.server.MinecraftServer)

Example 99 with CraftServer

use of org.bukkit.craftbukkit.v1_8_R1.CraftServer in project GSit by Gecolay.

the class GPoseSeat method createNPC.

private ServerPlayer createNPC() {
    MinecraftServer mcs = ((CraftServer) Bukkit.getServer()).getServer();
    ServerLevel sl = ((CraftWorld) s.getLocation().getWorld()).getHandle();
    GameProfile pf = new GameProfile(UUID.randomUUID(), GPM.getMManager().toColoredString(s.getPlayer().getName()));
    pf.getProperties().putAll(cp.getGameProfile().getProperties());
    return new ServerPlayer(mcs, sl, pf);
}
Also used : ServerLevel(net.minecraft.server.level.ServerLevel) GameProfile(com.mojang.authlib.GameProfile) ServerPlayer(net.minecraft.server.level.ServerPlayer) CraftServer(org.bukkit.craftbukkit.v1_17_R1.CraftServer) CraftWorld(org.bukkit.craftbukkit.v1_17_R1.CraftWorld) MinecraftServer(net.minecraft.server.MinecraftServer)

Example 100 with CraftServer

use of org.bukkit.craftbukkit.v1_8_R1.CraftServer in project GSit by Gecolay.

the class GPoseSeat method createNPC.

private ServerPlayer createNPC() {
    MinecraftServer mcs = ((CraftServer) Bukkit.getServer()).getServer();
    ServerLevel sl = ((CraftWorld) s.getLocation().getWorld()).getHandle();
    GameProfile pf = new GameProfile(UUID.randomUUID(), GPM.getMManager().toColoredString(s.getPlayer().getName()));
    pf.getProperties().putAll(cp.getGameProfile().getProperties());
    return new ServerPlayer(mcs, sl, pf);
}
Also used : ServerLevel(net.minecraft.server.level.ServerLevel) GameProfile(com.mojang.authlib.GameProfile) ServerPlayer(net.minecraft.server.level.ServerPlayer) CraftServer(org.bukkit.craftbukkit.v1_18_R2.CraftServer) CraftWorld(org.bukkit.craftbukkit.v1_18_R2.CraftWorld) MinecraftServer(net.minecraft.server.MinecraftServer)

Aggregations

GameProfile (com.mojang.authlib.GameProfile)49 CraftServer (org.bukkit.craftbukkit.v1_16_R3.CraftServer)38 Player (org.bukkit.entity.Player)29 CraftServer (org.bukkit.craftbukkit.v1_18_R2.CraftServer)23 MinecraftServer (net.minecraft.server.MinecraftServer)22 CraftPlayer (org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer)21 CraftServer (org.bukkit.craftbukkit.v1_17_R1.CraftServer)21 ResourceLocation (net.minecraft.resources.ResourceLocation)20 NotNull (org.jetbrains.annotations.NotNull)18 ServerPlayer (net.minecraft.server.level.ServerPlayer)16 OfflinePlayer (org.bukkit.OfflinePlayer)16 CraftServer (org.bukkit.craftbukkit.v1_12_R1.CraftServer)16 Block (org.bukkit.block.Block)15 ServerLevel (net.minecraft.server.level.ServerLevel)14 Property (com.mojang.authlib.properties.Property)13 CraftWorld (org.bukkit.craftbukkit.v1_16_R3.CraftWorld)11 CraftBlock (org.bukkit.craftbukkit.v1_16_R3.block.CraftBlock)10 CraftServer (org.bukkit.craftbukkit.v1_18_R1.CraftServer)8 PlayerProfile (com.denizenscript.denizen.nms.util.PlayerProfile)7 CraftPlayer (org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer)7