Fix usage of teleport location set by '/as settp'
- It was accidentally trying to get the teleport location from the plugin config file instead of the region config file. - Also added the possibility to set the teleport location in groups and default.yml
This commit is contained in:
parent
053d75181d
commit
c8d869ce15
|
@ -37,9 +37,7 @@ public class TeleportFeature extends RegionFeature {
|
|||
* @return The teleport location, or null if not set
|
||||
*/
|
||||
public Location getTeleportLocation() {
|
||||
Location result;
|
||||
result = Utils.configToLocation(config.getConfigurationSection("general.teleportLocation"));
|
||||
return result;
|
||||
return Utils.configToLocation(region.getConfigurationSectionSetting("general.teleportLocation"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,7 +45,7 @@ public class TeleportFeature extends RegionFeature {
|
|||
* @return true if the region has a teleportlocation, false otherwise
|
||||
*/
|
||||
public boolean hasTeleportLocation() {
|
||||
return config.isSet("general.teleportLocation");
|
||||
return region.getConfigurationSectionSetting("general.teleportLocation") != null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue