Commit graph

30 commits

Author SHA1 Message Date
Allink 88298b7007
Enforce stricter sender type checks across all player-only commands
Previously it was possible to bypass the "ConsoleCommandSender" check by running the command in a command block, and causing the server to throw an exception in console. Exceptions are bad.
2023-04-02 00:25:41 +01:00
Chipmunk 820b105327
Make the taken username check more accurate (#336)
Instead of using `Bukkit.getPlayer(name)`, now each player is manually iterated over to check if a username is taken. This fixes multiple problems, such as a player not being able to set their name to `a` because a player named `ab` is online, and a player not being able to set their username back to the one they joined with.
2023-02-06 03:10:41 +02:00
Allink cbbc4937d5
Fix & improve skin command, improve username command (#331)
* Use per-player ratelimit for /username

* Improve the skin system

- Migrates skin getting over to Mojang. I do indeed understand that the Mojang API is more ratelimited and generally harder to use, it should be noted that it has an almost 0% chance of error. Compare that to Ashcon which, on some days, has a 50% chance of actually recognizing your account exists
- Uses CompletableFutures and a ExecutorService for making requests
- Renames SkinDownloader class to SkinManager class
- Makes SkinManager class static
- Limits the /skin command per-player
2022-12-27 19:50:02 +02:00
Chip a1007853dd
Replace string concatenation with appending text components (#325)
* Replace string concatenation with appending text

* Fix inconsistent indentation

oops

* indentation

i forgor 💀
2022-11-01 15:02:25 +02:00
kaboom 1a0c094f4a Use guard clauses when possible
Closes #322
2022-10-16 03:08:35 +03:00
Allink 04b8ce1c3c
Migrate commands to Adventure, add new commands
New additions are Adventure-centric.
2022-10-15 23:25:26 +01:00
kaboom 67220510b1 Set maximum line length to 100 characters 2022-05-20 07:06:09 +03:00
kaboom 78067effe2 Use spaces instead of tabs 2022-05-20 07:06:08 +03:00
mathiascode 3b29ee5dc0 Preserve pitch and yaw when teleporting 2020-05-10 16:23:33 +03:00
mathiascode 11ce7cf2be Enforce code style check 2020-02-27 17:08:10 +02:00
mathiascode 44e3d0fbb6 Rate limit skin command 2020-02-17 02:09:28 +02:00
mathiascode 72bc93b970 Rate limit username command 2020-02-17 01:23:13 +02:00
mathiascode 4169747681 Optimize username command 2020-02-16 05:53:06 +02:00
mathiascode 177d2ce452 Use consistent equals style 2020-02-14 23:44:00 +02:00
mathiascode 66e3a3da01 Minecraft 1.15.2 2020-01-22 16:33:19 +02:00
mathiascode 2f6081a62c Don't allow players with identical usernnames to join 2019-12-22 21:19:01 +02:00
mathiascode 673bef2212 Something, something 2019-12-21 20:32:58 +02:00
mathiascode 164f6b5524 Fix style errors in command code 2019-12-21 15:39:31 +02:00
mathiascode d3d5140fe4 Fix package paths 2019-12-17 14:37:59 +02:00
mathiascode 91a1b47054 Move lists 2019-12-11 03:36:35 +02:00
mathiascode a998fa8321 Reduce code duplication 2019-12-02 19:07:05 +02:00
mathiascode 551f9f4807 Move skin downloader to separate class 2019-12-02 18:12:05 +02:00
mathiascode 81014126d0 Limit spawn radius 2019-10-11 17:22:21 +03:00
mathiascode 1796124bc1 Optimize skin requests 2019-09-28 21:22:18 +03:00
mathiascode 2c6e2a8b31 Cleanups, better optimizations 2019-09-28 03:29:48 +03:00
mathiascode 6b22761698 Better command handling in console 2019-09-22 05:37:43 +03:00
mathiascode e24206932b Command checker improvements 2019-09-22 02:46:15 +03:00
mathias 6835013bef Optimize skin URL connections 2019-08-07 01:38:58 +03:00
mathias 3d67c5aa34 Workaround for command block crashes 2019-08-04 16:33:05 +03:00
mathias 8d5271e3fd Separate command classes into files 2019-07-30 17:41:54 +03:00