Skip to content

Message

Hakan Kargın edited this page Apr 19, 2022 · 3 revisions

How To Use

Message System

With this system you can send diffrent types of messages to players.

Examples

Boss Bars

HBossBar myBossBar = HCore.createBossBar("Title", HBarColor.WHITE, HBarStyle.SOLID); // creates bossbar with color white
myBossBar.setColor(HBarColor.RED); // changes it's color to red 
myBossBar.addPlayer(player); // allows player to see the bossbar

Titles

HTitle myTitle = new HTitle("Title", "Subtitle", 5, 3, 2); // created a title with title "Title" and subtitle "Subtitle" which appears in 3 ticks, disappears in 2 ticks so totally exists for 5 ticks
HCore.sendTitle(player, myTitle); // sent title to player

Action Bars

HCore.sendActionBar(player, "Welcome, " + player.getDisplayName()); // sent a simple actionbar to player with string "Welcome, playerName"
Clone this wiki locally