mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-13 00:47:46 +00:00
Return the loaded objects from storage methods as opposed to success flags
This commit is contained in:
36 files changed
+414
-366
No files matched your search
@@ -44,17 +44,18 @@ public enum ChatMetaType {
|
||||
*/
|
||||
PREFIX {
|
||||
@Override
|
||||
public boolean matches(Node node) {
|
||||
public boolean matches(@Nonnull Node node) {
|
||||
return Preconditions.checkNotNull(node, "node").isPrefix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldIgnore(Node node) {
|
||||
public boolean shouldIgnore(@Nonnull Node node) {
|
||||
return !Preconditions.checkNotNull(node, "node").isPrefix();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Map.Entry<Integer, String> getEntry(Node node) {
|
||||
public Map.Entry<Integer, String> getEntry(@Nonnull Node node) {
|
||||
return Preconditions.checkNotNull(node, "node").getPrefix();
|
||||
}
|
||||
},
|
||||
@@ -64,17 +65,18 @@ public enum ChatMetaType {
|
||||
*/
|
||||
SUFFIX {
|
||||
@Override
|
||||
public boolean matches(Node node) {
|
||||
public boolean matches(@Nonnull Node node) {
|
||||
return Preconditions.checkNotNull(node, "node").isSuffix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldIgnore(Node node) {
|
||||
public boolean shouldIgnore(@Nonnull Node node) {
|
||||
return !Preconditions.checkNotNull(node, "node").isSuffix();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public Map.Entry<Integer, String> getEntry(Node node) {
|
||||
public Map.Entry<Integer, String> getEntry(@Nonnull Node node) {
|
||||
return Preconditions.checkNotNull(node, "node").getSuffix();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user