mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-02 21:41:43 +01:00
more formatting
This commit is contained in:
parent
f1bc5dba8f
commit
d996722643
@ -101,9 +101,9 @@ public class Citizens extends JavaPlugin {
|
||||
NPC npc = npcManager.createNPC(key.getString("name"), character);
|
||||
|
||||
// Load the character if it exists, otherwise remove the character
|
||||
if (character != null) {
|
||||
if (character != null)
|
||||
character.load(key.getRelative(character.getName()));
|
||||
} else {
|
||||
else {
|
||||
if (key.keyExists("character")) {
|
||||
Messaging.debug("Character '" + key.getString("character")
|
||||
+ "' does not exist. Removing character from the NPC with ID '" + npc.getId() + "'.");
|
||||
|
@ -39,9 +39,8 @@ public class EventListen implements Listener {
|
||||
EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event;
|
||||
if (e.getDamager() instanceof Player) {
|
||||
NPC npc = manager.getNPC(event.getEntity());
|
||||
if (npc.getCharacter() != null) {
|
||||
if (npc.getCharacter() != null)
|
||||
npc.getCharacter().onLeftClick(npc, (Player) e.getDamager());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user