Giter VIP home page Giter VIP logo

betterchairs's Introduction

JavaDocs Get Support on Discord Support me on Ko-fi!

Build with Maven Quality Gate Status

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!

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!

Screenshot of players sitting on chairs

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

Useful Links

bStats Graph

BetterChairs API (+ Events)

Please take a look at the documentation and the JavaDocs.

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

Why did you create BetterChairs (Remastered)?

BetterChairs started in 2016 on SpigotMC and has been developed by 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.jars 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.

betterchairs's People

Contributors

blackscarx avatar christopherbstocks avatar dependabot-preview[bot] avatar dependabot[bot] avatar dylan-g avatar spraxdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

betterchairs's Issues

Create Videos

Having some Screenshots and videos on the SpigotMC- and Songoda-Page would be great!

I can't really take a screenshot with multiple players on it sitting, but maybe someone else can take a screenshot!
You want to create a video about this plugin? Tell me!

// EDIT
We've got some lovely screenshots by @shareacoke and only need some videos.
If you've made some screenshots anyway, I'd happily add them on our Wiki-Page anyway!

Try finding a suitable Open Source Licence

Talk with @BlackScarx so we can find a greate License that suits the project better.

He has the Copyright, no question... But it kind of gets confusing and hard as soon other people start working on it too... Because they hold their Copyright on the changes made etc.

I would suggest the MIT License. It allows commercial use and distribution without granting any warranty or liability. You can't claim it as your own because you have to include the license. (Whoever doesn't want to follow these rules, isn't even following them now. So why not make everything clearer and easier for the community to help keeping it up-to-date)

Bugs about sit command

  • Server Version: 1.16.5
  • Plugin Version: 1.4.0-ALPHA

Describe the bug
1.
When a player uses sit command to sit down, he can sit successfully.
However, he still receives a message "You do not have permission to use this command."

When a player sits on a shulker box and open it,
the box will push the player up and he keeps sitting on the air.

When a player sits on a trapdoor,
he sit on the air above the trapdoor.

To Reproduce
Steps to reproduce the behavior:

  1. stand on a shulker box or a trapdoor
  2. use /sit command

Multi-Thread compiling Spigot versions

It's annoying to wait for 30min for a clean build to happen on GitHub Actions. So we should create an Action to call theses builds simultaneously and see if it helps. Maybe BuildTools can be optimized with some start parameters?

When a player sits on a chair, you can also see some effects from the arrow.

  • Server Version: Paper 1.12.2
  • Plugin Version: 1.4.0

Describe the bug
When a player sits on a chair, you can also see some effects from the arrow.

To Reproduce
Steps to reproduce the behavior:

  1. Run command /sit;
  2. Look around;
  3. And you can see the effects that come from the chair.

Additional context
That's bug can see, if "UseArmorStands" in configuration has false. It is desirable that the arrow was invisible, and no effects emanated from it.

Screenshots, Videos, Logs or Errors
Video: https://youtu.be/UpEpF7I-MHs

Can't sit on stairs underwater.

  • Server Version: Most recent! 1.16.4
  • Plugin Version: Most recent! 1.2.0

Describe the bug
If I place down a chair block underwater, I'm unable to sit on it.

To Reproduce
Steps to reproduce the behavior:

  1. Open Minecraft with this plugin running.
  2. Place an oak stair block underwater.
  3. Right click to attempt to sit.

Screenshots, Videos, Logs or Errors
I'm not really sure how to get logs from Minecraft! If they would help, I can try and get them, but I doubt that there would be anything useful since when I right click under the water nothing happens.

Additional context
No additional context available!

Add some more info to plugin pages

  • Make clear that only stairs work by default
    • And name the configuration options (slabs or individual blocks the player lists)
  • /sit command is missing

Add URLs to Songoda and SpigotMC

We should add all the download links to the README.md (Songoda, SpigotMC).

Maybe add an empty line between our useful links and the original project to better clarify that these links are not from BetterChairs Remastered (this should be done on the other plugin pages too!).

java.lang.NoSuchFieldException: bv

  • Server Version: git-Paper-196 (MC: 1.16.3)
  • Plugin Version: BetterChairs version 0.11.6

Describe the bug
Sometimes the plugin will print an error in console, not really what causes it though:
[23:32:31 WARN]: BetterChairs could not apply protections to a Chair at Location{world=CraftWorld{name=world},x=-253.0,y=62.0,z=-255.0,pitch=0.0,yaw=0.0} (java.lang.NoSuchFieldException: bv)

To Reproduce
Steps to reproduce the behavior:
Not entirely sure

NO ONE GETS REGEN

  • Server Version: Paper 1.16.5 JAVA 11
  • Plugin Version: 1.4.0-ALPHA

Describe the bug
Many players don't get regeneration while sitting on the chairs almost all the time, it very rare that they get regen.

To Reproduce
just sit on the chair(stairs without sings, i have disabled the option which says require signs on stairs to act as chairs), when they sit they don't get any regen.

pls help me as fast as you could ; ___ ; i haven't tried the new version

Remove spigot .jars from git history

Replace their content with [redacted - See https://github.com/Sprax2013/BetterChairs/issues/10 for more information] to Ensure their content is no longer available as it is illegal to host them (see Minecraft EULA).

Add a /sit command

Is your feature request related to a problem? Please describe.
At the moment players can only sit on chairs

Describe the solution you'd like
It would be very useful if players were able to use a /sit command that lets players sit anywhere.

Additional context
None

Wrong Jar file attached to 1.2.0 release post

Hello,
It looks like the Jar file attached to the 1.2.0 announcement is actually a 1.1.0 build? The version number in plugin.yml says 1.1.0 and the jar doesn't seem to have the v1_16_R3 nms connector.

Thanks!

Add a /lay command

Is your feature request related to a problem? Please describe.
I apologise if what I'm about to suggest is outside the scope of this plugin, but I was wondering if /lay could be implemented? There are a few other plugins that have /lay but they also come with their own /sit. I would prefer to use this plugin for /sit while also being able to use /lay.

Describe the solution you'd like
A /lay command

Additional context
For example a plugin called gsit has a /lay command:
image

[Request] Not suffocation on chairs

Is your feature request related to a problem? Please describe.
I'm always frustrated when I see players killing themselves on chairs because the block on top is not air. Ex: When you use slabs as ceiling beams or as decoration shelves with a bookshelf on top.

Describe the solution you'd like
It could be implemented the shame as the NeedsSignsOnBothSides parameter but as NeedsAirOnTop that could be false by deffault.

Players falling off floating blocks and clipping through small blocks when using /sit

  • Server Version: git-Tuinity-25 (MC: 1.17.1)
  • Plugin Version: 1.4.0-ALPHA

Describe the bug
When using /sit on a block that is floating above ground, pressing shift to unseat yourself will cause you to fall off. We have some players using /sit for their minigame maps but the issue is that when they unsit they basically fall to their death. Is it possible to make it so that unseating yourself will place you above the block you were sitting on?

Another issue is using /sit on small blocks such as head blocks or iron bars for example, when using shift to unseat yourself you end up clipping through the block and into the ground. Is it possible to place the player above the block?

To Reproduce
Steps to reproduce the behaviour:

  1. Place a block floating above the ground
  2. Use /sit
  3. Press shift to unseat yourself

Screenshots, Videos, Logs or Errors
/sit
2021-07-29_16 08 28

Press shift
2021-07-29_16 08 32

Additional context
Config:

# BetterChairs Remastered
# 
# Support: https://Sprax.me/Discord
# Updates and Information:
# Statistics: https://bstats.org/plugin/bukkit/BetterChairs%20Remastered/8214
# Information for developers: https://github.com/SpraxDev/BetterChairs/wiki


# You shouldn't make any changes to this
version: 2
Chairs:

  # Allowed distance a player is allowed to have when trying to sit? (-1 to ignore)
  AllowedDistanceToChair: 3

  # Should a player automatically look forward when starting to sit
  AutoRotatePlayer: true

  # Does a player need his hands empty when trying to sit?
  NeedEmptyHands: true

  # Does a chair need signs on both sides attached to be detected as an chair
  NeedsSignsOnBothSides: false

  # Enable this if you want players to be able to sit on chairs
  # while other plugins (like WorldGuard or PlotSquared) are not
  # allowing interactions/use with the chair blocks.
  IgnoreOtherPluginsPreventingInteract: true

  # Enable this if you want BetterChairs to remember a player who used /bc <toggle|on|off> after a plugin reload or him rejoining
  RememberIfPlayerDisabledChairsAfterRelogin: false
  Position:

    # Set to false, if you do not care about a player suffocating while sitting
    NeedAirAbove: true

    # Set to false, to force chairs to have a block below them
    AllowAirBelow: true

  # Can stairs be chairs?
  UseStairs: true

  # Can half slabs be chairs too?
  UseSlabs: true
  LeavingChair:

    # Should a player be teleported to its original position when leaving a chair
    TeleportPlayerToOldLocation: false

    # Should a player keep his head rotation when teleported to its original position
    KeepHeadRotation: true
  Messages:

    # Should the player receive a message when the chair is already occupied
    AlreadyOccupied: false

    # Should the player receive a message when a chair is missing signs on both sided
    NeedsSignsOnBothSides: false

    # Should the player receive a message when he starts sitting
    NowSitting: false
  Regeneration:

    # Should player receive regeneration effect when sitting? (Needs permission BetterChairs.regeneration)
    Enabled: false

    # What amplifier should be applied?
    Amplifier: 1
Filter:
  Worlds:

    # Should we only enable chairs in specific worlds?
    Enabled: false

    # Should be the list below be used as blacklist or whitelist?
    UseAsBlacklist: false

    # List of all enabled/disabled worlds
    Names:
    - worldname
    - worldname2
  Blocks:

    # Should we only enable specific blocks as chairs?
    Enabled: false

    # Setting this to true, won't check if a chair
    # is a stair or slab but only look if it is in the list below
    # 
    # This is kinda experimental.
    # Enabling overwrites 'UseStairs' and 'UseSlabs' further above
    AllowAllTypes: false

    # Should be the list below be used as blacklist or whitelist?
    UseAsBlacklist: false

    # List of all enabled/disabled block types
    # 
    # The names from Minecraft do not always work
    # Full list: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
    Names:
    - blockname
    - blockname2
Updater:

  # Should we check for new versions and report to the console? (Recommended)
  CheckForUpdates: true

  # Should be notify admins when they join the server? (Permission: BetterChairs.updater)
  NotifyOnJoin: true

Prevent interactions with chairs from placing blocks when using PlotSquared

Is your feature request related to a problem? Please describe.
When using PlotSquared in order to sit on chairs you need to enable a flag within plotsquared known as the "use" flag. This flag allows you to define a list of materials players should be able to interact with in the plot even when they aren't added to the plot. If you don't specify oak_stairs for example then players will not be able to right click to sit on the chair which is why you have to specify use: oak_stairs within the plotsquared worlds config. This allows players to sit on chairs without needing to be added to a plot which is great for roleplays such as a classroom for example but the issue is that players can hold a water bucket in their hand for example and right click on the chair while holding the water bucket which will cause the water to be placed on the stair even though they don't have permission to build on that plot. This is not an issue when using full blocks, I've managed to trigger this issue with water and armorstand and I'm guessing it has something to do with the playerinteractevent.

Here's an example of me right clicking to sit on a chair while holding a water bucket even though I don't have permission to place blocks in this plot.
2020-10-09_23 05 38

Describe the solution you'd like
Interacting with a chair while holding a block such as an armorstand for example should not trigger block placement.

I really hope there's an easy way of implementing this since players are able to place armorstands or water for example in plots they don't have permission for because they right clicked on a chair while holding that block.

This is my config:

version: 1
Chairs:
  AllowedDistanceToChair: 2
  AutoRotatePlayer: true
  NeedEmptyHands: true
  NeedsSignsOnBothSides: false
  UseSlabs: false
  Messages:
    AlreadyOccupied: false
    NeedsSignsOnBothSides: false
    NowSitting: false
  Regeneration:
    Enabled: false
    Amplifier: 1
  UseStairs: true
  LeavingChair:
    TeleportPlayerToOldLocation: true
    KeepHeadRotation: true
Filter:
  Worlds:
    Names:
    - example1
    - example2
    Enabled: false
    UseAsBlacklist: true
Updater:
  CheckForUpdates: false
  NotifyOnJoin: false

(Question) Is BetterChairs faster in terms of performance?

I want to add BetterChairs because it only has a /sit command that i need, but i have a question: is it faster than GSit plugin that has more features? Although there is no visible difference in performance between these plugins, I still want to choose the fastest one

Unsupported API version 1.16

Paper 1.15.2
BetterChairs v0.11.2

Hey, got that error and plugin couldn't load because of that.

[03:27:36] [Server thread/ERROR]: Could not load 'plugins/BetterChairs.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: Unsupported API version 1.16 at org.bukkit.craftbukkit.v1_15_R1.util.CraftMagicNumbers.checkSupported(CraftMagicNumbers.java:276) ~[patched_1.15.2.jar:git-Paper-375] at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[patched_1.15.2.jar:git-Paper-375] at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:397) ~[patched_1.15.2.jar:git-Paper-375] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:305) ~[patched_1.15.2.jar:git-Paper-375] at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:360) ~[patched_1.15.2.jar:git-Paper-375] at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:234) ~[patched_1.15.2.jar:git-Paper-375] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:908) ~[patched_1.15.2.jar:git-Paper-375] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]

Support Spigot 1.16.2

The plugin should support all versions starting from 1.8 as stated in the README.md

Custom Chair blocks

Is your feature request related to a problem? Please describe.
Plugin has an option for setting custom blocks as chairs. I am trying to set coral fans as chairs but I'm unable to add them to the enabled blocks list regardless of whatever format I try. :(

Describe the solution you'd like
Adding coral as a chair! Specifically bubble coral fan.

Additional context
We have a resourcepack which changes coral fans into chair models. Would be very fun to use them as chairs.

  • bubble_coral_fan [not waterlogged]
  • dead_bubble_coral_wall_fan [not waterlogged]
  • dead_brain_coral_fan [not waterlogged]

image

Change jar file to have version number

This is a really minor request, but if you could change the jar file to the have version number in the file name I think that would be helpful for server admins to easily keep track when moving files around on the server. Its not at all an issue to just rename the jar file after you download it, but itd be nice to have it already in the downloaded file name and its pretty common to do so for other plugins. Great plugin in general, thanks for all the work to make it possible!

Keep Chairs disabled for players after rejoins

Add an option to the configuration file to allow the Chair toggle feature to be kept for each player between server joins.

There should be a command like /bc toggle status to see your own status and expose an API that allows to check using an UUID (not only via a Player object).

  • /bct on/off (optional parameters)

(Update the configuration example on SpigotMC too)

Everything seems to work

I'd like to report my use of the plugin so far and it seems to be working. All stairs are functional and everything runs fine. The only difference I see is that the older versions would reposition the player to face away from the stair back where as this version does not. That's my only complaint so far (and maybe that's a bug).

Players falling through ground when standing up

  • Server Version: 1.17.1
  • Plugin Version: Probably v1.3.0

Describe the bug
Reported on Discord, forgotten and by now the reporing user has left the server
https://discord.com/channels/344982818863972352/718492339693289532/878344043619291187

小龍
I find a bug about betterchair.
In 1.17.1, player sits on a half block or a stair and when he stand up, he falls down if there is nothing under the half block or the stair.
I can only do is to stop using sit function at this moment.

Sprax
I suspect it's a bug in the new version released a couple of days ago?

小龍
Yes

To Reproduce
Unknown

Screenshots, Videos, Logs or Errors
Unknown

Additional context
Unknown

Off-Hand option & outdated Package

Hey there, first of thank you for the awesome plugin!

1) Is it possible to add an config option like this:

When NeedEmptyHands enabled: Should we also check Emptiness of the Offhand?
CheckEmptyOffhand: true

An option like this would help me a lot. With this option player could hold for example a totem or a bow in the offhand but could still sit down. I work with a lot of plugins that require holing things in the offhand. This would be a really cool feature :)

2) I'm getting some console infos that bother me a little. Is this fixable, or can I somehow turn this message off?

[NBTAPI] [NBTAPI] The NBT-API at 'package de.sprax2013.betterchairs.tr7zw.nbtapi' seems to be outdated!
[00:01:33 WARN]: [NBTAPI] [NBTAPI] Current Version: '2.6.0' Newest Version: 2.7.1'
[00:01:33 WARN]: [NBTAPI] [NBTAPI] Please update the nbt-api or the plugin that contains the api!

I'm not using any NBTAPI at all :/

Thanks for this remastered version. Really love it.
Greetings
Markus

Rightclick on a sign triggerd error sometimes

  • Server Version: git-Paper-342 (MC: 1.16.4)
  • Plugin Version: BetterChairs version 1.2.0

Describe the bug
if i rightclick on a sign sometimes better-chair triggers the error below.

Screenshots, Videos, Logs or Errors

[18:04:39 ERROR]: Could not pass event PlayerInteractEvent to BetterChairs v1.2.0
java.lang.IllegalArgumentException: Cannot measure distance between Mall and Spawn
        at org.bukkit.Location.distanceSquared(Location.java:510) ~[patched_1.16.4.jar:git-Paper-342]
        at org.bukkit.Location.distance(Location.java:493) ~[patched_1.16.4.jar:git-Paper-342]
        at de.sprax2013.betterchairs.EventListener.onInteract(EventListener.java:104) ~[?:?]
        at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) ~[patched_1.16.4.jar:git-Paper-342]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.4.jar:git-Paper-342]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.4.jar:git-Paper-342]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.4.jar:git-Paper-342]
        at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:503) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.PlayerInteractManager.a(PlayerInteractManager.java:464) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1549) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.PacketPlayInUseItem.a(PacketPlayInUseItem.java:27) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.PacketPlayInUseItem.a(PacketPlayInUseItem.java:5) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:23) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1133) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1126) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1087) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1001) ~[patched_1.16.4.jar:git-Paper-342]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:178) ~[patched_1.16.4.jar:git-Paper-342]
        at java.lang.Thread.run(Thread.java:834) [?:?]

Put changes compared to original plugin into README.md

Is your feature request related to a problem? Please describe.
When I look at a fork or recode of a project with the intend to use it instead of the original, I want to see a list of things that have been changed and arguments why I should be using this version instead of the original.

Describe the solution you'd like
Copy most stuff from #12 into the README.md - Focus on users first. Then developers. Developer arguments can be moved to the wiki to keep the README.md clean.

[Request] Being able to choose a material list as chairs on config.yml

Is your feature request related to a problem? Please describe.
As a creator of a RPG server, this is very important as our resource pack can dictate if certain stair block or slab is really a β€œchair” or not.

Describe the solution you'd like
Being able to choose a material list on config.yml or other yml
It could be like this:

AvailableChairs:
    - SPRUCE_STAIRS
    - BRICK_STAIRS
    - OAK_SLAB

Additional context
If the list is filled automatically on the yml when first installed the plugin on the server it could be great for people who wants all stairs and slabs as chairs, but it could create issues depending on the version of the server as newer versions has more materials.
This could be maybe prevented as "if the list is empty then all stairs and slabs (if UseSlabs and UseStairs are true) would be used".
I don't know if it could be also implemented, but thanks to this, could it be that you are able to use other blocks as chairs that are not slabs or stairs? (For example: anvils)

Thank you in advance.

Comments inside config.yml and messages.yml

Is your feature request related to a problem? Please describe.

Describe the solution you'd like
Should make thinks easier to understand right away for people using the plugin for the first time.

Additional context
I've create some example files that could be used
config.yml
messages.yml

BetterChairs Causes Server Crash in 1.19.1

  • Server Version: Paper version git-Paper-86 (MC: 1.19.1) (Implementing API version 1.19.1-R0.1-SNAPSHOT) (Git: 4a4ee79)
  • Plugin Version: 1.5.2

Describe the bug
A clear and concise description of the bug.

My server crashed 1 minute and 18 seconds after someone joined. The error mentions BetterChairs multiple times. It seems to have something to do with armor stands. I do not know what the player did, nor what caused the crash, but I hope that the crash log I provide can be of some use.

To Reproduce
Steps to reproduce the behavior:

  1. Start up server
  2. Have it on for a while
  3. Someone joins
  4. ???
  5. Server crashes due to an entity exception

Screenshots, Videos, Logs or Errors
If applicable, add screenshots to help explain your problem.
If possible, try uploading images or large logs as an attachment instead of somewhere else to ensure its availability.

Sections of startup log re: BetterChairs:

[16:26:27] [Server thread/INFO]: [BetterChairs] Loading BetterChairs v1.5.2

[16:26:46] [Server thread/INFO]: [BetterChairs] Enabling BetterChairs v1.5.2

[16:26:46] [Server thread/INFO]: [PlaceholderAPI] Successfully registered expansion: BetterChairs [1.0.0]

The crash:

[15:44:00] [Server thread/ERROR]: Entity threw exception at world:6500.5,76.3,856.5
java.lang.NoSuchMethodError: 'java.util.List de.sprax2013.betterchairs.nms.v1_19_R1.CustomArmorStand.cJ()'
	at de.sprax2013.betterchairs.nms.v1_19_R1.CustomArmorStand.k(CustomArmorStand.java:39) ~[BetterChairs-v1.5.2.jar:?]
	at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1156) ~[?:?]
	at net.minecraft.world.level.Level.guardEntityTick(Level.java:897) ~[?:?]
	at net.minecraft.server.level.ServerLevel.lambda$tick$6(ServerLevel.java:693) ~[?:?]
	at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:42) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:673) ~[?:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1552) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1415) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1191) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.1.jar:git-Paper-86]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
[15:44:00] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.ReportedException: Exception ticking world
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1571) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1415) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1191) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.1.jar:git-Paper-86]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NoSuchMethodError: 'java.util.List de.sprax2013.betterchairs.nms.v1_19_R1.CustomArmorStand.cJ()'
	at de.sprax2013.betterchairs.nms.v1_19_R1.CustomArmorStand.shouldDie(CustomArmorStand.java:74) ~[BetterChairs-v1.5.2.jar:?]
	at de.sprax2013.betterchairs.nms.v1_19_R1.CustomArmorStand.a(CustomArmorStand.java:70) ~[BetterChairs-v1.5.2.jar:?]
	at net.minecraft.world.entity.Entity.discard(Entity.java:658) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.world.level.Level.guardEntityTick(Level.java:905) ~[?:?]
	at net.minecraft.server.level.ServerLevel.lambda$tick$6(ServerLevel.java:693) ~[?:?]
	at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:42) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:673) ~[?:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1552) ~[paper-1.19.1.jar:git-Paper-86]
	... 5 more
[15:44:00] [Server thread/ERROR]: 	Cause of unexpected exception was
java.lang.NoSuchMethodError: 'java.util.List de.sprax2013.betterchairs.nms.v1_19_R1.CustomArmorStand.cJ()'
	at de.sprax2013.betterchairs.nms.v1_19_R1.CustomArmorStand.shouldDie(CustomArmorStand.java:74) ~[BetterChairs-v1.5.2.jar:?]
	at de.sprax2013.betterchairs.nms.v1_19_R1.CustomArmorStand.a(CustomArmorStand.java:70) ~[BetterChairs-v1.5.2.jar:?]
	at net.minecraft.world.entity.Entity.discard(Entity.java:658) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.world.level.Level.guardEntityTick(Level.java:905) ~[?:?]
	at net.minecraft.server.level.ServerLevel.lambda$tick$6(ServerLevel.java:693) ~[?:?]
	at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:42) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:673) ~[?:?]
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1552) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1415) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1191) ~[paper-1.19.1.jar:git-Paper-86]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.1.jar:git-Paper-86]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
[15:44:00] [Server thread/ERROR]: This crash report has been saved to: /home/server/Desktop/Minecraft Server Paper/./crash-reports/crash-2022-07-29_15.44.00-server.txt

Additional context
Add any other context about the problem here.

PlaceholderAPI Placeholders

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

No problem

Describe the solution you'd like
A clear and concise description of what you want to happen.

PlaceholderAPI placeholders for whether the player is currently sitting and whether player has their sitting toggled on or off

Additional context
Add any other context or screenshots about the feature request here.

Love that you continued this!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.