forked from LogBlock/LogBlock
Added option to disable auto spout downloading
This commit is contained in:
@@ -36,6 +36,7 @@ public class Config
|
||||
public final int linesPerPage, linesLimit;
|
||||
public final boolean askRollbacks, askRedos, askClearLogs, askClearLogAfterRollback, askRollbackAfterBan;
|
||||
public final String banPermission;
|
||||
public final boolean installSpout;
|
||||
public final Set<Integer> hiddenPlayers, hiddenBlocks;
|
||||
|
||||
public static enum LogKillsLevel {
|
||||
@@ -75,6 +76,7 @@ public class Config
|
||||
def.put("questioner.askClearLogAfterRollback", true);
|
||||
def.put("questioner.askRollbackAfterBan", false);
|
||||
def.put("questioner.banPermission", "mcbans.ban.local");
|
||||
def.put("updater.installSpout", true);
|
||||
tdef.put("aliases", Arrays.asList("t"));
|
||||
tdef.put("leftClickBehavior", "NONE");
|
||||
tdef.put("rightClickBehavior", "TOOL");
|
||||
@@ -141,6 +143,7 @@ public class Config
|
||||
askClearLogAfterRollback = config.getBoolean("questioner.askClearLogAfterRollback", true);
|
||||
askRollbackAfterBan = config.getBoolean("questioner.askRollbackAfterBan", false);
|
||||
banPermission = config.getString("questioner.banPermission");
|
||||
installSpout = config.getBoolean("updater.installSpout", true);
|
||||
final List<String> toolNames = config.getKeys("tools");
|
||||
System.out.println(toolNames.size());
|
||||
final List<Tool> tools = new ArrayList<Tool>();
|
||||
|
@@ -141,12 +141,18 @@ public class LogBlock extends JavaPlugin
|
||||
log.warning("[LogBlock] Failed to download WorldEdit. You may have to download it manually. You don't have to install it, just place the jar in the lib folder.");
|
||||
}
|
||||
if (config.logChestAccess && pm.getPlugin("Spout") == null)
|
||||
try {
|
||||
download(log, new URL("http://ci.getspout.org/job/Spout/Recommended/artifact/target/spout-dev-SNAPSHOT.jar"), new File("plugins/Spout.jar"));
|
||||
pm.loadPlugin(new File("plugins/Spout.jar"));
|
||||
pm.enablePlugin(pm.getPlugin("Spout"));
|
||||
} catch (final Exception ex) {
|
||||
log.warning("[LogBlock] Failed to install Spout, you may have to restart your server or install it manually.");
|
||||
if (config.installSpout)
|
||||
try {
|
||||
download(log, new URL("http://ci.getspout.org/job/Spout/Recommended/artifact/target/spout-dev-SNAPSHOT.jar"), new File("plugins/Spout.jar"));
|
||||
pm.loadPlugin(new File("plugins/Spout.jar"));
|
||||
pm.enablePlugin(pm.getPlugin("Spout"));
|
||||
} catch (final Exception ex) {
|
||||
config.logChestAccess = false;
|
||||
log.warning("[LogBlock] Failed to install Spout, you may have to restart your server or install it manually.");
|
||||
}
|
||||
else {
|
||||
config.logChestAccess = false;
|
||||
log.warning("[LogBlock] Spout is not installed. Disabling chest logging.");
|
||||
}
|
||||
commandsHandler = new CommandsHandler(this);
|
||||
getCommand("lb").setExecutor(commandsHandler);
|
||||
|
Reference in New Issue
Block a user