mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 11:10:04 +01:00
Update scoreboard type on scoreboard enable
This commit is contained in:
parent
5542ff42dc
commit
7837c490cd
@ -8,6 +8,7 @@ import com.songoda.skyblock.playerdata.PlayerData;
|
||||
import com.songoda.skyblock.playerdata.PlayerDataManager;
|
||||
import com.songoda.skyblock.scoreboard.ScoreboardManager;
|
||||
import com.songoda.skyblock.sound.SoundManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -44,6 +45,9 @@ public class ScoreboardCommand extends SubCommand {
|
||||
} else {
|
||||
playerData.setScoreboard(true);
|
||||
scoreboardManager.removeDisabledPlayer(player);
|
||||
Bukkit.getScheduler().runTask(plugin, () -> {
|
||||
scoreboardManager.updatePlayerScoreboardType(player);
|
||||
});
|
||||
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Scoreboard.Enabled.Message"));
|
||||
soundManager.playSound(player, CompatibleSound.BLOCK_WOODEN_DOOR_OPEN.getSound(), 1.0F, 1.0F);
|
||||
|
Loading…
Reference in New Issue
Block a user