mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-10 20:59:35 +01:00
Use correct location in teleporting messages
This commit is contained in:
parent
5f73ccc955
commit
9a1004723c
@ -319,19 +319,19 @@ public class RandomTeleport extends JavaPlugin {
|
||||
cooldowns.put(searcher.getId(), e.getUniqueId(), new AbstractMap.SimpleImmutableEntry<>(System.currentTimeMillis(), searcher.getCooldown()));
|
||||
e.teleport(targetLoc);
|
||||
sendMessage(e, "teleport",
|
||||
"worldname", center.getWorld().getName(),
|
||||
"x", String.valueOf(center.getBlockX()),
|
||||
"y", String.valueOf(center.getBlockY()),
|
||||
"z", String.valueOf(center.getBlockZ())
|
||||
"worldname", targetLoc.getWorld().getName(),
|
||||
"x", String.valueOf(targetLoc.getBlockX()),
|
||||
"y", String.valueOf(targetLoc.getBlockY()),
|
||||
"z", String.valueOf(targetLoc.getBlockZ())
|
||||
);
|
||||
if (searcher.getOptions().containsKey("spawnpoint") && e instanceof Player) {
|
||||
if (((Player) e).getBedSpawnLocation() == null || "force".equalsIgnoreCase(searcher.getOptions().get("spawnpoint"))){
|
||||
((Player) e).setBedSpawnLocation(targetLoc, true);
|
||||
sendMessage(e, "setspawnpoint",
|
||||
"worldname", center.getWorld().getName(),
|
||||
"x", String.valueOf(center.getBlockX()),
|
||||
"y", String.valueOf(center.getBlockY()),
|
||||
"z", String.valueOf(center.getBlockZ())
|
||||
"worldname", targetLoc.getWorld().getName(),
|
||||
"x", String.valueOf(targetLoc.getBlockX()),
|
||||
"y", String.valueOf(targetLoc.getBlockY()),
|
||||
"z", String.valueOf(targetLoc.getBlockZ())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user