Automatically detect whether the backpack button is in the on state, and if it is on, automatically close the button
Allow toggling the button without specifying positionSolved
If you are suggesting that pressing the button while the backpack is open should close the backpack, it already works close to that today. This plugin invokes the backpack.open command, which initially opens the first page, then cycles to the next page, then closes the backpack if on the last page. If you have only one page of capacity, then pressing the button toggles the backpack open/closed.
WhiteThunder
If you are suggesting that pressing the button while the backpack is open should close the backpack, it already works close to that today. This plugin invokes the
backpack.opencommand, which initially opens the first page, then cycles to the next page, then closes the backpack if on the last page. If you have only one page of capacity, then pressing the button toggles the backpack open/closed.
It's the backpack button, not the button for the backpack plugin
Merged post
if OverrideEnabledByPlayer.id true
{
OverrideEnabledByPlayer.id false
}
The button provided by this plugin runs the same command as the button built into the Backpacks plugin. There is no difference in how they function, only in how they appear.
I don't think I understand what you are suggesting.
WhiteThunder
The button provided by this plugin runs the same command as the button built into the Backpacks plugin. There is no difference in how they function, only in how they appear.
I don't think I understand what you are suggesting.
What I mean is that just one command is needed to determine whether the UI of the backpack button is displayed
Merged post
Regardless of whether the input is left or right, if it is detected that it is already open, the UI display will be turned off, so that I don't have to put so many buttons in my menu
It sounds like you are saying that you have a custom preferences menu on your server, in which you want a button that allows players to toggle visibility of the backpack button. I will consider adding a command in the future that functions as only a toggle.
WhiteThunder
It sounds like you are saying that you have a custom preferences menu on your server, in which you want a button that allows players to toggle visibility of the backpack button. I will consider adding a command in the future that functions as only a toggle.
Yes, the switch button is in the default position and hidden
I've pushed an experimental change to a branch which adds the backpackui toggle command for this use case. I haven't tested it. Please try it and let me know if it works.
https://github.com/WheteThunger/BackpackButton/blob/develop/BackpackButton.cs
Merged post
I tested the above change and released it in v1.1.0.
WhiteThunder
I've pushed an experimental change to a branch which adds the
backpackui togglecommand for this use case. I haven't tested it. Please try it and let me know if it works.https://github.com/WheteThunger/BackpackButton/blob/develop/BackpackButton.cs
Merged post
I tested the above change and released it in v1.1.0.
If the player ID does not exist in the data now, the UI will not be displayed
Correct:If there is no player ID in the data, the default settings will be applied and the UI will be displayed
Locked automatically