Posted July 18, 20196 yr Hello, I'm having an issue getting the player list server-side. I am calling: ServerLifecycleHooks.getCurrentServer().getPlayerList() But once I build the jar file and run it on a server, when the function gets called, it results in: java.lang.NoSuchMethodError: net.minecraft.server.MinecraftServer.getPlayerList() I'm have tried multiple older versions of forge to no avail, I'm currently on the latest available build as of this post. (1.14.3-27.0.57) Any help on the issue would be greatly appreciated! Thank You
July 18, 20196 yr Author You are most likely correct having it being an issue related to building. I am using a shadowJar as I require some external dependencies, which is something I've never touched until recently. As far as I have learned, everything needs to be re-obfuscated including the dependencies but I'm probably doing something wrong in my build.gradle Speaking of, if a copy of my build.gradle is required, would it be more convenient to send it as plain text or an attachment in a reply? Thanks
July 18, 20196 yr Author Here you go: https://pastebin.com/JBKQ6pYC There's probably many things wrong with it as I've been trying a lot of things for hours now. Also, as this is a test mod as of now, I haven't named the mod yet so I'm currently using temporary names which is something I plan on changing as soon as it starts working. Edited July 18, 20196 yr by FearsomePhobia
July 18, 20196 yr Author I've resolved the issue, this is what I get for not properly researching into how shadowJar works and what Forge does when building a mod. It turns out that I was previously having issues with executing 'build' so I executed 'shadowJar' which output a jar that loaded with only some features working. (super dumb mistake, I know) Ever since I added that the build depends on shadowJar, I didn't even think to simply run 'buid' again.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.