how to ban someone

Started by sillytrain5 on

Topic category: Help with MCreator software

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to ban someone

i want to know how i could ban players from their own world with a procedure 

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could set a global…
Mon, 10/27/2025 - 09:25

you could set a global variable and then kick them,

if(entity instanceof ServerPlayer _player) {
	_player.connection.disconnect(Component.literal("Kick message!!!"));
}
Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
where can i find this block…
Mon, 10/27/2025 - 22:33

where can i find this block and where do i set it to in the entity because i want it to happen when the player gets near a entity 

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it goes in a custom code…
Mon, 10/27/2025 - 23:45

it goes in a custom code snippet,

the required part is required if you don't use the Event/target entity block anywhere else in your procedure