Skip to content

Commit

Permalink
update 08.09.2021
Browse files Browse the repository at this point in the history
  • Loading branch information
Xitee1 committed Sep 8, 2021
1 parent 9bac30f commit 56c24d7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions src/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#####################################################################################################
### Scoreboard + Tablist + Prefix + Chat | Animated ###
### Powerboard: Scoreboard + Tablist + Prefix + Chat | Animated ###
### ###
### You need some help? Have a look at our wiki: https://wiki.xitma.de/plugin.php?name=scoreboard ###
### For bugreports and proposals join our Discord: https://discord.gg/p95cB9YQFJ ###
Expand Down Expand Up @@ -88,7 +88,7 @@ placeholder:
######################
update:
notification: true # Send a message to all Admins on join if a new update is available
autoupdater: false # With this option, the plugin will be automatically updatet
autoupdater: false # With this option, the plugin will be automatically updated

################################################
#### The debug can help you to find problems ###
Expand Down
4 changes: 2 additions & 2 deletions src/de/xite/scoreboard/listeners/JoinQuitListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public void onJoin(PlayerJoinEvent e) {
if(p.hasPermission("scoreboard.update") || p.isOp()) {
if(Updater.checkVersion()) {
if(pl.getConfig().getBoolean("update.notification")) {
p.sendMessage(Main.pr+ChatColor.RED+"A new version is available (§bv"+Updater.version+ChatColor.RED+")! Your version: §bv"+pl.getDescription().getVersion());
p.sendMessage(Main.pr+ChatColor.RED+"A new version is available ("+ChatColor.AQUA+"v"+Updater.version+ChatColor.RED+")! Your version: "+ChatColor.AQUA+pl.getDescription().getVersion());
if(pl.getConfig().getBoolean("update.autoupdater")) {
p.sendMessage(Main.pr+ChatColor.GREEN+"The plugin will be updated automatically after a server restart.");
}else {
p.sendMessage(Main.pr+ChatColor.RED+"The auto-updater is disabled in your config.yml. Type §6/sb update §cto update to the newest version.");
p.sendMessage(Main.pr+ChatColor.RED+"The auto-updater is disabled in your config.yml. Type /sb update or enable the auto-updater.");
}
}
}
Expand Down
50 changes: 25 additions & 25 deletions src/de/xite/scoreboard/main/ExternalPlugins.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,42 @@ public static void initializePlugins() {
pl.getLogger().severe("There was an error while loading Vault! Make sure that you have a money system on your server that also supports Vault.");
}
}
if(Bukkit.getPluginManager().isPluginEnabled("PermissionsEx"))
hasPex = true;
if(Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI"))
hasPapi = true;
if(Bukkit.getPluginManager().isPluginEnabled("LuckPerms")) {
hasLuckPerms = true;
if(Bukkit.getPluginManager().isPluginEnabled("PermissionsEx"))
hasPex = true;
if(Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI"))
hasPapi = true;
if(Bukkit.getPluginManager().isPluginEnabled("LuckPerms")) {
hasLuckPerms = true;
RegisteredServiceProvider<LuckPerms> provider = Bukkit.getServicesManager().getRegistration(LuckPerms.class);
if(provider != null) {
luckPerms = provider.getProvider();
}
new LuckPermsListener(pl, luckPerms);
}
}
// BStats analytics
try {
int pluginId = 6722; // <-- Replace with the id of your plugin!
BStatsMetrics metrics = new BStatsMetrics(pl, pluginId);
//Costom charts
metrics.addCustomChart(new BStatsMetrics.SimplePie("update_auto_update", () -> pl.getConfig().getBoolean("update.autoupdater") ? "Aktiviert" : "Deaktiviert"));
metrics.addCustomChart(new BStatsMetrics.SimplePie("update_notifications", () -> pl.getConfig().getBoolean("update.notification") ? "Aktiviert" : "Deaktiviert"));
BStatsMetrics metrics = new BStatsMetrics(pl, pluginId);
// Custom charts
metrics.addCustomChart(new BStatsMetrics.SimplePie("update_auto_update", () -> pl.getConfig().getBoolean("update.autoupdater") ? "Aktiviert" : "Deaktiviert"));
metrics.addCustomChart(new BStatsMetrics.SimplePie("update_notifications", () -> pl.getConfig().getBoolean("update.notification") ? "Aktiviert" : "Deaktiviert"));

metrics.addCustomChart(new BStatsMetrics.SimplePie("setting_use_scoreboard", () -> pl.getConfig().getBoolean("scoreboard") ? "Aktiviert" : "Deaktiviert"));
metrics.addCustomChart(new BStatsMetrics.SimplePie("setting_use_tablist_text", () -> pl.getConfig().getBoolean("tablist.text") ? "Aktiviert" : "Deaktiviert"));
metrics.addCustomChart(new BStatsMetrics.SimplePie("setting_use_tablist_ranks", () -> pl.getConfig().getBoolean("tablist.ranks") ? "Aktiviert" : "Deaktiviert"));
metrics.addCustomChart(new BStatsMetrics.SimplePie("setting_use_chat", () -> pl.getConfig().getBoolean("chat.ranks") ? "Atktiviert" : "Deaktiviert"));
metrics.addCustomChart(new BStatsMetrics.SimplePie("setting_permsystem", () -> pl.getConfig().getString("ranks.permissionsystem").toLowerCase()));
if(Main.debug)
pl.getLogger().info("Analytics sent to BStats");
metrics.addCustomChart(new BStatsMetrics.SimplePie("setting_use_scoreboard", () -> pl.getConfig().getBoolean("scoreboard") ? "Aktiviert" : "Deaktiviert"));
metrics.addCustomChart(new BStatsMetrics.SimplePie("setting_use_tablist_text", () -> pl.getConfig().getBoolean("tablist.text") ? "Aktiviert" : "Deaktiviert"));
metrics.addCustomChart(new BStatsMetrics.SimplePie("setting_use_tablist_ranks", () -> pl.getConfig().getBoolean("tablist.ranks") ? "Aktiviert" : "Deaktiviert"));
metrics.addCustomChart(new BStatsMetrics.SimplePie("setting_use_chat", () -> pl.getConfig().getBoolean("chat.ranks") ? "Atktiviert" : "Deaktiviert"));
metrics.addCustomChart(new BStatsMetrics.SimplePie("setting_permsystem", () -> pl.getConfig().getString("ranks.permissionsystem").toLowerCase()));
if(Main.debug)
pl.getLogger().info("Analytics sent to BStats");
} catch (Exception e) {
pl.getLogger().warning("Could not send analytics to BStats!");
}
}
private static boolean setupEconomy() {
RegisteredServiceProvider<Economy> rsp = pl.getServer().getServicesManager().getRegistration(Economy.class);
if(rsp == null)
return false;
econ = rsp.getProvider();
return econ != null;
}
private static boolean setupEconomy() {
RegisteredServiceProvider<Economy> rsp = pl.getServer().getServicesManager().getRegistration(Economy.class);
if(rsp == null)
return false;
econ = rsp.getProvider();
return econ != null;
}
}

0 comments on commit 56c24d7

Please sign in to comment.