-4

I'm running a vanilla minecraft server, and I have some custom commands set up for staff using scoreboard triggers. I want to set up some sort of trigger command that can kick and one that can ban (this one just for admins).

I understand that /kick and /ban won't work from command blocks, though. Is there a workaround for this (especially the kick command) that I could implement for mods and admins?

1
  • 5
    Instead of kicking or banning, you could lock a person to a place, or constantly kill them. Those commands are purposely off-limits to command blocks for security reasons. (/op @a anyone? wink wink nudge nudge)
    – aytimothy
    Aug 27, 2015 at 5:13

3 Answers 3

1

One idea would be that you can lock them in a place, for example a jail, then making them unable to break the blocks to escape. A another way would be to constantly kill them or teleport them to a specific location through a redstone clock with attached command blocks. I've had situations like these before, and I would think the first solution is cleaner.

1
  • I was thinking of maybe using a jail, but there are trigger commands to get a book / tp home or to spawn, and working around that might get messy. I think I'll try maybe teleporting them to a hole just above y=0 where they'll fall out of the world
    – theBeaks
    Aug 27, 2015 at 6:20
0

In vanilla Minecraft, there is no way to automate kicks and bans or assign permission levels to the kick and ban command. If you are just looking for permission levels for different commands, you should try seeing if you can host a Bukkit or Spigot server. You can add plug ins such as PermissionsEx. With that, you can manage different player groups (eg: player, mod, admin) and each give them different sets of commands they can use

0

I found a workaround in trying to figure out how to ban hackers that OP themselves, I set up a fast clock to teleport the offending player in place and execute spam nether portals at their feet (they're suspended in air). This has the effect of trapping them and putting the portal delay on them so they can't issue commands.

Like so:

/tp @a[score_hacker_min=1] -25 2 -8 -90 0 – Red_Mag3 

/execute @a[score_hacker_min=1] ~ ~ ~ setblock -25 2 -8 portal 

This requires a safe zone in the nether as well that does the same, but is 100% effective.

4
  • /tp @a[score_hacker_min=1] -25 2 -8 -90 0
    – Red_Mag3
    Jan 4, 2016 at 3:53
  • /execute @a[score_hacker_min=1] ~ ~ ~ setblock -25 2 -8 portal
    – Red_Mag3
    Jan 4, 2016 at 3:54
  • I've done this for you this time, but you can edit your posts if you need to add additional info :).
    – Robotnik
    Jan 4, 2016 at 4:16
  • 1.13 syntax: /tp @a[scores={hacker=1..}] -25 2 8 -90 0, /execute if entity @a[scores={hacker=1..}] run setblock -25 2 -8 portal
    – pppery
    Jul 16, 2019 at 1:12

Not the answer you're looking for? Browse other questions tagged .