mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-24 18:17:53 +01:00
Fixed NoClassDefError on Bungee
This commit is contained in:
parent
7ff481d610
commit
3236c61820
@ -7,6 +7,7 @@ import com.djrapitops.plugin.command.SubCommand;
|
||||
import com.djrapitops.plugin.task.AbsRunnable;
|
||||
import main.java.com.djrapitops.plan.Log;
|
||||
import main.java.com.djrapitops.plan.Permissions;
|
||||
import main.java.com.djrapitops.plan.Plan;
|
||||
import main.java.com.djrapitops.plan.api.IPlan;
|
||||
import main.java.com.djrapitops.plan.data.WebUser;
|
||||
import main.java.com.djrapitops.plan.database.tables.SecurityTable;
|
||||
@ -14,8 +15,6 @@ import main.java.com.djrapitops.plan.locale.Locale;
|
||||
import main.java.com.djrapitops.plan.locale.Msg;
|
||||
import main.java.com.djrapitops.plan.utilities.Check;
|
||||
import main.java.com.djrapitops.plan.utilities.PassEncryptUtil;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.core.Logger;
|
||||
|
||||
/**
|
||||
* Command for registering web users.
|
||||
@ -40,7 +39,9 @@ public class RegisterCommand extends SubCommand {
|
||||
Locale.get(Msg.CMD_USG_WEB_REGISTER).toString(),
|
||||
"<password> [name] [access lvl]");
|
||||
this.plugin = plugin;
|
||||
setupFilter();
|
||||
if (plugin instanceof Plan) {
|
||||
setupFilter();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -140,7 +141,6 @@ public class RegisterCommand extends SubCommand {
|
||||
* Setups the command console output filter
|
||||
*/
|
||||
private void setupFilter() {
|
||||
Logger logger = (Logger) LogManager.getRootLogger();
|
||||
logger.addFilter(new RegisterCommandFilter());
|
||||
new RegisterCommandFilter().registerFilter();
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package main.java.com.djrapitops.plan.command.commands;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Marker;
|
||||
import org.apache.logging.log4j.core.LogEvent;
|
||||
import org.apache.logging.log4j.core.Logger;
|
||||
@ -20,6 +21,11 @@ public class RegisterCommandFilter extends AbstractFilter {
|
||||
|
||||
private final Set<String> censoredCommands = ImmutableSet.of("/plan web register", "/plan webuser register", "/plan register");
|
||||
|
||||
public void registerFilter() {
|
||||
Logger logger = (Logger) LogManager.getRootLogger();
|
||||
logger.addFilter(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result filter(LogEvent event) {
|
||||
if (event == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user