mirror of
https://github.com/Maxlego08/zKoth.git
synced 2025-02-22 02:42:15 +01:00
Fix
This commit is contained in:
parent
13ac38aa1c
commit
8b65f7eafb
@ -1,7 +1,7 @@
|
||||
name: zKoth
|
||||
author: Maxlego08
|
||||
main: fr.maxlego08.zkoth.ZKothPlugin
|
||||
version: 2.0.0.5
|
||||
version: 2.0.0.6
|
||||
softdepend: [PlaceholderAPI, Guilds, Factions, FactionsX, SuperiorSkyblock2, LegacyFactions, FeatherBoard, TAB, TitleManager]
|
||||
commands:
|
||||
api-version: 1.13
|
@ -14,6 +14,7 @@ import fr.maxlego08.zkoth.scoreboard.implementations.FeatherBoardHook;
|
||||
import fr.maxlego08.zkoth.scoreboard.implementations.TabPremiumHook;
|
||||
import fr.maxlego08.zkoth.scoreboard.implementations.TitleManagerHook;
|
||||
import fr.maxlego08.zkoth.zcore.ZPlugin;
|
||||
import fr.maxlego08.zkoth.zcore.logger.Logger;
|
||||
import fr.maxlego08.zkoth.zcore.utils.plugins.Metrics;
|
||||
import fr.maxlego08.zkoth.zcore.utils.plugins.Plugins;
|
||||
|
||||
@ -60,12 +61,20 @@ public class ZKothPlugin extends ZPlugin {
|
||||
|
||||
if (this.isEnable(Plugins.FEATHERBOARD)) {
|
||||
this.scoreboardManager.setScoreboard(new FeatherBoardHook());
|
||||
} else if (this.isEnable(Plugins.TAB)) {
|
||||
this.scoreboardManager.setScoreboard(new TabPremiumHook());
|
||||
} else if (this.isEnable(Plugins.TITLEMANAGER)) {
|
||||
}
|
||||
|
||||
try {
|
||||
if (this.isEnable(Plugins.TAB) && Class.forName("me/neznamy/tab/api/TABAPI") != null) {
|
||||
this.scoreboardManager.setScoreboard(new TabPremiumHook());
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
|
||||
if (this.isEnable(Plugins.TITLEMANAGER)) {
|
||||
this.scoreboardManager.setScoreboard(new TitleManagerHook());
|
||||
}
|
||||
this.scoreboardManager.setDefaultScoreboard();
|
||||
Logger.info("Load " + this.scoreboardManager.getScoreboard().getClass().getName() + " scoreboard manager");
|
||||
|
||||
getSavers().forEach(saver -> saver.load(getPersist()));
|
||||
|
||||
|
@ -240,5 +240,9 @@ public class ScoreBoardManager extends ZUtils {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public Scoreboard getScoreboard() {
|
||||
return scoreboard;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ public class TabPremiumHook implements Scoreboard {
|
||||
@Override
|
||||
public void toggle(Player player, Consumer<Player> after) {
|
||||
TabPlayer tabPlayer = TABAPI.getPlayer(player.getUniqueId());
|
||||
System.out.println(tabPlayer);
|
||||
if (tabPlayer != null && !tabPlayer.isScoreboardVisible())
|
||||
tabPlayer.toggleScoreboard(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user