Skip to content

Commit e957149

Browse files
committed
tp command added required block.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent beb1e49 commit e957149

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/mairwunnx/projectessentials/core/impl/vanilla/commands/TeleportCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void register(@NotNull CommandDispatcher<CommandSource> dispatcher) {
6161
})).then(Commands.argument("destination", EntityArgument.entity()).executes((p_200562_0_) -> {
6262
return teleportToEntity(p_200562_0_.getSource(), Collections.singleton(p_200562_0_.getSource().assertIsEntity()), EntityArgument.getEntity(p_200562_0_, "destination"));
6363
})));
64-
dispatcher.register(Commands.literal("tp").redirect(literalcommandnode));
64+
dispatcher.register(Commands.literal("tp").requires((it) -> isAllowed(it, "teleport", 2)).redirect(literalcommandnode));
6565
}
6666

6767
private static int teleportToEntity(CommandSource source, Collection<? extends Entity> targets, Entity destination) {

0 commit comments

Comments
 (0)