forked from LogBlock/LogBlock
Added option to disable version check
This commit is contained in:
@@ -53,7 +53,8 @@ public class CommandsHandler implements CommandExecutor
|
|||||||
try {
|
try {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
sender.sendMessage(ChatColor.LIGHT_PURPLE + "LogBlock v" + logblock.getDescription().getVersion() + " by DiddiZ");
|
sender.sendMessage(ChatColor.LIGHT_PURPLE + "LogBlock v" + logblock.getDescription().getVersion() + " by DiddiZ");
|
||||||
sender.sendMessage(ChatColor.LIGHT_PURPLE + logblock.getUpdater().checkVersion());
|
if (config.checkVersion)
|
||||||
|
sender.sendMessage(ChatColor.LIGHT_PURPLE + logblock.getUpdater().checkVersion());
|
||||||
sender.sendMessage(ChatColor.LIGHT_PURPLE + "Type /lb help for help");
|
sender.sendMessage(ChatColor.LIGHT_PURPLE + "Type /lb help for help");
|
||||||
} else {
|
} else {
|
||||||
final String command = args[0].toLowerCase();
|
final String command = args[0].toLowerCase();
|
||||||
|
@@ -36,7 +36,7 @@ public class Config
|
|||||||
public final int linesPerPage, linesLimit;
|
public final int linesPerPage, linesLimit;
|
||||||
public final boolean askRollbacks, askRedos, askClearLogs, askClearLogAfterRollback, askRollbackAfterBan;
|
public final boolean askRollbacks, askRedos, askClearLogs, askClearLogAfterRollback, askRollbackAfterBan;
|
||||||
public final String banPermission;
|
public final String banPermission;
|
||||||
public final boolean installSpout;
|
public final boolean installSpout, checkVersion;
|
||||||
public final Set<Integer> hiddenPlayers, hiddenBlocks;
|
public final Set<Integer> hiddenPlayers, hiddenBlocks;
|
||||||
|
|
||||||
public static enum LogKillsLevel {
|
public static enum LogKillsLevel {
|
||||||
@@ -77,6 +77,7 @@ public class Config
|
|||||||
def.put("questioner.askRollbackAfterBan", false);
|
def.put("questioner.askRollbackAfterBan", false);
|
||||||
def.put("questioner.banPermission", "mcbans.ban.local");
|
def.put("questioner.banPermission", "mcbans.ban.local");
|
||||||
def.put("updater.installSpout", true);
|
def.put("updater.installSpout", true);
|
||||||
|
def.put("updater.checkVersion", true);
|
||||||
tdef.put("aliases", Arrays.asList("t"));
|
tdef.put("aliases", Arrays.asList("t"));
|
||||||
tdef.put("leftClickBehavior", "NONE");
|
tdef.put("leftClickBehavior", "NONE");
|
||||||
tdef.put("rightClickBehavior", "TOOL");
|
tdef.put("rightClickBehavior", "TOOL");
|
||||||
@@ -144,6 +145,7 @@ public class Config
|
|||||||
askRollbackAfterBan = config.getBoolean("questioner.askRollbackAfterBan", false);
|
askRollbackAfterBan = config.getBoolean("questioner.askRollbackAfterBan", false);
|
||||||
banPermission = config.getString("questioner.banPermission");
|
banPermission = config.getString("questioner.banPermission");
|
||||||
installSpout = config.getBoolean("updater.installSpout", true);
|
installSpout = config.getBoolean("updater.installSpout", true);
|
||||||
|
checkVersion = config.getBoolean("updater.checkVersion", true);
|
||||||
final List<String> toolNames = config.getKeys("tools");
|
final List<String> toolNames = config.getKeys("tools");
|
||||||
System.out.println(toolNames.size());
|
System.out.println(toolNames.size());
|
||||||
final List<Tool> tools = new ArrayList<Tool>();
|
final List<Tool> tools = new ArrayList<Tool>();
|
||||||
|
@@ -65,8 +65,9 @@ public class LogBlock extends JavaPlugin
|
|||||||
log = getServer().getLogger();
|
log = getServer().getLogger();
|
||||||
try {
|
try {
|
||||||
updater = new Updater(this);
|
updater = new Updater(this);
|
||||||
log.info("[LogBlock] Version check: " + updater.checkVersion());
|
|
||||||
config = new Config(this);
|
config = new Config(this);
|
||||||
|
if (config.checkVersion)
|
||||||
|
log.info("[LogBlock] Version check: " + updater.checkVersion());
|
||||||
final File file = new File("lib/mysql-connector-java-bin.jar");
|
final File file = new File("lib/mysql-connector-java-bin.jar");
|
||||||
if (!file.exists() || file.length() == 0)
|
if (!file.exists() || file.length() == 0)
|
||||||
download(log, new URL("http://diddiz.insane-architects.net/download/mysql-connector-java-bin.jar"), file);
|
download(log, new URL("http://diddiz.insane-architects.net/download/mysql-connector-java-bin.jar"), file);
|
||||||
|
Reference in New Issue
Block a user