parent
1e84807d2b
commit
a75f687985
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2022 GeorgH93
|
||||
* Copyright (C) 2023 GeorgH93
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -81,7 +81,7 @@ public class CommandManager extends CommandExecutorWithSubCommandsGeneric<Minepa
|
|||
registerSubCommand(new RestoreCommand(plugin));
|
||||
registerSubCommand(new MigrateCommand(plugin));
|
||||
registerSubCommand(new VersionCommand(plugin));
|
||||
if (plugin.getConfiguration().getFullInvCollect() && plugin.getConfiguration().isToggleAllowed()) registerSubCommand(new PickupCommand(plugin));
|
||||
if (plugin.getConfiguration().isFullInvToggleAllowed()) registerSubCommand(new PickupCommand(plugin));
|
||||
registerSubCommand(new DebugCommand(plugin));
|
||||
registerSubCommand(new HelpCommand(plugin, commands, this));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2022 GeorgH93
|
||||
* Copyright (C) 2023 GeorgH93
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -318,11 +318,11 @@ public class Config extends Configuration implements DatabaseConnectionConfigura
|
|||
return getConfigE().getDouble("FullInventory.CollectRadius", 1.5); // in blocks
|
||||
}
|
||||
|
||||
public boolean isToggleAllowed() {
|
||||
public boolean isFullInvToggleAllowed() {
|
||||
return getConfigE().getBoolean("FullInventory.IsToggleAllowed", false);
|
||||
}
|
||||
|
||||
public boolean isEnabledOnJoin() {
|
||||
public boolean isFullInvEnabledOnJoin() {
|
||||
return getFullInvCollect();
|
||||
}
|
||||
//endregion
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2022 MartenM
|
||||
* Copyright (C) 2022 GeorgH93
|
||||
* Copyright (C) 2023 GeorgH93
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -58,8 +57,8 @@ public class ItemsCollector extends BukkitRunnable
|
|||
this.plugin = plugin;
|
||||
this.radius = plugin.getConfiguration().getFullInvRadius();
|
||||
|
||||
this.isToggleable = plugin.getConfiguration().isToggleAllowed();
|
||||
this.enabledOnJoin = plugin.getConfiguration().isEnabledOnJoin();
|
||||
this.isToggleable = plugin.getConfiguration().isFullInvToggleAllowed();
|
||||
this.enabledOnJoin = plugin.getConfiguration().isFullInvEnabledOnJoin();
|
||||
this.toggleList = new HashSet<>();
|
||||
|
||||
task = runTaskTimer(plugin, plugin.getConfiguration().getFullInvCheckInterval(), plugin.getConfiguration().getFullInvCheckInterval());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2022 GeorgH93
|
||||
* Copyright (C) 2023 GeorgH93
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -216,7 +216,7 @@ public class Minepacks extends JavaPlugin implements MinepacksPlugin, IPlugin
|
|||
else shortcut = null;
|
||||
if(config.isWorldWhitelistMode()) pluginManager.registerEvents(new WorldBlacklistUpdater(this), this);
|
||||
//endregion
|
||||
if(config.getFullInvCollect()) collector = new ItemsCollector(this);
|
||||
if(config.getFullInvCollect() || config.isFullInvToggleAllowed()) collector = new ItemsCollector(this);
|
||||
worldBlacklist = config.getWorldBlacklist();
|
||||
worldBlacklistMode = (worldBlacklist.size() == 0) ? WorldBlacklistMode.None : config.getWorldBlockMode();
|
||||
|
||||
|
|
Loading…
Reference in New Issue