The problem is that RolePlayAPI is a Sponge plugin. And I, it seems, searched, searched and it seems like the screen is only on the client side ... \ 0_0 / R..P..API writes the data to the cache and the mod should pick it up and display it with text against the background of some picture. What can be done? And better, how can I try to replace it?
public class EchoCommand extends CommandBase {
@Override
public void execute(MinecraftServer server, ICommandSender sender, String[] params) throws CommandException {
if(!(sender instanceof EntityPlayer)) {
return;
}
EntityPlayer player = (EntityPlayer) sender;
if (params != null && params.length > 0) {
for (String param : params) {
FMLClientHandler.instance().showGuiScreen(new PassportScreen(RolePlayAPI.getUser(player.getUniqueID())));
}
}
}
@Override
public String getName() {
return "echo";
}
@Override
public String getUsage(ICommandSender sender) {
return "command.echo.usage";
}
}
[12:12:54] [Server thread/ERROR] [Sponge]: Error occurred while executing command 'echo ad' for source EntityPlayerMP['MuffinColor'/26, l='world', x=1926,69, y=81,00, z=2367,33]: java.lang.NoClassDefFoundError: net/minecraft/client/resources/IResourcePack
java.lang.RuntimeException: java.lang.NoClassDefFoundError: net/minecraft/client/resources/IResourcePack
at org.spongepowered.common.command.MinecraftCommandWrapper.tryExecute(MinecraftCommandWrapper.java:164) ~[MinecraftCommandWrapper.class:1.12.2-2705-8.0.0-BETA-3474]
at org.spongepowered.common.command.MinecraftCommandWrapper.process(MinecraftCommandWrapper.java:145) ~[MinecraftCommandWrapper.class:1.12.2-2705-8.0.0-BETA-3474]
at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:341) ~[SimpleDispatcher.class:1.12.2-2705-8.0.0-BETA-3474]
at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:329) [SpongeCommandManager.class:1.12.2-2705-8.0.0-BETA-3474]
at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1083) [dh.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:958) [pa.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:937) [pa.class:?]
at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) [la.class:?]
at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) [la.class:?]
at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:92) [PacketUtil.class:1.12.2-2705-8.0.0-BETA-3474]
at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zld000(SourceFile:539) [hv$1.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_231]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_231]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:294) [SpongeImplHooks.class:1.12.2-2705-8.0.0-BETA-3474]
at net.minecraft.server.MinecraftServer.redirect$onRun$zjj000(MinecraftServer.java:3963) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:396) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/resources/IResourcePack
at ru.muffincolor.rpm.commands.EchoCommand.func_184881_a(EchoCommand.java:34) ~[EchoCommand.class:?]
at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:119) ~[bj.class:?]
at org.spongepowered.common.command.MinecraftCommandWrapper.tryExecute(MinecraftCommandWrapper.java:160) ~[MinecraftCommandWrapper.class:1.12.2-2705-8.0.0-BETA-3474]
... 21 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.resources.IResourcePack
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_231]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_231]
at ru.muffincolor.rpm.commands.EchoCommand.func_184881_a(EchoCommand.java:34) ~[EchoCommand.class:?]
at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:119) ~[bj.class:?]
at org.spongepowered.common.command.MinecraftCommandWrapper.tryExecute(MinecraftCommandWrapper.java:160) ~[MinecraftCommandWrapper.class:1.12.2-2705-8.0.0-BETA-3474]
... 21 more
Caused by: java.lang.NullPointerException