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 */
|
/* WORLD BLACKLIST CHECK */
|
||||||
if(WorldBlacklist.isWorldBlacklisted(event.getPlayer().getWorld())) {
|
if(WorldBlacklist.isWorldBlacklisted(event.getPlayer().getWorld())) {
|
||||||
//Remove scoreboards
|
//Remove scoreboards
|
||||||
|
if(Config.getInstance().getScoreboardsEnabled()) {
|
||||||
ScoreboardManager.teardownPlayer(event.getPlayer());
|
ScoreboardManager.teardownPlayer(event.getPlayer());
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
} else if(WorldBlacklist.isWorldBlacklisted(event.getFrom().getWorld())) {
|
} else if(WorldBlacklist.isWorldBlacklisted(event.getFrom().getWorld()) && Config.getInstance().getScoreboardsEnabled()) {
|
||||||
//This only fires if they are traveling to a non-blacklisted world from a blacklisted world
|
//This only fires if they are travelling to a non-blacklisted world from a blacklisted world
|
||||||
|
|
||||||
//Setup scoreboards
|
//Setup scoreboards
|
||||||
ScoreboardManager.setupPlayer(event.getPlayer());
|
ScoreboardManager.setupPlayer(event.getPlayer());
|
||||||
|
Loading…
Reference in New Issue
Block a user