- If the option Join.Cursor.ToGUIItem.OnLogin was set to true the cursor was set to the UseItem even if the GameMode was changed, this was fixed.
- Protection was completed
This commit is contained in:
2022-01-06 03:04:56 +01:00
parent 8377667f55
commit 75ab60bbaa
7 changed files with 104 additions and 92 deletions

View File

@@ -96,11 +96,11 @@ public class ConfigCreate {
Config.set("UseItem.Join.Cursor.ToGUIItem.Spigot.OnOnlyFirstLogin", true, yamlConfiguration);
Config.set("UseItem.Join.Cursor.ToGUIItem.Bungee.OnServerChange", false, yamlConfiguration);
Config.set("Advanced.UseItem.GameModeChange.Enable", true, yamlConfiguration);
Config.set("Advanced.UseItem.GameModeChange.DelayInTicks", 1, yamlConfiguration);
Config.set("Advanced.UseItem.GameModeChange.Protection.Enable", false, yamlConfiguration);
Config.set("Advanced.UseItem.GameModeChange.Protection.Mode", "blacklist", yamlConfiguration);
Config.set("Advanced.UseItem.GameModeChange.Protection.List", Arrays.asList("CREATIVE", "Spectator"), yamlConfiguration);
Config.set("Advanced.UseItem.GameMode.Change.Enable", true, yamlConfiguration);
Config.set("Advanced.UseItem.GameMode.Change.DelayInTicks", 1, yamlConfiguration);
Config.set("Advanced.UseItem.GameMode.Protection.Enable", false, yamlConfiguration);
Config.set("Advanced.UseItem.GameMode.Protection.Mode", "blacklist", yamlConfiguration);
Config.set("Advanced.UseItem.GameMode.Protection.List", Arrays.asList("CREATIVE", "Spectator"), yamlConfiguration);
Config.set("Sound.Enable", true, yamlConfiguration);

View File

@@ -11,6 +11,7 @@ import org.bukkit.Sound;
import org.bukkit.configuration.file.YamlConfiguration;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class SelectConfig {
@@ -145,11 +146,16 @@ public class SelectConfig {
Cursor_ToGUIItem_OnlyOnFirstLogin = yamlConfiguration.getBoolean("UseItem.Join.Cursor.ToGUIItem.Spigot.OnlyOnFirstLogin");
UseItem_ServerChange = yamlConfiguration.getBoolean("UseItem.Join.Cursor.ToGUIItem.Bungee.OnServerChange");
UseItemGameModeChangeEnable = yamlConfiguration.getBoolean("Advanced.UseItem.GameModeChange.Enable");
UseItemGameModeChangeDelayInTicks = yamlConfiguration.getInt("Advanced.UseItem.GameModeChange.DelayInTicks");
UseItemGameModeProtection = yamlConfiguration.getBoolean("Advanced.UseItem.GameModeChange.Protection.Enable");
UseItemGameModeMode = yamlConfiguration.getString("Advanced.UseItem.GameModeChange.Protection.Mode");
UseItemGameModeList = yamlConfiguration.getStringList("Advanced.UseItem.GameModeChange.Protection.List");
UseItemGameModeChangeEnable = yamlConfiguration.getBoolean("Advanced.UseItem.GameMode.Change.Enable");
UseItemGameModeChangeDelayInTicks = yamlConfiguration.getInt("Advanced.UseItem.GameMode.Change.DelayInTicks");
UseItemGameModeProtection = yamlConfiguration.getBoolean("Advanced.UseItem.GameMode.Protection.Enable");
UseItemGameModeMode = yamlConfiguration.getString("Advanced.UseItem.GameMode.Protection.Mode");
List<String> gml = new ArrayList<>();
for (String gm : yamlConfiguration.getStringList("Advanced.UseItem.GameMode.Protection.List")){
gml.add(gm.toUpperCase());
}
UseItemGameModeList = gml;
Sound_Enable = yamlConfiguration.getBoolean("Sound.Enable");