mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
Scoreboards are now OFF by default
I don't like them.
This commit is contained in:
parent
f5590ce334
commit
29befac27e
@ -16,6 +16,7 @@ Version 2.1.0
|
||||
+ Added links to mcMMO related websites to various commands
|
||||
+ Certain elements of mcMMO's UI have been restyled
|
||||
+ Added the tagline "Overhaul Era" to various locations until 3.0.0 comes out
|
||||
! (Scoreboards) Scoreboards are now disabled by default, I don't like them. You can turn them back on in config.yml
|
||||
+ (Experience) Coral (blocks) now give Mining XP
|
||||
+ (Experience) Coral (plants) now give Herbalism XP
|
||||
+ (Experience) Blue Ice now gives Mining XP
|
||||
|
@ -31,7 +31,7 @@ public class McscoreboardCommand implements TabExecutor {
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("keep")) {
|
||||
if (!Config.getInstance().getAllowKeepBoard()) {
|
||||
if (!Config.getInstance().getAllowKeepBoard() || !Config.getInstance().getScoreboardsEnabled()) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Disabled"));
|
||||
return true;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class InspectCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (sender instanceof Player && Config.getInstance().getInspectUseBoard()) {
|
||||
if (Config.getInstance().getScoreboardsEnabled() && sender instanceof Player && Config.getInstance().getInspectUseBoard()) {
|
||||
ScoreboardManager.enablePlayerInspectScoreboard((Player) sender, profile);
|
||||
|
||||
if (!Config.getInstance().getInspectUseChat()) {
|
||||
@ -79,7 +79,7 @@ public class InspectCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (sender instanceof Player && Config.getInstance().getInspectUseBoard()) {
|
||||
if (Config.getInstance().getScoreboardsEnabled() && sender instanceof Player && Config.getInstance().getInspectUseBoard()) {
|
||||
ScoreboardManager.enablePlayerInspectScoreboard((Player) sender, mcMMOPlayer.getProfile());
|
||||
|
||||
if (!Config.getInstance().getInspectUseChat()) {
|
||||
|
@ -30,7 +30,7 @@ public class MccooldownCommand implements TabExecutor {
|
||||
case 0:
|
||||
Player player = (Player) sender;
|
||||
|
||||
if (Config.getInstance().getCooldownUseBoard()) {
|
||||
if (Config.getInstance().getScoreboardsEnabled() && Config.getInstance().getCooldownUseBoard()) {
|
||||
ScoreboardManager.enablePlayerCooldownScoreboard(player);
|
||||
|
||||
if (!Config.getInstance().getCooldownUseChat()) {
|
||||
|
@ -28,7 +28,7 @@ public class McstatsCommand implements TabExecutor {
|
||||
case 0:
|
||||
Player player = (Player) sender;
|
||||
|
||||
if (Config.getInstance().getStatsUseBoard()) {
|
||||
if (Config.getInstance().getStatsUseBoard() && Config.getInstance().getScoreboardsEnabled()) {
|
||||
ScoreboardManager.enablePlayerStatsScoreboard(player);
|
||||
|
||||
if (!Config.getInstance().getStatsUseChat()) {
|
||||
|
@ -92,7 +92,7 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
//Link Header
|
||||
TextComponentFactory.sendPlayerUrlHeader(player);
|
||||
|
||||
if (Config.getInstance().getSkillUseBoard()) {
|
||||
if (Config.getInstance().getScoreboardsEnabled() && Config.getInstance().getSkillUseBoard()) {
|
||||
ScoreboardManager.enablePlayerSkillScoreboard(player, skill);
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public int getMobHealthbarTime() { return config.getInt("Mob_Healthbar.Display_Time", 3); }
|
||||
|
||||
/* Scoreboards */
|
||||
public boolean getScoreboardsEnabled() { return config.getBoolean("Scoreboard.Enabled", true); }
|
||||
public boolean getScoreboardsEnabled() { return config.getBoolean("Scoreboard.UseScoreboards", true); }
|
||||
public boolean getPowerLevelTagsEnabled() { return config.getBoolean("Scoreboard.Power_Level_Tags", false); }
|
||||
public boolean getAllowKeepBoard() { return config.getBoolean("Scoreboard.Allow_Keep", true); }
|
||||
public int getTipsAmount() { return config.getInt("Scoreboard.Tips_Amount", 5); }
|
||||
|
@ -956,7 +956,9 @@ public class McMMOPlayer {
|
||||
}
|
||||
|
||||
UserManager.remove(thisPlayer);
|
||||
ScoreboardManager.teardownPlayer(thisPlayer);
|
||||
|
||||
if(Config.getInstance().getScoreboardsEnabled())
|
||||
ScoreboardManager.teardownPlayer(thisPlayer);
|
||||
|
||||
if (inParty()) {
|
||||
party.removeOnlineMember(thisPlayer);
|
||||
|
@ -30,7 +30,8 @@ public class SelfListener implements Listener {
|
||||
Player player = event.getPlayer();
|
||||
PrimarySkillType skill = event.getSkill();
|
||||
|
||||
ScoreboardManager.handleLevelUp(player, skill);
|
||||
if(Config.getInstance().getScoreboardsEnabled())
|
||||
ScoreboardManager.handleLevelUp(player, skill);
|
||||
|
||||
if (!Config.getInstance().getLevelUpEffectsEnabled()) {
|
||||
return;
|
||||
@ -43,12 +44,14 @@ public class SelfListener implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerXp(McMMOPlayerXpGainEvent event) {
|
||||
ScoreboardManager.handleXp(event.getPlayer(), event.getSkill());
|
||||
if(Config.getInstance().getScoreboardsEnabled())
|
||||
ScoreboardManager.handleXp(event.getPlayer(), event.getSkill());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onAbility(McMMOPlayerAbilityActivateEvent event) {
|
||||
ScoreboardManager.cooldownUpdate(event.getPlayer(), event.getSkill());
|
||||
if(Config.getInstance().getScoreboardsEnabled())
|
||||
ScoreboardManager.cooldownUpdate(event.getPlayer(), event.getSkill());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
|
||||
|
@ -219,7 +219,11 @@ public class mcMMO extends JavaPlugin {
|
||||
UserManager.saveAll(); // Make sure to save player information if the server shuts down
|
||||
UserManager.clearAll();
|
||||
PartyManager.saveParties(); // Save our parties
|
||||
ScoreboardManager.teardownAll();
|
||||
|
||||
//TODO: Needed?
|
||||
if(Config.getInstance().getScoreboardsEnabled())
|
||||
ScoreboardManager.teardownAll();
|
||||
|
||||
formulaManager.saveFormula();
|
||||
holidayManager.saveAnniversaryFiles();
|
||||
placeStore.saveAll(); // Save our metadata
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.runnables.commands;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
@ -29,7 +30,7 @@ public class McrankCommandDisplayTask extends BukkitRunnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (useBoard) {
|
||||
if (useBoard && Config.getInstance().getScoreboardsEnabled()) {
|
||||
displayBoard();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.gmail.nossr50.runnables.commands;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.database.PlayerStat;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
@ -33,7 +34,7 @@ public class MctopCommandDisplayTask extends BukkitRunnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (useBoard) {
|
||||
if (useBoard && Config.getInstance().getScoreboardsEnabled()) {
|
||||
displayBoard();
|
||||
}
|
||||
|
||||
|
@ -76,16 +76,21 @@ public class PlayerProfileLoadingTask extends BukkitRunnable {
|
||||
mcMMOPlayer.setupPartyData();
|
||||
UserManager.track(mcMMOPlayer);
|
||||
mcMMOPlayer.actualizeRespawnATS();
|
||||
ScoreboardManager.setupPlayer(player);
|
||||
|
||||
if (Config.getInstance().getScoreboardsEnabled()) {
|
||||
ScoreboardManager.setupPlayer(player);
|
||||
|
||||
if (Config.getInstance().getShowStatsAfterLogin()) {
|
||||
ScoreboardManager.enablePlayerStatsScoreboard(player);
|
||||
new McScoreboardKeepTask(player).runTaskLater(mcMMO.p, 1 * Misc.TICK_CONVERSION_FACTOR);
|
||||
}
|
||||
}
|
||||
|
||||
if (Config.getInstance().getShowProfileLoadedMessage()) {
|
||||
player.sendMessage(LocaleLoader.getString("Profile.Loading.Success"));
|
||||
}
|
||||
|
||||
if (Config.getInstance().getShowStatsAfterLogin()) {
|
||||
ScoreboardManager.enablePlayerStatsScoreboard(player);
|
||||
new McScoreboardKeepTask(player).runTaskLater(mcMMO.p, 1 * Misc.TICK_CONVERSION_FACTOR);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ General:
|
||||
###
|
||||
Scoreboard:
|
||||
# Set this to true to enable scoreboards
|
||||
Enable: true
|
||||
UseScoreboards: false
|
||||
# Display player's power levels below their names?
|
||||
Power_Level_Tags: false
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user