Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • 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

  • 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 by FearsomePhobia

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.