mirror of
https://github.com/funkemunky/AntiVPN.git
synced 2026-06-05 03:12:20 +00:00
Fixing sql errors and fixing NPE of missing VpnStrings
This commit is contained in:
@@ -2,6 +2,7 @@ package dev.brighten.antivpn.bungee;
|
||||
|
||||
import dev.brighten.antivpn.AntiVPN;
|
||||
import dev.brighten.antivpn.bungee.util.Config;
|
||||
import dev.brighten.antivpn.bungee.util.ConfigDefault;
|
||||
import dev.brighten.antivpn.command.Command;
|
||||
import lombok.Getter;
|
||||
import lombok.val;
|
||||
@@ -27,7 +28,7 @@ public class BungeePlugin extends Plugin {
|
||||
private Config config;
|
||||
private SingleLineChart vpnDetections, ipsChecked;
|
||||
|
||||
private static BaseComponent[] noPermission = new ComponentBuilder("No permission").color(ChatColor.RED)
|
||||
private static final BaseComponent[] noPermission = new ComponentBuilder("No permission").color(ChatColor.RED)
|
||||
.create();
|
||||
|
||||
@Override
|
||||
@@ -38,10 +39,16 @@ public class BungeePlugin extends Plugin {
|
||||
BungeeCord.getInstance().getLogger().info("Loading config...");
|
||||
config = new Config();
|
||||
|
||||
|
||||
//Loading plugin
|
||||
BungeeCord.getInstance().getLogger().info("Starting AntiVPN services...");
|
||||
AntiVPN.start(new BungeeConfig(), new BungeeListener(), new BungeePlayerExecutor());
|
||||
|
||||
BungeeCord.getInstance().getLogger().info("Getting strings...");
|
||||
AntiVPN.getInstance().getMessageHandler().initStrings(vpnString -> new ConfigDefault<>
|
||||
(vpnString.getDefaultMessage(), "messages." + vpnString.getKey(), BungeePlugin.pluginInstance)
|
||||
.get());
|
||||
|
||||
if(AntiVPN.getInstance().getConfig().metrics()) {
|
||||
BungeeCord.getInstance().getLogger().info("Starting bStats metrics...");
|
||||
Metrics metrics = new Metrics(this, 12616);
|
||||
|
||||
Reference in New Issue
Block a user