mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2025-01-02 18:48:03 +01:00
Fix pvp user flag definition.
* Show active result for user flag gui. * Improve layout for active result.
This commit is contained in:
parent
9116bf5722
commit
7c9df62c44
@ -747,15 +747,16 @@ private Component getCustomClickableText(GDPermissionUser src, GDClaim claim, GD
|
||||
.append("=", TextColor.WHITE)
|
||||
.append(value.replace("minecraft:", ""), TextColor.GRAY);
|
||||
}
|
||||
if (customFlag.isAdmin()) {
|
||||
// show active value
|
||||
final GDActiveFlagData activeData = this.getActiveDefinitionResult(claim, customFlag, flagData);
|
||||
hoverBuilder.append("\n\nActive Result", TextColor.AQUA)
|
||||
.append("\nvalue=", TextColor.WHITE)
|
||||
.append(activeData.getValue().name().toLowerCase(), TextColor.GOLD)
|
||||
.append("\ntype=", TextColor.WHITE)
|
||||
.append(activeData.getType().name(), activeData.getColor());
|
||||
}
|
||||
|
||||
// show active value
|
||||
final GDActiveFlagData activeData = this.getActiveDefinitionResult(claim, customFlag, flagData);
|
||||
hoverBuilder.append("\nActive Result: ")
|
||||
.append("\nvalue", TextColor.DARK_AQUA)
|
||||
.append("=", TextColor.WHITE)
|
||||
.append(activeData.getValue().name().toLowerCase(), TextColor.GOLD)
|
||||
.append("\ntype", TextColor.DARK_AQUA)
|
||||
.append("=", TextColor.WHITE)
|
||||
.append(activeData.getType().name() + "\n", activeData.getColor());
|
||||
}
|
||||
|
||||
hasHover = true;
|
||||
|
@ -826,6 +826,9 @@ public void registerDefaults() {
|
||||
.build())
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_PLAYER);
|
||||
flagContexts.add(FlagContexts.TARGET_PLAYER);
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
|
@ -747,15 +747,16 @@ private Component getCustomClickableText(GDPermissionUser src, GDClaim claim, GD
|
||||
.append("=", TextColor.WHITE)
|
||||
.append(value.replace("minecraft:", ""), TextColor.GRAY);
|
||||
}
|
||||
if (customFlag.isAdmin()) {
|
||||
// show active value
|
||||
final GDActiveFlagData activeData = this.getActiveDefinitionResult(claim, customFlag, flagData);
|
||||
hoverBuilder.append("\n\nActive Result", TextColor.AQUA)
|
||||
.append("\nvalue=", TextColor.WHITE)
|
||||
.append(activeData.getValue().name().toLowerCase(), TextColor.GOLD)
|
||||
.append("\ntype=", TextColor.WHITE)
|
||||
.append(activeData.getType().name(), activeData.getColor());
|
||||
}
|
||||
|
||||
// show active value
|
||||
final GDActiveFlagData activeData = this.getActiveDefinitionResult(claim, customFlag, flagData);
|
||||
hoverBuilder.append("\nActive Result: ")
|
||||
.append("\nvalue", TextColor.DARK_AQUA)
|
||||
.append("=", TextColor.WHITE)
|
||||
.append(activeData.getValue().name().toLowerCase(), TextColor.GOLD)
|
||||
.append("\ntype", TextColor.DARK_AQUA)
|
||||
.append("=", TextColor.WHITE)
|
||||
.append(activeData.getType().name() + "\n", activeData.getColor());
|
||||
}
|
||||
|
||||
hasHover = true;
|
||||
|
@ -826,6 +826,9 @@ public void registerDefaults() {
|
||||
.build())
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_PLAYER);
|
||||
flagContexts.add(FlagContexts.TARGET_PLAYER);
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
|
Loading…
Reference in New Issue
Block a user