-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added party level and xp placeholders. Updated power level cap. (…
…#6)
- Loading branch information
Showing
6 changed files
with
91 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...rc/main/java/pw/valaria/placeholders/mcmmo/bridge/placeholders/PartyLevelPlaceholder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package pw.valaria.placeholders.mcmmo.bridge.placeholders; | ||
|
||
import org.bukkit.entity.Player; | ||
import pw.valaria.placeholders.mcmmo.bridge.McmmoBridge; | ||
|
||
public class PartyLevelPlaceholder implements Placeholder { | ||
private McmmoBridge bridge; | ||
|
||
public PartyLevelPlaceholder(McmmoBridge bridge) { | ||
this.bridge = bridge; | ||
} | ||
|
||
@Override | ||
public String process(Player player, String params) { | ||
Integer partyLevel = bridge.getPartyLevel(player); | ||
return (partyLevel == null) ? "" : partyLevel.toString(); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "party_level"; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...e/src/main/java/pw/valaria/placeholders/mcmmo/bridge/placeholders/PartyXpPlaceholder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package pw.valaria.placeholders.mcmmo.bridge.placeholders; | ||
|
||
import org.bukkit.entity.Player; | ||
import pw.valaria.placeholders.mcmmo.bridge.McmmoBridge; | ||
|
||
public class PartyXpPlaceholder implements Placeholder { | ||
private McmmoBridge bridge; | ||
|
||
public PartyXpPlaceholder(McmmoBridge bridge) { | ||
this.bridge = bridge; | ||
} | ||
|
||
@Override | ||
public String process(Player player, String params) { | ||
Float partyXp = bridge.getPartyXp(player); | ||
return (partyXp == null) ? "" : partyXp.toString(); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "party_xp"; | ||
} | ||
} |