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

Why do you want to do this?

Banning and Unbanning players should be a admin operation and should not modified/controlled by a Mod.

Edited by Luis_ST

  • Author

someone asked me to make a lifesteal mod and i'm trying to make a way to revive someone after he gets banned. but i also dont know how to even ban someone sooo thats why i'm here

This stuff is not that difficult to find:

Server.getPlayerList().getBans()

BanPlayerCommands

PardonCommand

 

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

  • Author
41 minutes ago, warjort said:

Server.getPlayerList().getBans()

Server.getplayerlist() does not exist

Server -> MinecraftServer

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

6 hours ago, magic_man said:

someone asked me to make a lifesteal mod and i'm trying to make a way to revive someone after he gets banned.

What did you really try to achieve, a Life steal mod is something completely different?

6 hours ago, magic_man said:

but i also dont know how to even ban someone

Why do you want to ban a player, this should be still a admin operation?

  • Author

in lifesteal, there is an item that when a player is banned, it can revive/unban that player

and you get banned if you lose all your hearts

 

if you don't trust me i can just send you all my code so it shows that i'm actually working on a lifesteal mod and not with some server wipe mod or something

Edited by magic_man

Okay i understand this use case but why did you not set the Players how lose in Spectator Mode?

Show what you have tried.

  • Author
59 minutes ago, Luis_ST said:

Okay i understand this use case but why did you not set the Players how lose in Spectator Mode?

spectator mode makes it so you can teleport to other players and see their location. you can also use it as a sort of xray

 

1 hour ago, Luis_ST said:

Show what you have tried.

i wasn't done with it but as a temporary solution i was trying to make a dead player get tped to 0 -100 0 and make them keep dying of the void until they get revived

  • 1 month later...

Here's the code you need to get the list of banned players in Minecraft Forge 1.12.2

Minecraft.getMinecraft().world.getMinecraftServer().getPlayerList().getBannedPlayers();

Edited by Rotschke

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.