mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Map.remove() can return Null.
This commit is contained in:
parent
2e94eecda0
commit
cc524bb2ab
@ -154,7 +154,7 @@ public class ScoreboardManager {
|
|||||||
public static void teardownPlayer(Player player) {
|
public static void teardownPlayer(Player player) {
|
||||||
ScoreboardWrapper wrapper = PLAYER_SCOREBOARDS.remove(player.getName());
|
ScoreboardWrapper wrapper = PLAYER_SCOREBOARDS.remove(player.getName());
|
||||||
|
|
||||||
if (wrapper.revertTask != null) {
|
if (wrapper != null && wrapper.revertTask != null) {
|
||||||
wrapper.revertTask.cancel();
|
wrapper.revertTask.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user