From 085e7af681db326c80954ed4a7480240be917a95 Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 10 Dec 2018 15:33:57 +0000 Subject: [PATCH] Small cleanup in Contexts class --- api/src/main/java/me/lucko/luckperms/api/Contexts.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/me/lucko/luckperms/api/Contexts.java b/api/src/main/java/me/lucko/luckperms/api/Contexts.java index 02dae35bb..adf38f46d 100644 --- a/api/src/main/java/me/lucko/luckperms/api/Contexts.java +++ b/api/src/main/java/me/lucko/luckperms/api/Contexts.java @@ -219,7 +219,7 @@ public class Contexts { if (this.contextSet.equals(cs)) { return this; } - return new Contexts(Objects.requireNonNull(contextSet, "contextSet").makeImmutable(), this.settingsFlag); + return new Contexts(cs, this.settingsFlag); } /** @@ -237,7 +237,7 @@ public class Contexts { if (this.settingsFlag == settingsFlag) { return this; } - if (this.contextSet.isEmpty() && DEFAULT_SETTINGS_FLAG == settingsFlag) { + if (DEFAULT_SETTINGS_FLAG == settingsFlag && this.contextSet.isEmpty()) { return GLOBAL; }