@@ -115,7 +115,7 @@ public class SimpleClaimSystem extends JavaPlugin {
115115 private SimpleClaimSystem instance ;
116116
117117 /** The version of the plugin */
118- private String Version = "1.12.0.6 " ;
118+ private String Version = "1.12.0.7 " ;
119119
120120 /** Data source for database connections */
121121 private HikariDataSource dataSource ;
@@ -777,20 +777,20 @@ public boolean loadConfig(boolean reload, CommandSender sender) {
777777
778778 // Expulsion location
779779 if (getConfig ().contains ("expulsion-location" )) {
780- if (! config . isSet ( "expulsion-location" ) || config .getConfigurationSection ("expulsion-location" ).getKeys (false ).isEmpty ()) {
780+ if (getConfig () .getConfigurationSection ("expulsion-location" ).getKeys (false ).isEmpty ()) {
781781 info (ChatColor .RED + "'expulsion-location' : don't forget to set it with /scs setexpulsionlocation." );
782782 } else {
783- World world = Bukkit .getWorld (config .getString ("expulsion-location.world" ));
783+ World world = Bukkit .getWorld (getConfig () .getString ("expulsion-location.world" ));
784784 if (world == null ) {
785785 info (ChatColor .RED + "'expulsion-location' : the world is incorrect." );
786786 status [0 ] = false ;
787787 return ;
788788 }
789- double x = config .getDouble ("expulsion-location.x" );
790- double y = config .getDouble ("expulsion-location.y" );
791- double z = config .getDouble ("expulsion-location.z" );
792- float yaw = (float ) config .getDouble ("expulsion-location.yaw" );
793- float pitch = (float ) config .getDouble ("expulsion-location.pitch" );
789+ double x = getConfig () .getDouble ("expulsion-location.x" );
790+ double y = getConfig () .getDouble ("expulsion-location.y" );
791+ double z = getConfig () .getDouble ("expulsion-location.z" );
792+ float yaw = (float ) getConfig () .getDouble ("expulsion-location.yaw" );
793+ float pitch = (float ) getConfig () .getDouble ("expulsion-location.pitch" );
794794 Location location = new Location (world , x , y , z , yaw , pitch );
795795 claimSettingsInstance .setExpulsionLocation (location );
796796 }
@@ -1402,20 +1402,20 @@ public boolean reloadOnlyConfig(CommandSender sender) {
14021402
14031403 // Expulsion location
14041404 if (getConfig ().contains ("expulsion-location" )) {
1405- if (! config . isSet ( "expulsion-location" ) || config .getConfigurationSection ("expulsion-location" ).getKeys (false ).isEmpty ()) {
1405+ if (getConfig () .getConfigurationSection ("expulsion-location" ).getKeys (false ).isEmpty ()) {
14061406 info (ChatColor .RED + "'expulsion-location' : don't forget to set it with /scs setexpulsionlocation." );
14071407 } else {
1408- World world = Bukkit .getWorld (config .getString ("expulsion-location.world" ));
1408+ World world = Bukkit .getWorld (getConfig () .getString ("expulsion-location.world" ));
14091409 if (world == null ) {
14101410 info (ChatColor .RED + "'expulsion-location' : the world is incorrect." );
14111411 status [0 ] = false ;
14121412 return ;
14131413 }
1414- double x = config .getDouble ("expulsion-location.x" );
1415- double y = config .getDouble ("expulsion-location.y" );
1416- double z = config .getDouble ("expulsion-location.z" );
1417- float yaw = (float ) config .getDouble ("expulsion-location.yaw" );
1418- float pitch = (float ) config .getDouble ("expulsion-location.pitch" );
1414+ double x = getConfig () .getDouble ("expulsion-location.x" );
1415+ double y = getConfig () .getDouble ("expulsion-location.y" );
1416+ double z = getConfig () .getDouble ("expulsion-location.z" );
1417+ float yaw = (float ) getConfig () .getDouble ("expulsion-location.yaw" );
1418+ float pitch = (float ) getConfig () .getDouble ("expulsion-location.pitch" );
14191419 Location location = new Location (world , x , y , z , yaw , pitch );
14201420 claimSettingsInstance .setExpulsionLocation (location );
14211421 }
0 commit comments