mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-02 17:00:19 +01:00
Add workaround to support CustomMobs; resolves #204
This commit is contained in:
parent
7d2d3fff3e
commit
63421037ad
@ -50,7 +50,17 @@ public enum ExternalMobPlugin implements ExternalMobProvider {
|
||||
|
||||
@Override
|
||||
public String getCommand(String mob, String world, double x, double y, double z) {
|
||||
return command.replaceAll("%mob%", mob).replaceAll("%world%", world).replaceAll("%x%", String.valueOf(x)).replaceAll("%y%", String.valueOf(y)).replaceAll("%z%", String.valueOf(z));
|
||||
String xStr, yStr, zStr;
|
||||
if (this == CUSTOM_MOBS) {
|
||||
xStr = String.valueOf(Location.locToBlock(x));
|
||||
yStr = String.valueOf(Location.locToBlock(y));
|
||||
zStr = String.valueOf(Location.locToBlock(z));
|
||||
} else {
|
||||
xStr = String.valueOf(x);
|
||||
yStr = String.valueOf(y);
|
||||
zStr = String.valueOf(z);
|
||||
}
|
||||
return command.replaceAll("%mob%", mob).replaceAll("%world%", world).replaceAll("%x%", xStr).replaceAll("%y%", yStr).replaceAll("%z%", zStr);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user