Release BetterChairs-OG

This commit is contained in:
NotAlexNoyle committed 2026-04-22 08:24:26 -04:00
1 parent 5b486ac38d
commit 601ec38808
12 files changed
+135 -505

No files matched your search

+18 -384
View File
@@ -1,388 +1,22 @@
# Change Log
## Version 1.14-OG:
* Merged upstream changes up to v1.18.0
## Version 1.0
_2026-04-22_
This release defines the `BetterChairs-OG` branch line. Compared to `upstream/main`
from [SpraxDev/BetterChairs](https://github.com/SpraxDev/BetterChairs), this branch differs as follows:
### Added
* Dismount players when chair blocks are affected by external changes (leaf decay, fire, ice melting, physics updates)
### Fixed
* Use `.equals()` instead of `==` for comparing Players, Blocks, and Entities in ChairManager
* Replace deprecated `XMaterial.parseMaterial()` with `XMaterial.get()`
* Improved error handling for NMS loading — now logs critical errors instead of silently falling back
### Changed
* Grammar fix in piston event JavaDoc comments
## Version 1.13-OG:
* Removed support for 1.20.6+
* Builds with gradle 8.14.2 instead of maven
### Added
* Support for Minecraft 1.21.4
## Version 1.12.0
_2024-11-02_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.11.0...v1.12.0)
### Added
* Support for Spigot 1.21.3
## Version 1.11.0
_2024-08-17_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.10.0...v1.11.0)
### Added
* Add an option to make right-clicking on chairs opt in by default (#203)
* When enabled, players need to toggle/enable chairs for themselves using `/toggleChairs`, `/bct` or `/BetterChairs toggle`
* By default, this option is disabled and players can just right-click on chairs (as it has been the case before)
### Changed
* Correct sitting height for Minecraft 1.20 and 1.21 (#204)
* Correct sitting height for trapdoors (you now sit a bit lower than before)
* Detect all current trapdoor variations when applying a specific sitting height for them
## Version 1.10.0
_2024-08-11_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.9.1...v1.10.0)
### Added
* Support for Spigot 1.21.1
## Version 1.9.1
_2024-06-24_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.9.0...v1.9.1)
### Changed
* Fixed errors in latest 1.21 Paper and Spigot builds
## Version 1.9.0
_2024-06-15_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.8.0...v1.9.0)
### Added
* Support for Spigot 1.21
## Version 1.8.0
_2024-05-09_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.7.3...v1.8.0)
### Added
* Support for Paper and Spigot 1.20.6 (and 1.20.5)
## Version 1.7.3
_2024-03-29_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.7.2...v1.7.3)
### Added
* Support for Paper 1.20 builds without CraftBukkit relocation
* Preparations for [announced](https://forums.papermc.io/threads/important-dev-psa-future-removal-of-cb-package-relocation.1106/) internal Paper changes
### Changed
* Remove *Craftaro Marketplace* references from the Updater etc.
## Version 1.7.2
_2023-12-28_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.7.1...v1.7.2)
### Added
* Minecraft 1.20.3 / 1.20.4 support
* [modrinth](https://modrinth.com/plugin/betterchairs) and [Hangar](https://hangar.papermc.io/Sprax/BetterChairs) plugin pages to the update message (+ `README.md`)
## Version 1.7.1
_2023-09-24_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.7.0...v1.7.1)
### Added
* Minecraft 1.20.2 support
* Fixes sign detection on chairs not working in newer game versions (`NeedsSignsOnBothSides` setting) (#193)
* Adds more wood variants to sign detection on chairs (`NeedsSignsOnBothSides` setting)
* Fixes AlreadyOccupied-Message shown when trying to switch to the current seat (`AllowSwitchingSeats` setting) (#180)
### Changed
* Updates *Songoda Marketplace* references to *Craftaro*
## Version 1.7.0
_2023-06-14_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.6.0...v1.7.0)
### Added
* Minecraft 1.20 / 1.20.1 support
## Version 1.6.0
_2023-03-17_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.5.6...v1.6.0)
### Added
* Minecraft 1.19.4 support
### Changed
* Player no longer fall through the chair block when `TeleportPlayerToOldLocation` is disabled
### Breaking Changes
* `Chair#getPlayerLeavingLocation()` now takes `TeleportPlayerToOldLocation` into account
and produces a different result when it is disabled
* Should *probably* not cause any trouble for other plugins using the API
## Version 1.5.6
_2023-01-20_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.5.5...v1.5.6)
### Changed
* Fixes specifying custom blocks in the config not working
* Only stairs and chairs were able to work, no matter what you specified
## Version 1.5.5
_2023-01-08_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.5.4...v1.5.5)
### Changed
* config.yml and message.yml are now properly read in UTF-8 on all systems
* This allows non-english languages to be used properly
* Updated download links to the Songoda Marketplace to use the new URL
## Version 1.5.4
_2023-01-03_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.5.3...v1.5.4)
### Added
* Minecraft 1.19.3 support
* New configuration option to allow seat-switching while sitting
* It is disabled by default
### Changed
* Fixes updater permission description not being declared correctly
## Version 1.5.3
_2022-08-24_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.5.2...v1.5.3)
### Added
* Minecraft 1.19.1 and 1.19.2 support
### Changed
* The Minecraft 1.19 submodules now use the remapped Spigot
* This makes it easier to create updates for new Spigot versions
## Version 1.5.2
_2022-06-19_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.5.1...v1.5.2)
### Added
* Minecraft 1.19 support
## Version 1.5.1
_2022-03-22_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.5.0...v1.5.1)
### Added
* Minecraft 1.18.2 support
* Minecraft 1.13 support (it always ran in legacy mode by accident)
* The API has been updated to allow chair creating with a custom `yOffset` (`ChairManager#create(Player, Block)`)
* Your feet now point in the direction you are looking! (Already worked in pre Minecraft 1.13; Now works on all supported versions)
### Changed
* Errors caused by the NBT-API library are handled more extensively
(if you are running an unsupported server version, you should have less trouble doing so now)
* Plugin version is now part of the file name
## Version 1.5.0
_2021-12-21_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.4.0...v1.5.0)
### Added
* Minecraft 1.18 support
* Setting to disable permission check for regeneration effect (#108)
* *PlaceholderAPI* support with two placeholders (#114)
* Plugin description in `plugin.yml`
### Breaking Changes
* Changed method signature from `ChairManager#hasChairsDisabled(Player)` to `ChairManager#hasChairsDisabled(OfflinePlayer)`
* Renamed myself from `Sprax2013` to `SpraxDev` in `plugin.yml`
### Changed
* Uses *ArmorStand*s instead of *Arrow*s for chairs by default again
* Apply `NoGravity` to spawned Arrow (#111, #116)
* Moves spawned arrow further into the chair block (#111)
* Updated dependencies `XSeries`, `Item-NBT-API` and `annotations`
## 1.4.0
_2021-08-16_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.4.0-ALPHA...v1.4.0)
### Added
* Option to use ArmorStands or Arrows as ArmorStands proofed to be even less reliable across versions
* If you are running 1.8 (or maybe even up to 1.15), you might want to enable AmorStands
in the `config.yml` as you can see the Arrow
### Changed
* Sitting on Trapdoors now places you on the correct height
* Using `/sit` sometimes showed *no permission* message
* Updated dependencies `XSeries` and `annotations`
* Fixed bStats (broke in 1.4.0-ALPHA)
## Version 1.4.0-ALPHA
_2021-06-15_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.3.0...v1.4.0-ALPHA)
### Added
* Added support for Minecraft 1.17 (and Java 16)
* Added `/sit` command allowing players to sit on the ground
* Permission `BetterChairs.cmd.sit` is automatically granted to all players
* Added support for Spigot v`1.13.0` (`v1_13_R1`)
### Breaking Changes
* Methods in the API now return `Entity` instead of `ArmorStand` because Spigot 1.17 uses Arrows
* This allows for more flexibility in the implementation
* Additional related changes might be introduced when leaving the `ALPHA` version
### Changed
* Changed the code around `config.yml` and `messages.yml` and how older versions of them are upgraded
* Updated dependency `item-nbt-api` from `2.7.1` to `2.8.0`
* Updated dependency `XSeries` from `7.6.0` to `8.0.0`
* Updated dependency `annotations` from `20.1.0` to `21.0.1`
* Updated dependency `bstats-bukkit` from `1.8` to `2.2.1`
* Updated dependency `lime-spigot-api` from `0.0.1-SNAPSHOT` to `0.0.2-SNAPSHOT`
* Using Spigot v`1.11.2` instead of v`1.11` to compile
* Using Spigot v`1.9.2` instead of v`1.9` to compile
## Version 1.3.0
_2021-01-22_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.2.0...v1.3.0)
### Added
* You can configure BetterChairs to remember players who disabled chairs
by enabling `Chairs.RememberIfPlayerDisabledChairsAfterRelogin` in `config.yml` (#77)
* **API**: You can now get and set the current status for a player by providing a UUID (e.g. for offline players) (#77)
### Changed
* Don't check off-hand when requiring empty hands to sit (#89)
* Fix NBT-API checking for updates (A bot is regularly checking for updates, don't worry ^^) (#89)
* Use Spigot 1.16.5 instead of 1.16.4 for compiling (No changes to nms classes)
* Fix `IllegalArgumentException` that could sometimes occur when a player is teleported
after interacting with a block (#81) (#83)
* `README.md` now contains the download links to GitHub, Songoda and SpigotMC
* Updated dependency `item-nbt-api` from `2.6.0` to `2.7.1`
* Updated dependency `bstats-bukkit` from `1.7` to `1.8`
## Version 1.2.0
_2020-11-08_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.1.0...v1.2.0)
### Added
* Full 1.16.4 support (#68)
* bStats: Add 'NMS Version' chart
### Breaking Changes
* Updated `item-nbt-api` (2.5.0->2.6.0) and `XSeries` (7.5.4->7.6.0)
### Changed
* Update notifications (chat and console), do now contain a link to the `CHANGELOG.md` (#56)
* A block from a newer version given to the block filter, will no longer be tried to be automatically replaced with another one
## Version 1.1.0
_2020-10-19_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v1.0.0...v1.1.0)
### Added
* Allow blocking/allowing specific blocks to be used as chairs (#57)
* Add options to disallow air below/above chairs (#58)
* Updater now shows download links from GitHub, Songoda and SpigotMC
### Changed
* Improve console logging
* Improve the updater's version detection (`v1.1.0-SNAPSHOT` is now detected as older than `v1.1.0`)
## Version 1.0.0
_2020-10-15_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v0.13.0...v1.0.0)
### Added
* Add option to ignore other plugins disallowing a player to use a chair (e.g. PlotSquared or WorldGuard) (#53)
* Automatically generate JavaDocs (#55)
* Add documentation (#8)
### Changed
* Fix error when trying to create `config.yml` or `messages.yml` on fresh installs
* README.md: Added commands and permissions
* README.md: Added differences compared to the original plugin (#22)
## Version 0.13.0
_2020-10-09_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v0.12.0...v0.13.0)
### Breaking Changes
* BetterChairs is now compiled using Java 11 - It *should* still work on servers running Java 8 (create an issue if not) (#50)
* The configuration system has been rewritten and replaced with a new one ([SpraxDev/LimeDevUtility](https://github.com/SpraxDev/LimeDevUtility)) (#52)
### Changed
* `config.yml` and `messages.yml` do now contain comments to explain all the settings (#52)
* The dependency XSeries has been updated and might have improved performance (probably nothing you'd be able to notice)
* NBT-API is longer logging information to the console (It sometimes still did) (#51)
## Version 0.12.0
_2020-09-24_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v0.11.6...v0.12.0)
### Added
* Using `ItemNBTAPI` by @tr7zw to protect ArmorStands across versions (#36)
### Breaking Changes
* Using Maven default target/output directory
### Changed
* GitHub Actions: Improved caching
* Updated dependency XSeries from 7.2.1.1 to 7.3.1
* Updated the README.md
## Version 0.11.6
_2020-09-05_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v0.11.5...v0.11.6)
### Added
* Full 1.16.2 support (#33)
## Version 0.11.5
_2020-06-26_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v0.11.4...v0.11.5)
### Changed
* Added a message when a player starts sitting
* Using own bStats-Page now
([https://bstats.org/plugin/bukkit/BetterChairs%20Remastered/8214](https://bstats.org/plugin/bukkit/BetterChairs%20Remastered/8214))
* Made some changes to GitHub Actions
* Only deploy `betterchairs-api` as other modules are not relevant
## Version 0.11.4
_2020-06-26_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v0.11.3...v0.11.4)
### Changed
* Fix Chairs not spawning (Some plugins prevented ArmorStands from spawning)
## Version 0.11.3
_2020-06-26_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v0.11.2...v0.11.3)
### Added
* Full Spigot 1.12 support
### Changed
* Fix `Unsupported API Version` error when running in versions older than 1.16
* Fix `ClassCastException` caused by wrong imports
## Version 0.11.2
_2020-06-26_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v0.11.1...v0.11.2)
### Added
* Full Spigot 1.16 support
* Deploy to GitHub packages (pom.xml)
## Version 0.11.1
_2020-06-26_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v0.11.0...v0.11.1)
### Breaking Changes
* **All the packages and classes have been replaces and changed**
* The whole project has been recoded and redesigned with full-version support in mind (1.8 and newer)
## Version 0.11.0
_2020-05-12_ [GitHub Diff](https://github.com/SpraxDev/BetterChairs/compare/v0.10.2...v0.11.0)
### Added
* GitHub Actions to automatically compile PR to master
* README.md (#9)
* CHANGELOG.md (#9)
* LICENCE (#9)
* docs/version.txt to be used for the Updater ([BlackScarx/BetterChairs #13](https://github.com/BlackScarx/BetterChairs/pull/13))
### Breaking Changes
I did my best to make sure the resulting .jar-file keeps its class and package structure.
**But no guarantee!**
### Changed
* Using maven to compile the project (#3)
## Version 0.10.2
This is the starting point of this repository as this is a fork of [BlackScarx/BetterChairs](https://github.com/BlackScarx/BetterChairs)
* `/dismount` command for leaving a BetterChairs seat directly
* Sneak-to-dismount handling
* Essentials-aware teleports that preserve the player's `/back` location when sitting or dismounting
* TrueOG Bootstrap repository support in the Gradle build
* Item-NBT-API imports and integration for this branch's dependency set
* NMS shading and API access from NMS modules in the Gradle build
* Targeting Purpur 1.19.4 supporting 1.8-1.21.11 clients via ViaSuite
### Removed
* Upstream updater integration and update notification permissions
* bStats metrics bootstrap from the plugin startup path
* Maven build files in favor of the Gradle build
* `1.20+` and `1.21+` modules from the active Gradle build
+70 -88
View File
@@ -1,105 +1,87 @@
<p align="center">
<img src="./modules/betterchairs-plugin/src/main/resources/icon.png">
</p>
# BetterChairs-OG
<p align="center">
<a href="https://JavaDocs.Sprax2013.de/BetterChairs/">
<img alt="JavaDocs" src="https://img.shields.io/badge/JavaDocs-latest-succes?logo=Java">
</a>
<a href="https://sprax.me/discord">
<img alt="Get Support on Discord" src="https://img.shields.io/discord/344982818863972352.svg?label=Get%20Support&logo=Discord&color=blue">
</a>
<a href="https://ko-fi.com/spraxdev">
<img alt="Support me on Ko-fi!"
src="https://img.shields.io/badge/-Support%20me%20on%20Ko--fi-%2329ABE0?logo=kofi&logoColor=white">
</a>
</p>
`BetterChairs-OG` is a forked branch line of
[SpraxDev/BetterChairs](https://github.com/SpraxDev/BetterChairs) maintained for the
TrueOG stack. This branch is version `1.0`.
<p align="center">
<a href="https://github.com/SpraxDev/BetterChairs/actions?query=workflow%3A%22Build+with+Maven%22">
<img alt="Build with Maven" src="https://github.com/Sprax2013/BetterChairs/workflows/Build%20with%20Maven/badge.svg">
</a>
<a href="https://sonarcloud.io/dashboard?id=SpraxDev_BetterChairs">
<img alt="Quality Gate Status"
src="https://sonarcloud.io/api/project_badges/measure?project=SpraxDev_BetterChairs&metric=alert_status">
</a>
</p>
The plugin display name is now `BetterChairs-OG`, but the command, permission, and
PlaceholderAPI namespace stays `BetterChairs` for compatibility with existing servers.
# BetterChairs (Remastered)
BetterChairs allows you and your players to sit on chairs. It's that simple!
Every stair and every half block can be a chair if you want it to!
## What This Branch Is
It is:
* **fast**, as it has been written with performance in mind
* **easily updated**, because you get notified about new versions, and your configurations get upgraded automatically
* **customizable**, as it generates configuration files for you
* **reliable**, as it supports all Minecraft versions newer than 1.8 natively
* **free** and OpenSource. Request Features or add them yourself!
This branch keeps the classic chair-sitting experience while carrying a narrower,
fork-specific platform target and build setup.
Highlights:
* Project/artifact renamed to `BetterChairs-OG`
* Version reset to `1.0`
* Gradle build with Shadow, Spotless, and bundled wrapper
* Essentials-aware teleports that preserve `/back`
* `/dismount` command and sneak-dismount support
* Active NMS build range limited to Minecraft `1.8` through `1.19.4`
* Updater and bStats code removed from this branch
![Screenshot of players sitting on chairs](./docs/images/Screenshot4.jpg)
## Compatibility
This branch currently builds the following NMS modules:
* `1.8_R1`
* `1.8_R2`
* `1.8_R3`
* `1.9_R1`
* `1.9_R2`
* `1.10_R1`
* `1.11_R1`
* `1.12_R1`
* `1.13_R1`
* `1.13_R2`
* `1.14_R1`
* `1.15_R1`
* `1.16_R1`
* `1.16_R2`
* `1.16_R3`
* `1.17_R1`
* `1.18_R1`
* `1.18_R2`
* `1.19_0`
* `1.19_R1`
* `1.19_R2`
* `1.19_R3`
## Commands & Permissions
| Command | Permission | Description |
|:---------------------:|:------------------------------------:|:-------------------------:|
| - | `BetterChairs.use` (default: `true`) | Allows players to sit on chairs |
| `/sit` | `BetterChairs.cmd.sit` (default: `true`) | Allows a player to sit on the ground |
| `/BetterChairs <toggle\|on\|off\|status>` | `BetterChairs.cmd.toggle` (default: `true`) | Allows individual players to disabled chairs for them (aliases: `/toggleChairs`, `/bct`) |
| `/BetterChairs reset` | `BetterChairs.cmd.reset` | Allows admins to eject all players from their chairs |
| `/BetterChairs reload`| `BetterChairs.cmd.reload` | Allows admins to reload the plugin's configuration files |
| - | `BetterChairs.updater` | Notifies players about updates when joining the server |
## Commands And Permissions
The compatibility namespace is unchanged.
## Useful Links
* Download the latest version from [GitHub](https://github.com/SpraxDev/BetterChairs/releases/latest),
[modrinth](https://modrinth.com/plugin/betterchairs),
[Hangar](https://hangar.papermc.io/Sprax/BetterChairs),
[SpigotMC](https://www.spigotmc.org/resources/84809/)
* [The Wiki](https://github.com/SpraxDev/BetterChairs/wiki) contains the **API Documentation**
| Command | Permission | Description |
| --- | --- | --- |
| `/BetterChairs <toggle\|on\|off\|status>` | `BetterChairs.cmd.toggle` | Toggle chair usage for yourself |
| `/BetterChairs reload` | `BetterChairs.cmd.reload` | Reload `config.yml` and `messages.yml` |
| `/BetterChairs reset` | `BetterChairs.cmd.reset` | Eject all players from BetterChairs seats |
| `/toggleChairs` or `/bct` | `BetterChairs.cmd.toggle` | Shortcut for player chair toggling |
| `/sit` | `BetterChairs.cmd.sit` | Sit on solid ground |
| `/dismount` | `BetterChairs.cmd.dismount` | Leave a BetterChairs seat |
| Right-click chairs | `BetterChairs.use` | Sit on supported chair blocks |
| Regeneration while seated | `BetterChairs.regeneration` | Allow configured regeneration effect |
[![bStats Graph](https://bstats.org/signatures/bukkit/BetterChairs%20Remastered.svg)](https://bstats.org/plugin/bukkit/BetterChairs%20Remastered/8214)
## Building
* Original Project (No activity):
[GitHub](https://github.com/BlackScarx/BetterChairs),
[SpigotMC](https://www.spigotmc.org/resources/better-chairs.18705/),
[bStats](https://bstats.org/plugin/bukkit/BetterChairs/768)
Build with:
```bash
./gradlew build
```
## BetterChairs API (+ Events)
Please take a look at [the documentation](https://github.com/SpraxDev/BetterChairs/wiki/BetterChairs-API) and
the [JavaDocs](https://JavaDocs.Sprax2013.de/BetterChairs/).
If your environment provides a local bootstrap repository, set `SELF_MAVEN_LOCAL_REPO`
to that directory before building. Otherwise the build falls back to `~/.m2/repository`
and `mavenLocal()`.
## Differences From Upstream
## What are the differences to the original version?
* Active author fixing bugs, adding features and add version support
* Support all versions newer than 1.8 (and in theory some older versions too)
* **All** stairs and slabs are supported in all versions
* Have **every** block you like to act as a chair *(can be enabled in the config)*
* *PlaceholderAPI* support
* You can sit on slabs that are placed in the upper-half of a block
* A working Update-Notifier that won't send garbage messages if the Updater fails to check for an update
* Check if Signs are really attached to the chair (Requiring signs can be enabled in `config.yml`)
* This version is less aggressive when a player tries to sit on a chair (Can be partly re-enabled in `config.yml`)
* The content of `config.yml` and `messages.yml` has been restructured (old files are automatically converted)
* Have a world whitelist **or** blacklist
* Well documented API
* Fully rewritten code (Improves: Maintainability, Performance, Readability)
* Moved to Maven and configured GitHub Actions to automatically compile the project
See [CHANGELOG.md](./CHANGELOG.md) for the branch-specific delta against upstream.
## Why did you create *BetterChairs (Remastered)*?
BetterChairs started in 2016 on SpigotMC and has been developed by
[BlackScarx](https://github.com/BlackScarx). Some years later,
I made my first commits to the project by adding custom Spigot-Events I wanted to use.
I have been granted write-access to that repository afterwards but could not contact
BlackScarx and created this fork to fit my needs and provide support for new Minecraft version.
My fork quickly made some big changes, and I decided to fully recode and redesign this project.
I started with moving to Maven and deleting all those `spigot.jar`s from the repository.
Because of that I rewrote the commit history and detached my Fork on GitHub to be no longer displayed as one
(always said *'27 commits behind BlackScarx:master'* because the commit hashes changed).
Today, I unofficially took over the project as soon as BlackScarx got inactive and am now maintaining this repository.
In short, this branch:
* renames the project to `BetterChairs-OG`
* keeps the legacy `BetterChairs` runtime namespace for compatibility
* swaps Maven for the Gradle build used here
* removes updater/metrics code
* narrows the active support matrix to the versions listed above
* carries TrueOG-specific dependency and build adjustments
+8 -4
View File
@@ -13,9 +13,11 @@ plugins {
}
group = "de.sprax2013"
version = "1.18.0"
version = "1.0"
val pluginName = "BetterChairs"
val projectName = "BetterChairs-OG"
val commandName = "BetterChairs"
val permissionBase = "BetterChairs"
val selfMavenLocalRepo = System.getProperty("SELF_MAVEN_LOCAL_REPO")?.let(::file)?.takeIf { it.isDirectory }
val hasWarnedAboutMissingBootstrap = mutableSetOf<String>()
@@ -156,7 +158,9 @@ project(":modules:betterchairs-plugin") {
val props = mapOf(
"version" to rootProject.version,
"apiVersion" to apiVersion,
"pluginName" to pluginName
"projectName" to projectName,
"commandName" to commandName,
"permissionBase" to permissionBase
)
inputs.properties(props)
filesMatching("plugin.yml") { expand(props) }
@@ -197,7 +201,7 @@ project(":modules:betterchairs-plugin") {
exclude(project(":modules:nms:betterchairs-v1_8_R1"))
}
archiveClassifier.set("")
archiveBaseName.set("BetterChairs")
archiveBaseName.set(projectName)
archiveVersion.set(rootProject.version.toString())
destinationDirectory.set(rootProject.layout.buildDirectory.dir("libs"))
relocate("betterchairs.nms", "de.sprax2013.betterchairs.nms")
+1 -1
View File
@@ -1 +1 @@
1.14.0
1.0
@@ -28,6 +28,8 @@ import org.jetbrains.annotations.Nullable;
* {@link JavaPlugin#onEnable()} to ensure that other classes relying on it work as intended
*/
public class ChairManager {
public static final String LEGACY_NAMESPACE = "BetterChairs";
protected static JavaPlugin plugin;
protected static ChairManager instance;
@@ -183,13 +185,17 @@ public class ChairManager {
}
public boolean dismount(@NotNull Player player) {
return dismount(player, false);
}
public boolean dismount(@NotNull Player player, boolean sameTickTeleport) {
Chair chair = getChair(player);
if (chair == null) {
return false;
}
destroy(chair, true);
destroy(chair, true, sameTickTeleport);
return true;
}
@@ -86,7 +86,7 @@ public abstract class ChairNMS {
if (!Settings.REGENERATION_ENABLED.getValueAsBoolean()
|| Settings.REGENERATION_AMPLIFIER.getValueAsInt() <= 0
|| (Settings.REGENERATION_CHECK_PERMISSION.getValueAsBoolean()
&& !p.hasPermission(ChairManager.plugin.getName() + ".regeneration"))) return -1;
&& !p.hasPermission(ChairManager.LEGACY_NAMESPACE + ".regeneration"))) return -1;
return Settings.REGENERATION_AMPLIFIER.getValueAsInt() - 1;
}
@@ -19,12 +19,12 @@ public class BetterChairsCommand implements CommandExecutor, TabCompleter {
private final String permsSit, permsDismount, permsToggle, permsReload, permsReset;
protected BetterChairsCommand(JavaPlugin plugin) {
this.permsSit = plugin.getName() + ".cmd.sit";
this.permsDismount = plugin.getName() + ".cmd.dismount";
this.permsToggle = plugin.getName() + ".cmd.toggle";
this.permsReload = plugin.getName() + ".cmd.reload";
this.permsReset = plugin.getName() + ".cmd.reset";
String permissionBase = BetterChairsPlugin.LEGACY_NAMESPACE;
this.permsSit = permissionBase + ".cmd.sit";
this.permsDismount = permissionBase + ".cmd.dismount";
this.permsToggle = permissionBase + ".cmd.toggle";
this.permsReload = permissionBase + ".cmd.reload";
this.permsReset = permissionBase + ".cmd.reset";
}
@Override
@@ -25,6 +25,9 @@ import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;
public class BetterChairsPlugin extends JavaPlugin {
public static final String LEGACY_NAMESPACE = ChairManager.LEGACY_NAMESPACE;
public static final String ROOT_COMMAND = ChairManager.LEGACY_NAMESPACE;
private static BetterChairsPlugin plugin;
private static ChairManager chairManager;
@@ -53,7 +56,7 @@ public class BetterChairsPlugin extends JavaPlugin {
// Register CommandExecutor
BetterChairsCommand cmdExecutor = new BetterChairsCommand(this);
getCommand(getName()).setExecutor(cmdExecutor);
getCommand(ROOT_COMMAND).setExecutor(cmdExecutor);
getCommand("toggleChairs").setExecutor(cmdExecutor);
getCommand("sit").setExecutor(cmdExecutor);
getCommand("dismount").setExecutor(cmdExecutor);
@@ -118,7 +118,7 @@ public class EventListener implements Listener {
}
if (e.getPlayer().getVehicle() != null && !Settings.ALLOW_SWITCHING_SEATS.getValueAsBoolean())
return; // Already sitting on something else
if (!e.getPlayer().hasPermission(BetterChairsPlugin.getInstance().getName() + ".use")) return;
if (!e.getPlayer().hasPermission(BetterChairsPlugin.LEGACY_NAMESPACE + ".use")) return;
if (Settings.NEEDS_EMPTY_HANDS.getValueAsBoolean()
&& !getManager().chairNMS.hasEmptyMainHand(e.getPlayer())) return;
@@ -274,7 +274,9 @@ public class EventListener implements Listener {
return;
}
getManager().dismount(e.getPlayer());
if (getManager().dismount(e.getPlayer(), true)) {
Bukkit.getScheduler().runTask(getInstance(), () -> e.getPlayer().setSneaking(false));
}
}
/**
@@ -15,12 +15,12 @@ public class PlaceholderApiExpansion extends PlaceholderExpansion {
@Override
public @NotNull String getIdentifier() {
return this.plugin.getName();
return BetterChairsPlugin.LEGACY_NAMESPACE;
}
@Override
public @NotNull String getVersion() {
return "1.0.0";
return "1.0";
}
@Override
@@ -1,4 +1,4 @@
name: ${pluginName}
name: ${projectName}
description: Players can sit on chairs and everywhere the admin wants them to be able to.
version: ${version}
api-version: '1.19'
@@ -11,38 +11,38 @@ softdepend:
author: SpraxDev
authors: [ BlackScarx ]
website: https://github.com/SpraxDev/BetterChairs
website: https://github.com/true-og/BetterChairs
commands:
${pluginName}:
${commandName}:
description: 'Toggle, Reload or Reset BetterChairs'
toggleChairs:
description: 'Allows individual players to disabled chairs for them'
aliases: [ bct ]
permission: ${pluginName}.cmd.toggle
permission: ${permissionBase}.cmd.toggle
sit:
description: 'Allows a player to sit on the ground'
permission: ${pluginName}.cmd.sit
permission: ${permissionBase}.cmd.sit
dismount:
description: 'Allows a player to leave a BetterChairs seat'
permission: ${pluginName}.cmd.dismount
permission: ${permissionBase}.cmd.dismount
permissions:
${pluginName}.use:
${permissionBase}.use:
description: Allows players to sit on chairs
default: true
${pluginName}.regeneration:
${permissionBase}.regeneration:
description: Grants regeneration to a player when sitting
${pluginName}.cmd.toggle:
${permissionBase}.cmd.toggle:
description: Allows individual players to disabled chairs for them
default: true
${pluginName}.cmd.sit:
${permissionBase}.cmd.sit:
description: Allows a player to sit on the ground
default: true
${pluginName}.cmd.dismount:
${permissionBase}.cmd.dismount:
description: Allows a player to leave a BetterChairs seat
default: true
${pluginName}.cmd.reset:
${permissionBase}.cmd.reset:
description: Allows admins to eject all players from their chairs
${pluginName}.cmd.reload:
${permissionBase}.cmd.reload:
description: Allows admins to reload the plugin's configuration files
+1 -2
View File
@@ -1,4 +1,4 @@
rootProject.name = "BetterChairs"
rootProject.name = "BetterChairs-OG"
include(
":modules:betterchairs-api",
@@ -26,4 +26,3 @@ include(
":modules:nms:betterchairs-v1_8_R2",
":modules:nms:betterchairs-v1_8_R1"
)