mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
LowerCase disabled world names for better detection
This commit is contained in:
parent
531b12a6fa
commit
1cfc3e108c
@ -40,6 +40,7 @@ import com.gamingmesh.jobs.CMILib.CMIEnchantment;
|
||||
import com.gamingmesh.jobs.container.CurrencyLimit;
|
||||
import com.gamingmesh.jobs.container.CurrencyType;
|
||||
|
||||
import net.Zrips.CMILib.Container.CMIList;
|
||||
import net.Zrips.CMILib.Equations.Parser;
|
||||
import net.Zrips.CMILib.FileHandler.ConfigReader;
|
||||
import net.Zrips.CMILib.Items.CMIMaterial;
|
||||
@ -244,16 +245,13 @@ public class GeneralConfigManager {
|
||||
return true;
|
||||
|
||||
if (UseAsWhiteListWorldList) {
|
||||
return DisabledWorldsList.contains(world);
|
||||
return DisabledWorldsList.contains(world.toLowerCase());
|
||||
}
|
||||
|
||||
if (DisabledWorldsList.isEmpty())
|
||||
return true;
|
||||
|
||||
if (DisabledWorldsList.contains(world))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return !DisabledWorldsList.contains(world.toLowerCase());
|
||||
}
|
||||
|
||||
public synchronized void reload() {
|
||||
@ -342,7 +340,7 @@ public class GeneralConfigManager {
|
||||
c.addComment("Optimizations.NewVersion",
|
||||
"When set to true staff will be informed about new Jobs plugin version", "You need to have jobs.versioncheck permission node");
|
||||
ShowNewVersion = c.get("Optimizations.NewVersion", true);
|
||||
|
||||
|
||||
c.addComment("Optimizations.InformDuplicates",
|
||||
"Can be used to check if your database contains any duplicated user entries.");
|
||||
InformDuplicates = c.get("Optimizations.InformDuplicates", false);
|
||||
@ -396,7 +394,8 @@ public class GeneralConfigManager {
|
||||
c.addComment("Optimizations.DisabledWorlds.UseAsWhiteList", "If true, will changes the list behavior, so if a world is added to list",
|
||||
"the payments will only works in the given worlds.");
|
||||
UseAsWhiteListWorldList = c.get("Optimizations.DisabledWorlds.UseAsWhiteList", false);
|
||||
DisabledWorldsList = c.get("Optimizations.DisabledWorlds.List", Arrays.asList(Bukkit.getWorlds().get(0).getName()));
|
||||
DisabledWorldsList = c.get("Optimizations.DisabledWorlds.List", Arrays.asList("Example", "Worlds"));
|
||||
CMIList.toLowerCase(DisabledWorldsList);
|
||||
|
||||
c.addComment("Optimizations.Explore.Compact",
|
||||
"By setting this to true when there is max amount of players explored a chunk then it will be marked as fully explored and exact players who explored it will not be saved to save some memory");
|
||||
|
@ -43,6 +43,7 @@ import net.Zrips.CMILib.ActionBar.CMIActionBar;
|
||||
import net.Zrips.CMILib.Colors.CMIChatColor;
|
||||
import net.Zrips.CMILib.Equations.Parser;
|
||||
import net.Zrips.CMILib.Items.CMIMaterial;
|
||||
import net.Zrips.CMILib.Logs.CMIDebug;
|
||||
|
||||
public class JobsPlayer {
|
||||
|
||||
@ -401,6 +402,7 @@ public class JobsPlayer {
|
||||
int max = m1;
|
||||
|
||||
m1 = (int) Jobs.getPermissionManager().getMaxPermission(this, "jobs.maxquest.all", false, true);
|
||||
|
||||
if (m1 != 0 && (m1 > max || m1 < max)) {
|
||||
max = m1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user