Suppress legacy logs

This commit is contained in:
NotAlexNoyle committed 2026-06-17 04:07:33 -04:00
1 parent aa58ccbb19
commit d9ca6078be
2 files changed
+13 -18

No files matched your search

@@ -31,7 +31,6 @@ import fr.neatmonster.nocheatplus.compat.AlmostBoolean;
import fr.neatmonster.nocheatplus.compat.BridgeHealth;
import fr.neatmonster.nocheatplus.components.config.value.OverrideType;
import fr.neatmonster.nocheatplus.components.registry.feature.INotifyReload;
import fr.neatmonster.nocheatplus.logging.StaticLog;
import fr.neatmonster.nocheatplus.players.DataManager;
import fr.neatmonster.nocheatplus.players.IPlayerData;
import fr.neatmonster.nocheatplus.stats.Counters;
@@ -65,9 +64,8 @@ public class FastConsume extends Check implements Listener, INotifyReload {
// TODO: Do this kind of thing via registries later on.
//ConfigManager.setForAllConfigs(ConfPaths.INVENTORY_INSTANTEAT_CHECK, false);
NCPAPIProvider.getNoCheatPlusAPI().getWorldDataManager().overrideCheckActivation(
CheckType.INVENTORY_INSTANTEAT, AlmostBoolean.NO,
CheckType.INVENTORY_INSTANTEAT, AlmostBoolean.NO,
OverrideType.PERMANENT, true);
StaticLog.logInfo("Inventory checks: FastConsume is available, disabled InstantEat.");
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
@@ -870,10 +870,10 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
if (getGenericInstance(ActionFactoryFactory.class) == null) {
setActionFactoryFactory(null); // Set to default.
}
// Logging must exist before configuration parsing can emit warnings.
if (logManager == null || logManager.getStreamID(Streams.STATUS.name) != Streams.STATUS) {
logManager = new BukkitLogManager(this);
StaticLog.setStreamID(Streams.INIT);
// Logging must exist before configuration parsing can emit warnings.
if (logManager == null || logManager.getStreamID(Streams.STATUS.name) != Streams.STATUS) {
logManager = new BukkitLogManager(this);
StaticLog.setStreamID(Streams.INIT);
StaticLog.setUseLogManager(true);
logManager.info(Streams.INIT, "Logging system initialized.");
logManager.info(Streams.INIT, "Detected Minecraft version: " + ServerVersion.getMinecraftVersion());
@@ -884,14 +884,14 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
// TODO Auto-generated method stub
return NoCheatPlus.this.getRegistryStreamId();
}
}, "[GenericInstanceRegistry] ");
}
// Configuration.
if (!ConfigManager.isInitialized()) {
ConfigManager.init(this, worldDataManager);
// Basic setup for exemption (uses CheckType). This is redundant, but should not hurt.
NCPExemptionManager.setExemptionSettings(new ExemptionSettings(ConfigManager.getConfigFile()));
}
}, "[GenericInstanceRegistry] ");
}
// Configuration.
if (!ConfigManager.isInitialized()) {
ConfigManager.init(this, worldDataManager);
// Basic setup for exemption (uses CheckType). This is redundant, but should not hurt.
NCPExemptionManager.setExemptionSettings(new ExemptionSettings(ConfigManager.getConfigFile()));
}
}
private void updateNoCheatPlusAPI() {
@@ -1086,9 +1086,6 @@ public class NoCheatPlus extends JavaPlugin implements NoCheatPlusAPI {
* @param config
*/
private void logOtherNotes(ConfigFile config) {
if (ServerVersion.compareMinecraftVersion("1.9") >= 0) {
logManager.info(Streams.INIT, "Force disable FastHeal, FastConsume, PacketFrequency and InstantBow on Minecraft 1.9 and later.");
}
}
/**