Everything from above build

(Except the test messages, so download away!)
This commit is contained in:
Aria Sangarin 2020-03-08 23:35:07 +01:00
parent e692419576
commit 9ccc487c99

View File

@ -20,15 +20,14 @@ public class LevelUpEventTrigger implements EventTriggerHandler {
PlayerData player = event.getData(); PlayerData player = event.getData();
PlayerClass profess = player.getProfess(); PlayerClass profess = player.getProfess();
player.getPlayer().sendMessage("Test Message: " + event.getNewLevel());
if(event.hasProfession()) { if(event.hasProfession()) {
String prof = event.getProfession().getId().toLowerCase(); String prof = event.getProfession().getId().toLowerCase();
processTrigger(player, profess, "level-up-" + prof); processTrigger(player, profess, "level-up-" + prof);
processTrigger(player, profess, "level-up-" + prof + "-" + event.getNewLevel()); processTrigger(player, profess, "level-up-" + prof + "-" + event.getNewLevel());
} else { } else {
processTrigger(player, profess, "level-up"); processTrigger(player, profess, "level-up");
processTrigger(player, profess, "level-up-" + event.getNewLevel()); processTrigger(player, profess, "level-up-" + (event.getNewLevel() - 1));
if(profess.getMaxLevel() == event.getNewLevel()) if(profess.getMaxLevel() == (event.getNewLevel() - 1))
processTrigger(player, profess, "level-up-max"); processTrigger(player, profess, "level-up-max");
} }
} }