mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Players moving to a blacklisted world will have scoreboards removed
This commit is contained in:
parent
1221069854
commit
665a31fc85
@ -1,3 +1,6 @@
|
||||
Version 2.1.102
|
||||
Scoreboards will now be removed from players who teleport to a blacklisted world
|
||||
|
||||
Version 2.1.101
|
||||
Fixed an exploit where chorus plants could be used to gain automatic XP
|
||||
Added blast furnace, cartography table, grindstone, lectern, loom, scaffolding, smoker, stonecutter, and sweet berry bush to the list of internal blocks that don't trigger tool readying
|
||||
|
@ -27,6 +27,7 @@ import com.gmail.nossr50.skills.salvage.SalvageManager;
|
||||
import com.gmail.nossr50.skills.taming.TamingManager;
|
||||
import com.gmail.nossr50.util.*;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||
import com.gmail.nossr50.util.skills.RankUtils;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
import com.gmail.nossr50.util.sounds.SoundManager;
|
||||
@ -69,8 +70,16 @@ public class PlayerListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerTeleport(PlayerTeleportEvent event) {
|
||||
/* WORLD BLACKLIST CHECK */
|
||||
if(WorldBlacklist.isWorldBlacklisted(event.getPlayer().getWorld()))
|
||||
if(WorldBlacklist.isWorldBlacklisted(event.getPlayer().getWorld())) {
|
||||
//Remove scoreboards
|
||||
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
|
||||
|
||||
//Setup scoreboards
|
||||
ScoreboardManager.setupPlayer(event.getPlayer());
|
||||
}
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user