use of net.minecraft.server.v1_15_R1.MinecraftServer in project EasyPayments by EasyDonate.
the class VersionedInterceptorFactory method createFeedbackInterceptor.
@Override
@NotNull
public FeedbackInterceptor createFeedbackInterceptor() {
MinecraftServer minecraftServer = ((CraftServer) Bukkit.getServer()).getServer();
WorldServer worldServer = minecraftServer.getWorldServer(World.OVERWORLD);
InterceptedCommandListener commandListener = new InterceptedCommandListener(executorName);
InterceptedCommandListenerWrapper listenerWrapper = new InterceptedCommandListenerWrapper(commandListener, worldServer, executorName, permissionLevel);
return new InterceptedProxiedSender(listenerWrapper, commandListener);
}
use of net.minecraft.server.v1_15_R1.MinecraftServer in project EasyPayments by EasyDonate.
the class VersionedInterceptorFactory method createFeedbackInterceptor.
@Override
@NotNull
public FeedbackInterceptor createFeedbackInterceptor() {
MinecraftServer minecraftServer = ((CraftServer) Bukkit.getServer()).getServer();
InterceptedCommandListener commandListener = new InterceptedCommandListener(minecraftServer, permissionLevel, executorName);
return new InterceptedProxiedSender(commandListener, commandListener);
}
use of net.minecraft.server.v1_15_R1.MinecraftServer in project EasyPayments by EasyDonate.
the class VersionedInterceptorFactory method createFeedbackInterceptor.
@Override
@NotNull
public FeedbackInterceptor createFeedbackInterceptor() {
MinecraftServer minecraftServer = ((CraftServer) Bukkit.getServer()).getServer();
InterceptedCommandListener commandListener = new InterceptedCommandListener(minecraftServer, permissionLevel, executorName);
return new InterceptedProxiedSender(commandListener, commandListener);
}
use of net.minecraft.server.v1_15_R1.MinecraftServer in project CoordsOffline by elliotnash.
the class v1_16_R1 method loadOfflinePlayer.
public Player loadOfflinePlayer(OfflinePlayer player) {
MinecraftServer minecraftserver = MinecraftServer.getServer();
GameProfile gameprofile = new GameProfile(player.getUniqueId(), player.getName());
EntityPlayer entity = new EntityPlayer(minecraftserver, minecraftserver.getWorldServer(World.OVERWORLD), gameprofile, new PlayerInteractManager(minecraftserver.getWorldServer(World.OVERWORLD)));
final Player target = entity.getBukkitEntity();
if (target != null)
target.loadData();
return target;
}
use of net.minecraft.server.v1_15_R1.MinecraftServer in project SilkSpawners by timbru31.
the class NMSHandler method loadPlayer.
@SuppressWarnings("resource")
@Override
public Player loadPlayer(final OfflinePlayer offline) {
if (!offline.hasPlayedBefore()) {
return null;
}
final GameProfile profile = new GameProfile(offline.getUniqueId(), offline.getName() != null ? offline.getName() : offline.getUniqueId().toString());
final MinecraftServer server = ((CraftServer) Bukkit.getServer()).getServer();
final EntityPlayer entity = new EntityPlayer(server, server.getWorldServer(World.OVERWORLD), profile, new PlayerInteractManager(server.getWorldServer(World.OVERWORLD)));
final Player target = entity.getBukkitEntity();
if (target != null) {
target.loadData();
}
return target;
}
Aggregations