0
我有以下代碼。我想製作攻擊者發送攻擊者的玩家名字的插件。芽它不工作..任何解決方案?Maven Bukkit服務器插件EventHandler
@EventHandler
public void onEntityDamage(EntityDamageEvent event) {
final Entity entity = event.getEntity();
if (entity instanceof Player) {
Player player = (Player)entity;
player.sendMessage("You have been damaged.");
}
}