-
Notifications
You must be signed in to change notification settings - Fork 0
Server Outlines
Moth edited this page Aug 9, 2026
·
1 revision
ServerOutlines controls outlines from the logical server.
Use server outlines when the server should decide which entities or block entities are outlined.
import moth.butterflyapi.outline.ServerOutlines;Create a style:
OutlineStyle style =
OutlineStyle.builder("#FFFFFF")
.thickness(2)
.build();Then apply it:
ServerOutlines.set(
targetEntity,
style
);ServerOutlines.clear(
targetEntity
);Butterfly API can show an outline to one specific player.
ServerOutlines.setFor(
player,
targetEntity,
OutlineStyle.builder("#66CCFF")
.thickness(3)
.placement(
OutlinePlacement.OUTSIDE
)
.build()
);This allows the server to control which viewer receives the outline.
ServerOutlines.clearFor(
player,
targetEntity
);ServerOutlines also supports block entities.
ServerOutlines.set(
displayCaseBlockEntity,
OutlineStyle.of("#FFFFFF")
);ServerOutlines.clear(
displayCaseBlockEntity
);OutlineStyle questStyle =
OutlineStyle.builder("#FFFFFF")
.thickness(2)
.placement(
OutlinePlacement.CENTERED
)
.visibleThroughWalls(true)
.build();
ServerOutlines.set(
targetEntity,
questStyle
);Later:
ServerOutlines.clear(
targetEntity
);Use ServerOutlines when:
- The logical server controls the outline
- The outline should be synchronized to clients
- Different players may need different outline states
- A block entity should receive a synchronized outline
For a purely local effect, use Client Outlines instead.