Skip to content

Boss Bars#8673

Open
AnOwlBe wants to merge 68 commits into
SkriptLang:dev/featurefrom
AnOwlBe:feature/Bossbars
Open

Boss Bars#8673
AnOwlBe wants to merge 68 commits into
SkriptLang:dev/featurefrom
AnOwlBe:feature/Bossbars

Conversation

@AnOwlBe

@AnOwlBe AnOwlBe commented Jun 2, 2026

Copy link
Copy Markdown

Problem

Bossbars have existed in Minecraft since 1.9 and even now days are used by almost every server for some thing whether its a timer for an event or a way to display a store sale.

Solution

After like 4 previous attempts I am here to finally hopefully probably not maybe implement boss bars into skript!

I've implemented the following syntaxes:
expressions:
ExprAllBossBars - gets all persistent/keyed boss bars
ExprBossBarFromEntity - gets a none keyed boss bar from an entity (entity must be a wither or ender dragon)
ExprBossBarFromKey - gets a persistent/keyed boss bar from a key
sections:
ExprSecCreateBossBar - the base of boss bar creation allows for creation of a normal (temporary) bossbar or a keyed one (saved across restarts & requires a key upon creation)
conditions:
CondHasBossBarFlag - checks if a boss bar (keyed or not) has a flag
effects:
EffBossBarFlags - makes a boss bar have or not have a specific flag

properties:
I've registered 4 new properties:
PropExprProgress
PropExprTitle
PropExprStyle
PropExprViewers

propertyexpressions:

title - used to get/set/reset the title of a boss bar
Also deprecated ExprBookTitle and for the itemtypeclassinfo implemented a way to get/set the title of a signed book eg send title of tool of me


progress - used to get/set/add/reset/remove from the progress of a boss bar
style - used to get/set/reset the style of a boss bar
viewers - used to get/set/reset/add/remove the viewers of a boss bar

Testing Completed

manual testing completed for all elements everything appears to work fine no errors in console makes the bossbar sets title etc
I have implemented tests for all added features all tests pass

changes:
Changed ExprColorOf to be in skriptlang -> bukkit folder and use the newer registry syntax while also removing the check for displays of is running 1.19.4 as skript's lowest supported version is 1.21.1
also changed it to support setting the color of a boss bar
while on the topic I have added LabColor this is used in BossBarUtils to round a skript color to the nearest boss bar color (credit to @UnderscoreTud for the labcolor)

I think that sums up what I have implemented/changed in this PR though I probably missed a thing or two

Supporting Information

There is a LOT and I mean a LOT to discuss in this pr so far from what i've gathered the following things need to be discussed:

1# Should we be using bukkit or adventure boss bars (already discussed but still open if anyone wants to add to it) due to adventure boss bars missing a lot of stuff like getting boss bar from a boss
2# Should the creation syntax for bossbars include color/title so far it includes color (red boss bar eg) but I feel like adding title is too much but that is why its up for discussion!
3# Should we allow for creation of none keyed bossbars? there must be support for regular boss bars that is a must but for creation via the exprsec should it be allowed?
4# For the progress propertyexpr should setting progress of a bossbar work via 0.0 to 1.0 or 0 to 100 both bukkit & adventure API use 0.0 to 1.0 but 0 to 100 may be easier for users to understand (currently method is 0.0 to 1.0 and is usable eg like set progress of event-bossbar to 43%
5# I forgot the other discussions I think that is all of the important ones


Completes: #8491
Related: #6986 #5246 #3995 #3263
AI assistance: claude for nearest utility & small things here and there

@AnOwlBe AnOwlBe requested review from a team as code owners June 2, 2026 03:55
@AnOwlBe AnOwlBe requested review from Pesekjak and UnderscoreTud and removed request for a team June 2, 2026 03:55
@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet labels Jun 2, 2026
@skriptlang-automation

This comment has been minimized.

@skriptlang-automation skriptlang-automation Bot added the feature Pull request adding a new feature. label Jun 2, 2026
@skriptlang-automation skriptlang-automation Bot moved this to In Review in 2.16 Releases Jun 2, 2026
@skriptlang-automation skriptlang-automation Bot removed the needs triage An issue that hasn't been classified or verified yet label Jun 2, 2026

@sovdeeth sovdeeth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mainly looked at patterns
also needs tests

AnOwlBe and others added 4 commits June 2, 2026 00:08
…ssions/ExprColorOf.java

Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
…ssions/ExprColorOf.java

Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
…ssions/ExprColorOf.java

Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>
…pressions/ExprBossBarFromKey.java

Co-authored-by: sovdee <10354869+sovdeeth@users.noreply.github.com>

@Absolutionism Absolutionism left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of my requested changes may have already been covered by Sovde, as he finished his first

@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews and removed needs reviews A PR that needs additional reviews labels Jun 2, 2026
AnOwlBe and others added 6 commits June 2, 2026 00:39
…nditions/CondHasBossBarFlag.java

Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
…pressions/ExprAllBossBars.java

Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
…/expressions/PropExprViewers.java

Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
…fects/EffBossBarFlags.java

Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
…pressions/ExprAllBossBars.java

Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
…/expressions/PropExprTitle.java

Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
@AnOwlBe AnOwlBe requested a review from Absolutionism June 12, 2026 07:28

@APickledWalrus APickledWalrus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is some really good work so far! I might like to see more tests as well (ideally full coverage). Thanks for your continued work on this 🙂

Comment thread src/main/java/org/skriptlang/skript/lang/properties/Property.java Outdated
Comment thread src/main/java/org/skriptlang/skript/util/LabColor.java Outdated
Comment thread src/test/skript/tests/bukkit/bossbar/EffBossBarFlags.sk
Comment thread src/main/resources/lang/default.lang Outdated
Comment thread src/main/java/org/skriptlang/skript/common/properties/PropertiesModule.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/bossbar/BossBarUtils.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/bossbar/BossBarUtils.java Outdated
@AnOwlBe

AnOwlBe commented Jun 12, 2026

Copy link
Copy Markdown
Author

Okay I think I've resolved all requests besides ones pending on an answer from sovde or you pickle

Though I probably did miss some/incorrectly resolved an issue so let me know

@AnOwlBe AnOwlBe requested a review from APickledWalrus June 12, 2026 23:46
@AnOwlBe

AnOwlBe commented Jun 12, 2026

Copy link
Copy Markdown
Author
image for more tests I think I covered everything what elements did I miss?

@APickledWalrus

APickledWalrus commented Jun 17, 2026

Copy link
Copy Markdown
Member

for more tests I think I covered everything what elements did I miss?

Oh yeah coverage is better than I thought - my mistake. I think the only thing not tested is ExprBossBarFromEntity - you should be able to spawn a boss mob (wither) and test it?

@APickledWalrus APickledWalrus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really strong! Most of these suggestions are related to formatting and/or wording. I think this is nearly ready 🙂

Comment on lines +34 to +36
{"make %bossbars% [remove:(not|no longer)] darken the sky", BarFlag.DARKEN_SKY},
{"make %bossbars% [remove:(not|no longer)] create fog", BarFlag.CREATE_FOG},
{"make %bossbars% [remove:(not|no longer)] play boss music", BarFlag.PLAY_BOSS_MUSIC}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would just add some new patterns. Simply adjust how add is determined: also consider matched pattern

Comment thread src/main/java/org/skriptlang/skript/bukkit/types/InventoryClassInfo.java Outdated
Comment thread src/main/java/org/skriptlang/skript/bukkit/types/ItemTypeClassInfo.java Outdated
@AnOwlBe AnOwlBe requested a review from APickledWalrus June 18, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Pull request adding a new feature. needs reviews A PR that needs additional reviews

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

4 participants