add placeholdersapi to command rewards
This commit is contained in:
parent
80217fcc50
commit
436d61c68b
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>ru.froggymonitor</groupId>
|
||||
<artifactId>rewardplugin</artifactId>
|
||||
<version>1.1</version>
|
||||
<version>1.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>FroggyMonitorReward</name>
|
||||
|
@ -34,7 +34,7 @@ public class Reward {
|
||||
}
|
||||
}
|
||||
|
||||
OfflinePlayer offlinePlayer = Main.getOfflinePlayer(nickname);
|
||||
OfflinePlayer offlinePlayer = player != null ? player : Main.getOfflinePlayer(nickname);
|
||||
|
||||
if (offlinePlayer != null) {
|
||||
if (data.containsKey("vault")) {
|
||||
@ -44,7 +44,7 @@ public class Reward {
|
||||
if (data.containsKey("commands")) {
|
||||
for (String c : new ArrayList<>((List<String>) data.get("commands"))) {
|
||||
if (c.startsWith("/")) c = c.substring(1);
|
||||
getServer().dispatchCommand(getServer().getConsoleSender(),c);
|
||||
getServer().dispatchCommand(getServer().getConsoleSender(),PlaceholderAPI.setPlaceholders(offlinePlayer, c));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user