mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2024-12-28 10:04:50 +00:00
This commit is contained in:
commit
4a20f1a7b3
1 changed files with 2 additions and 2 deletions
|
@ -190,9 +190,9 @@ public class PlayerListener implements Listener
|
||||||
{
|
{
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
ApplicableRegionSet regions = this.plugin.getWorldGuardCommunicator().getRegionContainer().createQuery().getApplicableRegions(player.getLocation());
|
ApplicableRegionSet regions = this.plugin.getWorldGuardCommunicator().getRegionContainer().createQuery().getApplicableRegions(event.getSpawnLocation());
|
||||||
|
|
||||||
Object location = WorldGuardUtils.queryValueUnchecked(player, player.getWorld(), regions.getRegions(), Flags.JOIN_LOCATION);
|
Object location = WorldGuardUtils.queryValueUnchecked(player, event.getSpawnLocation().getWorld(), regions.getRegions(), Flags.JOIN_LOCATION);
|
||||||
if (location != null)
|
if (location != null)
|
||||||
{
|
{
|
||||||
event.setSpawnLocation(WorldEditUtils.toLocation(location));
|
event.setSpawnLocation(WorldEditUtils.toLocation(location));
|
||||||
|
|
Loading…
Reference in a new issue