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

Complete recode and redesign #12

Merged
merged 78 commits into from
Jul 29, 2020
Merged

Complete recode and redesign #12

merged 78 commits into from
Jul 29, 2020

Conversation

SpraxDev
Copy link
Owner

@SpraxDev SpraxDev commented May 17, 2020

What has already been changed/improved?

From a server owner or player perspective

  • All Strairs and Slabs are supported (and new ones should be too without updating the plugin!)
    • Disabling individual block is not supported anymore (want that feature back? Open an Issue!!!)
    • You can now sit on Slabs that are placed in the upper-half
  • Improved version support - Plugin tries to support still unsupported version but may not support all features or may not work as intended. Please report versions that are not supported!
  • Fixed broken Updater and its messages
  • Fixed Chairs require Signs on both sides to now check if the signs are directly attached to the Chair
  • Redesigned commands (tab-complete + fancy colors)
    • But some (command aliases) had to go
  • You can (still) configure a world-blacklist
    • You can toggle it to be used as a whitelist instead
  • config.yml and messages.yml layout has (or will be) changed
    • Some things are removed and everything is renamed/moved to another location
  • bStats is now used for anonymous metrics
    • On SpigotMC the original author already tells you, that it has been added but it has been removed by accident after some version. It is now back again

From a developer perspective (read above too. Didn't want to repeat myself)

  • Moving to Maven and setting up CI (GitHub Actions) should make things a lot easier
  • Using a lot more classes and methods to improve code readability and maintainability
  • Minimized duplicate code
  • Improved Fork-ability by using variables everywhere possible (Plugin name, version, permission, commands are mostly based on a value configured in pom.xml
  • Improve compatibility with other plugins by using EventPriority more often
  • Probably improve performance (probably not messurable? Create an issue if you did some testing!)
  • Reintroducing bStats for metrics allows for better insight in plugin usage

What is still missing for the first release?

  • Allow players to individually toggle chairs (until logout)
  • Add an messages.yml
  • Add signs on sides of chair check
  • Cleanup and Prepare public API for other developers (+ Documentation)
  • Automatically convert old BetterChairs config instead of just replacing it (already creates backup first)
  • Add AutoRotation when a player sits on a chair
  • Fix teleporting the player back to its original coordinates (and make it optional in config.yml)
  • Comments inside config.yml (and maybe messages.yml)

At least IntelliJ starts using spigot 1.8 for JavaDocs causing it to not know of the existance of some methods
* New Updater
* Reintroduce bStats lost in v0.10.0
On SpigotMC.org it says bStats is used since v0.9.1 but on GitHub and SpigotMC this is not true. It looks like these changes have never been published on GitHub and got overwritten on newer versions by accident
This is sadly NOT tested!

My laptop can't even run Minecraft so hopefully I remember testing this in a couple of days
@SpraxDev SpraxDev added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels May 17, 2020
@SpraxDev SpraxDev self-assigned this May 17, 2020
This was linked to issues May 17, 2020
Recode to dynamically read version string and to show the window in the (Windows) Taskbar with an icon.
Stairs can no longer be upside down and when sitting on slabs that are attached to the upper half of a block, you are sitting 0.5 blocks higher.
Also not recognising double slabs as slab
An accidantal `/tp @e ~ ~ ~` or a commandblock running some commands should not teleport our chair
Older versions do need WorldServer instead of CraftWorld for addEntity.
By updating the newer version to use WorldServer we can easier maintain the code
bStats does not work in Spigot 1.8.0 because gson seems to be missing.
Wrapping it inside an try-catch won't show a long stacktrace when we don't need the full stacktrace
* Make sure Chairs without passenger get removed
* Improve JavaDocs and comments
* Protect a Chair's Block (BlockBreak etc.)
Using Reflections now instead of using NBT as it is very annoying to manually check the names for a couple of methods needed when modifying NBT... A bit risky, I know... But let's hope that the fields don't change between version :fingers_crossed:
I am using old classes as a reference for what features are still missing.
* Not detecting newer versions correctly
* Changed permission
* Fix that nasty Updater-Message that is sent to admins onJoin
* Configure Updater
* Configure enabled worlds
* Player needs empty hands?
* Stairs or Slabs enabled?
@SpraxDev SpraxDev marked this pull request as ready for review July 29, 2020 14:51
@SpraxDev SpraxDev merged commit c02cf93 into master Jul 29, 2020
@SpraxDev SpraxDev deleted the recode branch July 29, 2020 14:54
@SpraxDev SpraxDev linked an issue Jul 29, 2020 that may be closed by this pull request
@SpraxDev SpraxDev changed the title WIP: Recode Complete recode and redesign Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
1 participant