mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-03 01:00:18 +01:00
Fix removePassword option not working on KCauldron.
This commit is contained in:
parent
6132743913
commit
0fc15b8105
@ -624,11 +624,13 @@ public class AuthMe extends JavaPlugin {
|
|||||||
// Set the console filter to remove the passwords
|
// Set the console filter to remove the passwords
|
||||||
private void setLog4JFilter() {
|
private void setLog4JFilter() {
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
org.apache.logging.log4j.core.Logger coreLogger = (org.apache.logging.log4j.core.Logger) LogManager.getRootLogger();
|
org.apache.logging.log4j.core.Logger logger;
|
||||||
coreLogger.addFilter(new Log4JFilter());
|
logger = (org.apache.logging.log4j.core.Logger) LogManager.getRootLogger();
|
||||||
|
logger.addFilter(new Log4JFilter());
|
||||||
|
logger = (org.apache.logging.log4j.core.Logger) LogManager.getLogger("net.minecraft");
|
||||||
|
logger.addFilter(new Log4JFilter());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -51,9 +51,6 @@ public class Log4JFilter implements Filter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result filter(LogEvent record) {
|
public Result filter(LogEvent record) {
|
||||||
if (record == null) {
|
|
||||||
return Result.NEUTRAL;
|
|
||||||
}
|
|
||||||
return validateMessage(record.getMessage());
|
return validateMessage(record.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,9 +61,6 @@ public class Log4JFilter implements Filter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result filter(Logger arg0, Level arg1, Marker arg2, Object message, Throwable arg4) {
|
public Result filter(Logger arg0, Level arg1, Marker arg2, Object message, Throwable arg4) {
|
||||||
if (message == null) {
|
|
||||||
return Result.NEUTRAL;
|
|
||||||
}
|
|
||||||
return validateMessage(message.toString());
|
return validateMessage(message.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user