Tempban

Adds a command to temporarily ban players

A simple Forge mod that adds two commands (/tempban and /tempban-ip) that work exactly like the /ban and /ban-ip command, with the difference that you can specify the length of the ban in hours, days and months.

This makes use of Vanilla's 'expired' field in a ban entry which isn't used in the normal ban command.

Usage:

/tempban <selector> <months> <days> <hours> [<reason>]
/tempban-ip <ip> <months> <days> <hours> [<reason>]

 

To unban temporarily banned users, using the vanilla /pardon and /pardon-ip commands should do the trick.

Since the 'expired' field isn't used anywhere in vanilla, there's not a great deal of support for it within the code, and users which were banned temporarily may face minor issues when joining a server (for example not being able to connect sometimes due to an exception). If any more severe issues occur, feel free to submit an issue on the issue tracker.

This mod is server side only (meaning that players don't need to install this mod at all).

The Tempban Team

profile avatar
  • 18
    Followers
  • 7
    Projects
  • 1.4M
    Downloads

Student, Minecraft modding enthusiast, mountain dweller, he/him If anyone's got an idea for a serverside mod that Patbox hasn't done, hit me!

More from Redstone_DubstepView all

  • Sculk Transporting project image

    Sculk Transporting

    • 618.7K
    • Mods

    Allows to transport items via sculk signals.

    • 618.7K
    • May 14, 2026
    • Mods
    • +2
  • Security Craft project image

    Security Craft

    • 94.8M
    • Mods

    Adds plenty of blocks and items to defend and secure your base with.

    • 94.8M
    • April 23, 2026
    • Mods
    • +1
  • PlayerNameModifier project image

    PlayerNameModifier

    • 86.5K
    • Mods

    A serverside, fully configurable Minecraft mod that can modify player display names based on entity tags

    • 86.5K
    • April 6, 2026
    • Mods
  • ServerDataAccessor project image

    ServerDataAccessor

    • 1.6K
    • Mods

    Gives server admins ingame insight into the server's data

    • 1.6K
    • April 5, 2026
    • Mods
  • Sculk Transporting project image

    Sculk Transporting

    • 618.7K
    • Mods

    Allows to transport items via sculk signals.

    • 618.7K
    • May 14, 2026
    • Mods
    • +2
  • Security Craft project image

    Security Craft

    • 94.8M
    • Mods

    Adds plenty of blocks and items to defend and secure your base with.

    • 94.8M
    • April 23, 2026
    • Mods
    • +1
  • PlayerNameModifier project image

    PlayerNameModifier

    • 86.5K
    • Mods

    A serverside, fully configurable Minecraft mod that can modify player display names based on entity tags

    • 86.5K
    • April 6, 2026
    • Mods
  • ServerDataAccessor project image

    ServerDataAccessor

    • 1.6K
    • Mods

    Gives server admins ingame insight into the server's data

    • 1.6K
    • April 5, 2026
    • Mods