mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-19 10:22:58 +01:00
Added toggle to disable party system
This commit is contained in:
@@ -137,7 +137,8 @@ public class mcMMO extends JavaPlugin {
|
||||
registerCoreSkills();
|
||||
registerCustomRecipes();
|
||||
|
||||
PartyManager.loadParties();
|
||||
if(getConfigManager().getConfigParty().isPartySystemEnabled())
|
||||
PartyManager.loadParties();
|
||||
|
||||
formulaManager = new FormulaManager();
|
||||
holidayManager = new HolidayManager();
|
||||
@@ -499,16 +500,21 @@ public class mcMMO extends JavaPlugin {
|
||||
new UserPurgeTask().runTaskTimerAsynchronously(this, purgeIntervalTicks, purgeIntervalTicks);
|
||||
}
|
||||
|
||||
// Automatically remove old members from parties
|
||||
long kickIntervalTicks = getConfigManager().getConfigParty().getPartyCleanup().getPartyAutoKickHoursInterval() * 60L * 60L * Misc.TICK_CONVERSION_FACTOR;
|
||||
//Party System Stuff
|
||||
if(mcMMO.configManager.getConfigParty().isPartySystemEnabled())
|
||||
{
|
||||
// Automatically remove old members from parties
|
||||
long kickIntervalTicks = getConfigManager().getConfigParty().getPartyCleanup().getPartyAutoKickHoursInterval() * 60L * 60L * Misc.TICK_CONVERSION_FACTOR;
|
||||
|
||||
if (kickIntervalTicks == 0) {
|
||||
new PartyAutoKickTask().runTaskLater(this, 2 * Misc.TICK_CONVERSION_FACTOR); // Start 2 seconds after startup.
|
||||
}
|
||||
else if (kickIntervalTicks > 0) {
|
||||
new PartyAutoKickTask().runTaskTimer(this, kickIntervalTicks, kickIntervalTicks);
|
||||
if (kickIntervalTicks == 0) {
|
||||
new PartyAutoKickTask().runTaskLater(this, 2 * Misc.TICK_CONVERSION_FACTOR); // Start 2 seconds after startup.
|
||||
}
|
||||
else if (kickIntervalTicks > 0) {
|
||||
new PartyAutoKickTask().runTaskTimer(this, kickIntervalTicks, kickIntervalTicks);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Update power level tag scoreboards
|
||||
new PowerLevelUpdatingTask().runTaskTimer(this, 2 * Misc.TICK_CONVERSION_FACTOR, 2 * Misc.TICK_CONVERSION_FACTOR);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user