-
Notifications
You must be signed in to change notification settings - Fork 4
Settings system & Waila update #386
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any WAILA problems can now be git blame
d on Justin
import org.bukkit.event.HandlerList | ||
import org.bukkit.event.player.PlayerEvent | ||
|
||
class PylonBlockWailaEvent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs docs
import org.bukkit.event.HandlerList | ||
import org.bukkit.event.player.PlayerEvent | ||
|
||
class PylonEntityWailaEvent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs docs
import xyz.xenondevs.invui.item.ItemProvider | ||
import xyz.xenondevs.invui.item.impl.AbstractItem | ||
|
||
data class CycleSettingButton<S> ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and siblings need docs
} | ||
|
||
@JvmStatic | ||
fun addWailaOverride(entity: Entity, provider: (Player) -> WailaDisplay?) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs docs
Co-authored-by: Seggan <[email protected]>
Resolves #227 #327
Changes the SettingsPage to have no buttons by default but buttons can be added with SettingsPage#addSetting, adds a waila settings button (which expands into the different options), a resource pack settings option (which holds block texture & armor texture settings), and added a setting for disabling research effects for players.
There are now a few default settings buttons that can be used for simple options (toggles, cycles, and numeric settings), the previously hardcoded toggle & cycle buttons have been removed and have had their usages replaced with these new buttons.
The waila can now be globally disabled by setting the tick interval to be <= 0. I reworked the waila itself a little bit to allow for ActionBar waila and for more configurability, as well as internally changing it to use only 1 raycast call, added events for both block and entity wailas, and added entity waila overrides, as only blocks could have their waila overriden. I also moved the waila out of the blocks package, as it isn't only for blocks.
I remember seeing somewhere a discussion on allowing players to enable the waila for vanilla blocks/entities but I couldn't find an issue for it, but it is implemented by this as well.
While adapting the system I also made it so servers can disable armor textures, and added the option to force block or armor textures as well. (For servers that have a server-side resource pack for ex)