Slimefun4 icon indicating copy to clipboard operation
Slimefun4 copied to clipboard

Cleanup Commands

Open JustAHuman-xD opened this issue 2 years ago โ€ข 7 comments
trafficstars

Description

This PR is made to cleanup all of the command classes & make them more readable, after this PR a PR could be opened to abstract a lot of these checks to further improve the state of the command classes, I am leaving that separate to avoid going out of scope and make it more manageable. Blame Jeff for the opening of this PR ๐Ÿ‘

Proposed changes

Change almost all Command classes to use more guard statements, add missing annotations, and just general cleanup. This PR does go against the code style guidelines, discuss in developers chat

Related Issues (if applicable)

N/A

Checklist

  • [x] I have fully tested the proposed changes and promise that they will not break everything into chaos.
  • [ ] I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
  • [ ] I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*).
  • [ ] I followed the existing code standards and didn't mess up the formatting.
  • [ ] I did my best to add documentation to any public classes or methods I added.
  • [x] I have added Nonnull and Nullable annotations to my methods to indicate their behaviour for null values
  • [ ] I added sufficient Unit Tests to cover my code.

JustAHuman-xD avatar Aug 05 '23 22:08 JustAHuman-xD

Pro Tip! You can help us label your Pull Requests by using the following branch naming convention next time you create a pull request. โค๏ธ

Branch naming convention Label
feature/** ๐ŸŽˆ Feature
fix/** โœจ Fix
chore/** ๐Ÿงน Chores
api/** ๐Ÿ”ง API
performance/** ๐Ÿ’ก Performance Optimization
compatibility/** ๐Ÿค Compatibility

If your changes do not fall into any of these categories, don't worry. You can just ignore this message in that case! ๐Ÿ‘€

github-actions[bot] avatar Aug 05 '23 22:08 github-actions[bot]

Slimefun preview build

A Slimefun preview build is available for testing! Commit: 0c9c8d8b

https://preview-builds.walshy.dev/download/Slimefun/3935/0c9c8d8b

Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!

github-actions[bot] avatar Aug 05 '23 22:08 github-actions[bot]

I completely forgot about this whoops, I'll actually work on this today

JustAHuman-xD avatar Sep 06 '23 13:09 JustAHuman-xD

(Could I get some reviews and testing on this)

JustAHuman-xD avatar Dec 07 '23 19:12 JustAHuman-xD

Needs rebase

https://pastebin.com/S1mUPrhp

WalshyDev avatar Dec 31 '23 09:12 WalshyDev

I tested this on a version that doesnt break heads. Since we need a rebase for that see walshys comment. This is good to go Tested all commands.

J3fftw1 avatar Dec 31 '23 09:12 J3fftw1

Can we get a rebase here?

J3fftw1 avatar Jan 15 '24 16:01 J3fftw1