Alright I can't seem how to figure out how to make this work:
I am making when a player hits someone it will show up on the scoreboard. I am using Glaedr API for it heres the code i got so far
onEnable
Combat Tag^ I get the message that it on like
I did register the event in the main class.
When i hit a player nothing happens!
"Scoreboard created in 12ms or something like that"
I am making when a player hits someone it will show up on the scoreboard. I am using Glaedr API for it heres the code i got so far
onEnable
Code:
this.glaedr = new Glaedr(this, ConfigManager.get("scoreboard.yml").getString("scoreboard.title"), true, true, false);
this.glaedr.getBottomWrappers().add("&7&m--------------------");
this.glaedr.getTopWrappers().add("&7&m--------------------");
this.glaedr.registerPlayers();
Code:
@EventHandler
public void onDamage(EntityDamageByEntityEvent e) {
if (e.getDamager() instanceof Player && e.getEntity() instanceof Entity) {
Player damager = (Player) e.getDamager();
PlayerScoreboard scoreboard = PlayerScoreboard.getScoreboard(damager);
new Entry("CT", scoreboard)
.setCountdown(true)
.setText(ChatColor.GOLD + "Combat" + ChatColor.GRAY + ":")
.setTime(45)
.send();
}
I did register the event in the main class.
When i hit a player nothing happens!
"Scoreboard created in 12ms or something like that"