Jump to content

Recommended Posts

Posted (edited)

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
Posted

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

Posted

This stuff is not that difficult to find:

Server.getPlayerList().getBans()

BanPlayerCommands

PardonCommand

 

  • Thanks 1

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.

Posted

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.

Posted
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?

Posted (edited)

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
Posted
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...
Posted (edited)

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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