Send region updates after a teleport
This commit is contained in:
parent
2a8cc4f285
commit
4543c23737
@ -43,6 +43,7 @@ public class CityRegionCommand implements CommandExecutor {
|
|||||||
if (city != null) {
|
if (city != null) {
|
||||||
if (p.getLocation().distance(nearest.teleportLocation()) <= 5) {
|
if (p.getLocation().distance(nearest.teleportLocation()) <= 5) {
|
||||||
p.teleport(city.teleportLocation(), TeleportCause.COMMAND);
|
p.teleport(city.teleportLocation(), TeleportCause.COMMAND);
|
||||||
|
m_plugin.recalculatePlayerRegions();
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage("You must be within 5 blocks of a region center.");
|
sender.sendMessage("You must be within 5 blocks of a region center.");
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ public class HomeRegionCommand implements CommandExecutor {
|
|||||||
if (home != null) {
|
if (home != null) {
|
||||||
if (p.getLocation().distance(nearest.teleportLocation()) <= 5) {
|
if (p.getLocation().distance(nearest.teleportLocation()) <= 5) {
|
||||||
p.teleport(home.teleportLocation(), TeleportCause.COMMAND);
|
p.teleport(home.teleportLocation(), TeleportCause.COMMAND);
|
||||||
|
m_plugin.recalculatePlayerRegions();
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage("You must be within 5 blocks of a region center.");
|
sender.sendMessage("You must be within 5 blocks of a region center.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user