We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
@Command(name = "signedit setline") @Permission("signedit.setline") public class SignEditCommand implements MiniMessageHolder { private final NoticeService noticeService; private final SignConfig signConfig; public SignEditCommand(NoticeService noticeService, SignConfig signConfig) { this.noticeService = noticeService; this.signConfig = signConfig; } @Execute void execute(@Context Player player, @Arg Integer index, @Join String text) { Block targetBlock = player.getTargetBlockExact(5); if (targetBlock == null || !(targetBlock.getState() instanceof Sign sign)) { this.noticeService.create() .player(player.getUniqueId()) .notice(this.signConfig.noSignFound) .send(); return; } SignSide frontSide = sign.getSide(Side.FRONT); if (index < 0 || index >= frontSide.lines().size()) { this.noticeService.create() .player(player.getUniqueId()) .notice(this.signConfig.invalidIndex) .send(); return; } frontSide.line(index, MINI_MESSAGE.deserialize(text)); sign.update(); this.noticeService.create() .player(player.getUniqueId()) .notice(this.signConfig.lineSet) .send(); } }
Sorry, something went wrong.
igoyek
Successfully merging a pull request may close this issue.
No description provided.
The text was updated successfully, but these errors were encountered: