mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
only add/remove scoreboards when teleporting if scoreboards are enabled (#4400)
This commit is contained in:
parent
52ac1cc522
commit
a225d604ef
@ -72,10 +72,12 @@ public class PlayerListener implements Listener {
|
||||
/* WORLD BLACKLIST CHECK */
|
||||
if(WorldBlacklist.isWorldBlacklisted(event.getPlayer().getWorld())) {
|
||||
//Remove scoreboards
|
||||
ScoreboardManager.teardownPlayer(event.getPlayer());
|
||||
if(Config.getInstance().getScoreboardsEnabled()) {
|
||||
ScoreboardManager.teardownPlayer(event.getPlayer());
|
||||
}
|
||||
return;
|
||||
} else if(WorldBlacklist.isWorldBlacklisted(event.getFrom().getWorld())) {
|
||||
//This only fires if they are traveling to a non-blacklisted world from a blacklisted world
|
||||
} else if(WorldBlacklist.isWorldBlacklisted(event.getFrom().getWorld()) && Config.getInstance().getScoreboardsEnabled()) {
|
||||
//This only fires if they are travelling to a non-blacklisted world from a blacklisted world
|
||||
|
||||
//Setup scoreboards
|
||||
ScoreboardManager.setupPlayer(event.getPlayer());
|
||||
|
Loading…
Reference in New Issue
Block a user