forked from LogBlock/LogBlock
Cancel early when trying to lookup chat while chat is not logged
Fixes #683
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
package de.diddiz.LogBlock;
|
||||
|
||||
import de.diddiz.LogBlock.config.Config;
|
||||
import de.diddiz.util.Utils;
|
||||
import de.diddiz.worldedit.RegionContainer;
|
||||
import org.bukkit.Location;
|
||||
@ -758,6 +759,9 @@ public final class QueryParams implements Cloneable {
|
||||
throw new IllegalArgumentException("This world ('" + world.getName() + "') isn't logged");
|
||||
}
|
||||
}
|
||||
if (bct == BlockChangeType.CHAT && !Config.isLogging(Logging.CHAT)) {
|
||||
throw new IllegalArgumentException("Chat is not logged");
|
||||
}
|
||||
if (session != null) {
|
||||
session.lastQuery = clone();
|
||||
}
|
||||
|
Reference in New Issue
Block a user