fix: allow subclaim title to be set via command
This commit is contained in:
parent
a63139f934
commit
9cb9270c93
|
@ -802,7 +802,11 @@ public class CommandClaim {
|
||||||
((MutableComponent) text).setStyle(style);
|
((MutableComponent) text).setStyle(style);
|
||||||
}
|
}
|
||||||
ServerPlayer player = context.getSource().getPlayerOrException();
|
ServerPlayer player = context.getSource().getPlayerOrException();
|
||||||
Claim claim = PermHelper.checkReturn(player, PermissionRegistry.CLAIMMESSAGE, PermHelper.genericNoPermMessage(player));
|
PlayerClaimData data = PlayerClaimData.get(player);
|
||||||
|
Claim rootClaim = PermHelper.checkReturn(player, PermissionRegistry.CLAIMMESSAGE, PermHelper.genericNoPermMessage(player));
|
||||||
|
if (rootClaim == null)
|
||||||
|
return 0;
|
||||||
|
Claim claim = data.getEditMode() == EnumEditMode.SUBCLAIM ? rootClaim.getSubClaim(player.blockPosition()) : rootClaim;
|
||||||
if (claim == null)
|
if (claim == null)
|
||||||
return 0;
|
return 0;
|
||||||
boolean sub = StringArgumentType.getString(context, "title").equals("subtitle");
|
boolean sub = StringArgumentType.getString(context, "title").equals("subtitle");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user