Giter VIP home page Giter VIP logo

tempban's Introduction

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 here on GitHub.

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

tempban's People

Contributors

redstonedubstep avatar

Watchers

 avatar

tempban's Issues

Not kicking after banning

Running 1.19 version, and banning works, however I need to then kick the player after as it's not forcing a disconnect. When they try to reconnect it tells them they're banned.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.