mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-22 10:36:00 +01:00
Set id to preset name if not specified (Fixes #32)
This commit is contained in:
parent
a49cc5fc8f
commit
6ee71ec50e
@ -387,6 +387,9 @@ public class RandomTeleport extends JavaPlugin implements RandomTeleportAPI {
|
||||
*/
|
||||
public RandomSearcher runPreset(CommandSender sender, String preset, Player target, Location center) {
|
||||
String cmd = getConfig().getString("presets." + preset) + " -p " + target.getName();
|
||||
if (!cmd.contains("-id")) {
|
||||
cmd += " -id " + preset;
|
||||
}
|
||||
if (cmd.startsWith("/")) {
|
||||
cmd = cmd.substring(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user