@@ -5,14 +5,17 @@ import com.mairwunnx.projectessentials.core.api.v1.extensions.isPlayerSender
55import com.mairwunnx.projectessentials.core.api.v1.extensions.playerName
66import com.mairwunnx.projectessentials.core.api.v1.permissions.hasPermission
77import com.mairwunnx.projectessentials.warps.warpsConfiguration
8+ import com.mojang.brigadier.arguments.BoolArgumentType
9+ import com.mojang.brigadier.arguments.IntegerArgumentType
810import com.mojang.brigadier.arguments.StringArgumentType
911import com.mojang.brigadier.builder.LiteralArgumentBuilder
12+ import com.mojang.brigadier.builder.LiteralArgumentBuilder.literal
1013import net.minecraft.command.CommandSource
1114import net.minecraft.command.Commands
1215import net.minecraft.command.ISuggestionProvider
1316
1417inline val warpLiteral: LiteralArgumentBuilder <CommandSource >
15- get() = LiteralArgumentBuilder . literal<CommandSource >(" warp" ).then(
18+ get() = literal<CommandSource >(" warp" ).then(
1619 Commands .argument(
1720 " warp" , StringArgumentType .string()
1821 ).suggests { _, builder ->
@@ -23,14 +26,14 @@ inline val warpLiteral: LiteralArgumentBuilder<CommandSource>
2326 )
2427
2528inline val setWarpLiteral: LiteralArgumentBuilder <CommandSource >
26- get() = LiteralArgumentBuilder . literal<CommandSource >(" set-warp" ).then(
29+ get() = literal<CommandSource >(" set-warp" ).then(
2730 Commands .argument(
2831 " warp" , StringArgumentType .string()
2932 ).executes { SetWarpCommand .process(it) }
3033 )
3134
3235inline val delWarpLiteral: LiteralArgumentBuilder <CommandSource >
33- get() = LiteralArgumentBuilder . literal<CommandSource >(" del-warp" ).then(
36+ get() = literal<CommandSource >(" del-warp" ).then(
3437 Commands .argument(
3538 " warp" , StringArgumentType .string()
3639 ).suggests { ctx, builder ->
@@ -49,3 +52,40 @@ inline val delWarpLiteral: LiteralArgumentBuilder<CommandSource>
4952 )
5053 }.executes { DelWarpCommand .process(it) }
5154 )
55+
56+ inline val configureWarpsLiteral: LiteralArgumentBuilder <CommandSource >
57+ get() = literal<CommandSource >(" configure-warps" )
58+ .then(
59+ Commands .literal(" play-sound-on-teleport" ).then(
60+ Commands .literal(" set" ).then(
61+ Commands .argument(" value" , BoolArgumentType .bool()).executes {
62+ ConfigureWarpsCommand .playSoundOnTeleport(it)
63+ }
64+ )
65+ )
66+ ).then(
67+ Commands .literal(" show-effect-on-teleport" ).then(
68+ Commands .literal(" set" ).then(
69+ Commands .argument(" value" , BoolArgumentType .bool()).executes {
70+ ConfigureWarpsCommand .showEffectOnTeleport(it)
71+ }
72+ )
73+ )
74+ ).then(
75+ Commands .literal(" add-resistance-effect" ).then(
76+ Commands .literal(" set" ).then(
77+ Commands .argument(" value" , BoolArgumentType .bool()).executes {
78+ ConfigureWarpsCommand .addResistanceEffect(it)
79+ }
80+ )
81+ )
82+ ).then(
83+ Commands .literal(" resistance-effect-duration" ).then(
84+ Commands .literal(" set" ).then(
85+ Commands .argument(" value" , IntegerArgumentType .integer(1 )).executes {
86+ ConfigureWarpsCommand .resistanceEffectDuration(it)
87+ }
88+ )
89+ )
90+ )
91+
0 commit comments