-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from TheNextLvl-net/commands
Added tiktok social link and made all commands toggleable individuable
- Loading branch information
Showing
7 changed files
with
217 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/net/thenextlvl/tweaks/command/social/TikTokCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package net.thenextlvl.tweaks.command.social; | ||
|
||
import com.mojang.brigadier.Command; | ||
import io.papermc.paper.command.brigadier.Commands; | ||
import lombok.RequiredArgsConstructor; | ||
import net.thenextlvl.tweaks.TweaksPlugin; | ||
import org.jspecify.annotations.NullMarked; | ||
|
||
@NullMarked | ||
@RequiredArgsConstructor | ||
@SuppressWarnings("UnstableApiUsage") | ||
public class TikTokCommand { | ||
private final TweaksPlugin plugin; | ||
|
||
public void register(Commands registrar) { | ||
var command = Commands.literal(plugin.commands().tiktok().command()).executes(context -> { | ||
plugin.bundle().sendMessage(context.getSource().getSender(), "social.tiktok"); | ||
return Command.SINGLE_SUCCESS; | ||
}).build(); | ||
registrar.register(command, "Follow us on TikTok", plugin.commands().tiktok().aliases()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.