Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bans and ip-bans #436

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Add bans and ip-bans #436

wants to merge 6 commits into from

Conversation

Alvsch
Copy link
Contributor

@Alvsch Alvsch commented Dec 30, 2024

Description

Adds the ability to ban players via username and uuid, or ip.
The data is stored in banned-players.json and banned-ips.json

Testing

Joining the server while being banned and ip-banned.
Joining the server without being banned.
Loading data from vanilla servers.
All commands seem to work as intended when used.

Checklist

Things need to be done before this Pull Request can be merged.

  • Add ban, ban-ip, pardon, pardon-ip and banlist commands
  • Fix kick message to include reason and expiration

Please follow our Coding Guidelines

@Alvsch Alvsch changed the title added bans and ip-bans Add bans and ip-bans Dec 30, 2024
@glitchy-sk8k9
Copy link

Maybe SQL or smth and not JSON

@DataM0del
Copy link
Contributor

Maybe SQL or smth and not JSON

it's an array, we don't need a database format for storing a list of IPs / usernames & ban reasons

@Snowiiii
Copy link
Member

@Alvsch any progress on this one ?

@Alvsch
Copy link
Contributor Author

Alvsch commented Jan 19, 2025

#451 have things to do with being able to join which this pr has implemented can_join function for
#453 will allow for offline players to be banned

@Alvsch Alvsch marked this pull request as ready for review January 19, 2025 21:15
@Alvsch
Copy link
Contributor Author

Alvsch commented Jan 21, 2025

Also good to know. The ban reason formats the timezone offset (eg. +1:00) instead of the timezone name (eg. CET). I couldn't find any ways of doing it.

How a vanilla ban looks like for reference:
Screenshot_20250103_175251

@Snowiiii
Copy link
Member

Also good to know. The ban reason formats the timezone offset (eg. +1:00) instead of the timezone name (eg. CET). I couldn't find any ways of doing it.

How a vanilla ban looks like for reference: Screenshot_20250103_175251

It should be possible. Vanilla uses this format "yyyy-MM-dd HH:mm:ss Z", Locale.ROOT im sure it is somehow possible to use Locale root in chrono or time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants