Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public class EconomyListener implements IMessageReceiveListener {
private static final Pattern MEDIC_REVIVE_PATTERN = compile("^Du wirst von (?:\\[UC])?(?<playerName>[a-zA-Z0-9_]+) wiederbelebt\\.$");
private static final Pattern REVIVE_ADMIN_PATTERN = compile("^Du wurdest von \\[UC](?<playerName>[a-zA-Z0-9_]+) wiederbelebt\\.$");
private static final Pattern BACK_IN_LIFE_PATTERN = compile("^\\[Friedhof] Du lebst nun wieder\\.$");
private static final Pattern LUMBERJACK_SELL_PATTERN = compile("^\\[Holzfäller] Du hast (\\d+x .+|dein ganzes Inventar abgeladen: \\d+ Items) für §6(?<amount>\\d+)\\$§a( §6\\(\\+\\d+% Bonus\\))?( verkauft)?\\.$");

private long lastMedicReviveAction = 0;
private boolean maxExperiencePerLevelReached = false;
Expand Down Expand Up @@ -392,6 +393,13 @@ public boolean onMessageReceive(Component text, String message) {
}

storage.setDead(false);
return true;
}

Matcher lumberjackSellMatcher = LUMBERJACK_SELL_PATTERN.matcher(message);
if (lumberjackSellMatcher.find()) {
int amount = parseInt(lumberjackSellMatcher.group("amount"));
configuration.setMoneyCashAmount(configuration.getMoneyCashAmount() + amount);
}

return true;
Expand Down