Add coordinate placeholders to loot commands

This commit is contained in:
ceze88 2023-04-07 20:46:14 +02:00
parent 824f674dcd
commit 3dd3a31f25
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ public class DropUtils {
Bukkit.getScheduler().runTask(SongodaCore.getHijackedPlugin(), () -> {
for (String command : commands) {
if (entity.getKiller() != null) {
command = command.replace("%player%", entity.getKiller().getName());
command = command.replace("%player%", entity.getKiller().getName().replace("%x%", String.valueOf((int)entity.getLocation().getX())).replace("%y%", String.valueOf((int)entity.getLocation().getY())).replace("%z%", String.valueOf((int)entity.getLocation().getZ())));
}
if (!command.contains("%player%")) {