mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2025-01-06 19:28:20 +01:00
Fix flag definition GUI not checking definition permission group.
This commit is contained in:
parent
d2f5fb3ffd
commit
b5b61b8b7a
@ -133,7 +133,7 @@ public FlagDefinition deserialize(TypeToken<?> type, ConfigurationNode node) thr
|
|||||||
}
|
}
|
||||||
|
|
||||||
Set<Context> contexts = new HashSet<>();
|
Set<Context> contexts = new HashSet<>();
|
||||||
GDPermissionHolder subject = GriefDefenderPlugin.DEFAULT_HOLDER;
|
GDPermissionHolder subject = GriefDefenderPlugin.GD_DEFINITION_HOLDER;
|
||||||
if (contextList != null) {
|
if (contextList != null) {
|
||||||
for (String context : contextList) {
|
for (String context : contextList) {
|
||||||
final String parts[] = context.split("=");
|
final String parts[] = context.split("=");
|
||||||
@ -168,7 +168,7 @@ public FlagDefinition deserialize(TypeToken<?> type, ConfigurationNode node) thr
|
|||||||
if (PermissionUtil.getInstance().hasGroupSubject(value)) {
|
if (PermissionUtil.getInstance().hasGroupSubject(value)) {
|
||||||
subject = PermissionHolderCache.getInstance().getOrCreateGroup(value);
|
subject = PermissionHolderCache.getInstance().getOrCreateGroup(value);
|
||||||
if (subject == null) {
|
if (subject == null) {
|
||||||
subject = GriefDefenderPlugin.DEFAULT_HOLDER;
|
subject = GriefDefenderPlugin.GD_DEFINITION_HOLDER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ public static class FlagDefinitionBuilder implements Builder {
|
|||||||
private boolean isAdmin = false;
|
private boolean isAdmin = false;
|
||||||
private Set<Context> contexts = new HashSet<>();
|
private Set<Context> contexts = new HashSet<>();
|
||||||
private List<FlagData> data = new ArrayList<>();
|
private List<FlagData> data = new ArrayList<>();
|
||||||
private Subject subject = GriefDefenderPlugin.DEFAULT_HOLDER;
|
private Subject subject = GriefDefenderPlugin.GD_DEFINITION_HOLDER;
|
||||||
private String displayName;
|
private String displayName;
|
||||||
private String groupName;
|
private String groupName;
|
||||||
private Tristate defaultValue = Tristate.UNDEFINED;
|
private Tristate defaultValue = Tristate.UNDEFINED;
|
||||||
@ -231,7 +231,7 @@ public Builder reset() {
|
|||||||
this.groupName = "";
|
this.groupName = "";
|
||||||
this.defaultValue = Tristate.UNDEFINED;
|
this.defaultValue = Tristate.UNDEFINED;
|
||||||
this.description = TextComponent.empty();
|
this.description = TextComponent.empty();
|
||||||
this.subject = GriefDefenderPlugin.DEFAULT_HOLDER;
|
this.subject = GriefDefenderPlugin.GD_DEFINITION_HOLDER;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ public FlagDefinition deserialize(TypeToken<?> type, ConfigurationNode node) thr
|
|||||||
}
|
}
|
||||||
|
|
||||||
Set<Context> contexts = new HashSet<>();
|
Set<Context> contexts = new HashSet<>();
|
||||||
GDPermissionHolder subject = GriefDefenderPlugin.DEFAULT_HOLDER;
|
GDPermissionHolder subject = GriefDefenderPlugin.GD_DEFINITION_HOLDER;
|
||||||
if (contextList != null) {
|
if (contextList != null) {
|
||||||
for (String context : contextList) {
|
for (String context : contextList) {
|
||||||
final String parts[] = context.split("=");
|
final String parts[] = context.split("=");
|
||||||
@ -168,7 +168,7 @@ public FlagDefinition deserialize(TypeToken<?> type, ConfigurationNode node) thr
|
|||||||
if (PermissionUtil.getInstance().hasGroupSubject(value)) {
|
if (PermissionUtil.getInstance().hasGroupSubject(value)) {
|
||||||
subject = PermissionHolderCache.getInstance().getOrCreateGroup(value);
|
subject = PermissionHolderCache.getInstance().getOrCreateGroup(value);
|
||||||
if (subject == null) {
|
if (subject == null) {
|
||||||
subject = GriefDefenderPlugin.DEFAULT_HOLDER;
|
subject = GriefDefenderPlugin.GD_DEFINITION_HOLDER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ public static class FlagDefinitionBuilder implements Builder {
|
|||||||
private boolean isAdmin = false;
|
private boolean isAdmin = false;
|
||||||
private Set<Context> contexts = new HashSet<>();
|
private Set<Context> contexts = new HashSet<>();
|
||||||
private List<FlagData> data = new ArrayList<>();
|
private List<FlagData> data = new ArrayList<>();
|
||||||
private Subject subject = GriefDefenderPlugin.DEFAULT_HOLDER;
|
private Subject subject = GriefDefenderPlugin.GD_DEFINITION_HOLDER;
|
||||||
private String displayName;
|
private String displayName;
|
||||||
private String groupName;
|
private String groupName;
|
||||||
private Tristate defaultValue = Tristate.UNDEFINED;
|
private Tristate defaultValue = Tristate.UNDEFINED;
|
||||||
@ -231,7 +231,7 @@ public Builder reset() {
|
|||||||
this.groupName = "";
|
this.groupName = "";
|
||||||
this.defaultValue = Tristate.UNDEFINED;
|
this.defaultValue = Tristate.UNDEFINED;
|
||||||
this.description = TextComponent.empty();
|
this.description = TextComponent.empty();
|
||||||
this.subject = GriefDefenderPlugin.DEFAULT_HOLDER;
|
this.subject = GriefDefenderPlugin.GD_DEFINITION_HOLDER;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user