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

So.

 

I'm currently writing a Bukkit plugin which allows moderators to ban someone with a slightly different command, so that instead of seeing a ban message when they log in, the server closes / times out the socket they are connecting on, so they just see a connection error and don't suspect anything.

 

However, Bukkit's API doesn't have the ability to close sockets / force them to time out, as far as I can tell. Is there a way to accomplish this with Forge, and if so, how? I know it's a slightly odd request, any help appreciated :)

  • Author

Any idea on how to do it? I have everything else set up - custom YAML config files, event listeners etc. I just need a way to fake a realistic connection error :/

What I would try to do (probably won't work) is make it so that it checks to see if the player is on a special ban list (that you create, e.g. specialban.txt or whatever) and if the player is on that list, then don't connect, display the connection error GUI or something similar.

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

THis could help me with my one other mod I am making call AdditionalCraftServerSecurity  that has a banned mod list and disconnects the play with out them needing my mod on there end.

  • Author

Mew, I've already got that set up, and just need a way to kick the player without it saying "Disconnected by Server" at the top. Also, displaying the connection error GUI is client side, so I'd have to send a packet (if there is one); otherwise I would have to mod the client, which I don't want to do :/

I can try and find it I think there is one for internal server error that you some times get on servers.

Maybe send it invaled Titleentity data with an existing packet and crash the client?

Or use the serverauth packet to tell it it is not authorized

  • Author

I don't really want to crash the client. What error would the serverauth packet produce?

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.