mirror of
https://github.com/TheWhiteDog9487/RandomTeleporter.git
synced 2026-02-23 13:06:12 +08:00
?为啥你是反过来的
This commit is contained in:
14
README.md
14
README.md
@@ -4,14 +4,14 @@
|
|||||||
# 命令格式
|
# 命令格式
|
||||||
- /rtp
|
- /rtp
|
||||||
- /rtp <Radius(半径)>
|
- /rtp <Radius(半径)>
|
||||||
- /rtp <被传送玩家名(PlayerID)>
|
- /rtp <PlayerID(被传送玩家名)>
|
||||||
- /rtp <Radius(半径)> <被传送玩家名(PlayerID)>
|
- /rtp <Radius(半径)> <PlayerID(被传送玩家名)>
|
||||||
- /rtp <被传送玩家名(PlayerID)> <Radius(半径)>
|
- /rtp <PlayerID(被传送玩家名)> <Radius(半径)>
|
||||||
- /rtp <Radius(半径)> <OriginPos(随机中心,坐标)>
|
- /rtp <Radius(半径)> <OriginPos(随机中心,坐标)>
|
||||||
- /rtp <Radius(半径)> <被传送玩家名(PlayerID)> <OriginEntity(随机中心,实体)>
|
- /rtp <Radius(半径)> <PlayerID(被传送玩家名)> <OriginEntity(随机中心,实体)>
|
||||||
- /rtp <Radius(半径)> <被传送玩家名(PlayerID)> <OriginPos(随机中心,坐标)>
|
- /rtp <Radius(半径)> <PlayerID(被传送玩家名)> <OriginPos(随机中心,坐标)>
|
||||||
- /rtp <被传送玩家名(PlayerID)> <Radius(半径)> <OriginEntity(随机中心,实体)>
|
- /rtp <PlayerID(被传送玩家名)> <Radius(半径)> <OriginEntity(随机中心,实体)>
|
||||||
- /rtp <被传送玩家名(PlayerID)> <Radius(半径)> <OriginPos(随机中心,坐标)>
|
- /rtp <PlayerID(被传送玩家名)> <Radius(半径)> <OriginPos(随机中心,坐标)>
|
||||||
|
|
||||||
## 命令示例
|
## 命令示例
|
||||||
- /rtp
|
- /rtp
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class CommandRegister {
|
|||||||
IntegerArgumentType.getInteger(context, CommandArgumentName_Radius),
|
IntegerArgumentType.getInteger(context, CommandArgumentName_Radius),
|
||||||
null,
|
null,
|
||||||
null)))
|
null)))
|
||||||
// /rtp <被传送玩家名(PlayerID)>
|
// /rtp <PlayerID(被传送玩家名)>
|
||||||
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
||||||
.requires(Commands.hasPermission(PermissionLevel))
|
.requires(Commands.hasPermission(PermissionLevel))
|
||||||
.executes(context -> ExecuteCommand(
|
.executes(context -> ExecuteCommand(
|
||||||
@@ -105,7 +105,7 @@ public class CommandRegister {
|
|||||||
null,
|
null,
|
||||||
EntityArgument.getEntity(context,CommandArgumentName_Target),
|
EntityArgument.getEntity(context,CommandArgumentName_Target),
|
||||||
null)))
|
null)))
|
||||||
// /rtp <Radius(半径)> <被传送玩家名(PlayerID)>
|
// /rtp <Radius(半径)> <PlayerID(被传送玩家名)>
|
||||||
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
||||||
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
||||||
.requires(Commands.hasPermission(PermissionLevel))
|
.requires(Commands.hasPermission(PermissionLevel))
|
||||||
@@ -114,7 +114,7 @@ public class CommandRegister {
|
|||||||
IntegerArgumentType.getInteger(context, CommandArgumentName_Radius),
|
IntegerArgumentType.getInteger(context, CommandArgumentName_Radius),
|
||||||
EntityArgument.getEntity(context,CommandArgumentName_Target),
|
EntityArgument.getEntity(context,CommandArgumentName_Target),
|
||||||
null))))
|
null))))
|
||||||
// /rtp <被传送玩家名(PlayerID)> <Radius(半径)>
|
// /rtp <PlayerID(被传送玩家名)> <Radius(半径)>
|
||||||
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
||||||
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
||||||
.requires(Commands.hasPermission(PermissionLevel))
|
.requires(Commands.hasPermission(PermissionLevel))
|
||||||
@@ -142,6 +142,7 @@ public class CommandRegister {
|
|||||||
null,
|
null,
|
||||||
Vec2Argument.getVec2(context,CommandArgumentName_OriginPosition)))))
|
Vec2Argument.getVec2(context,CommandArgumentName_OriginPosition)))))
|
||||||
// /rtp <Radius(半径)> <被传送玩家名(PlayerID)> <OriginEntity(随机中心,实体)>
|
// /rtp <Radius(半径)> <被传送玩家名(PlayerID)> <OriginEntity(随机中心,实体)>
|
||||||
|
// /rtp <Radius(半径)> <PlayerID(被传送玩家名)> <OriginEntity(随机中心,实体)>
|
||||||
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
||||||
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
||||||
.then(argument(CommandArgumentName_OriginEntity, EntityArgument.entity())
|
.then(argument(CommandArgumentName_OriginEntity, EntityArgument.entity())
|
||||||
@@ -153,6 +154,7 @@ public class CommandRegister {
|
|||||||
new Vec2( (float) EntityArgument.getEntity( context,CommandArgumentName_OriginEntity).position().x,
|
new Vec2( (float) EntityArgument.getEntity( context,CommandArgumentName_OriginEntity).position().x,
|
||||||
(float) EntityArgument.getEntity( context,CommandArgumentName_OriginEntity).position().z ))))))
|
(float) EntityArgument.getEntity( context,CommandArgumentName_OriginEntity).position().z ))))))
|
||||||
// /rtp <Radius(半径)> <被传送玩家名(PlayerID)> <OriginPos(随机中心,坐标)>
|
// /rtp <Radius(半径)> <被传送玩家名(PlayerID)> <OriginPos(随机中心,坐标)>
|
||||||
|
// /rtp <Radius(半径)> <PlayerID(被传送玩家名)> <OriginPos(随机中心,坐标)>
|
||||||
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
||||||
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
||||||
.then(argument(CommandArgumentName_OriginPosition, Vec2Argument.vec2())
|
.then(argument(CommandArgumentName_OriginPosition, Vec2Argument.vec2())
|
||||||
@@ -163,6 +165,7 @@ public class CommandRegister {
|
|||||||
EntityArgument.getEntity(context,CommandArgumentName_Target),
|
EntityArgument.getEntity(context,CommandArgumentName_Target),
|
||||||
Vec2Argument.getVec2(context,CommandArgumentName_OriginPosition))))))
|
Vec2Argument.getVec2(context,CommandArgumentName_OriginPosition))))))
|
||||||
// /rtp <被传送玩家名(PlayerID)> <Radius(半径)> <OriginEntity(随机中心,实体)>
|
// /rtp <被传送玩家名(PlayerID)> <Radius(半径)> <OriginEntity(随机中心,实体)>
|
||||||
|
// /rtp <PlayerID(被传送玩家名)> <Radius(半径)> <OriginEntity(随机中心,实体)>
|
||||||
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
||||||
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
||||||
.then(argument(CommandArgumentName_OriginEntity, EntityArgument.entity())
|
.then(argument(CommandArgumentName_OriginEntity, EntityArgument.entity())
|
||||||
@@ -174,6 +177,7 @@ public class CommandRegister {
|
|||||||
new Vec2( (float) EntityArgument.getEntity( context,CommandArgumentName_OriginEntity).position().x,
|
new Vec2( (float) EntityArgument.getEntity( context,CommandArgumentName_OriginEntity).position().x,
|
||||||
(float) EntityArgument.getEntity( context,CommandArgumentName_OriginEntity).position().z ))))))
|
(float) EntityArgument.getEntity( context,CommandArgumentName_OriginEntity).position().z ))))))
|
||||||
// /rtp <被传送玩家名(PlayerID)> <Radius(半径)> <OriginPos(随机中心,坐标)>
|
// /rtp <被传送玩家名(PlayerID)> <Radius(半径)> <OriginPos(随机中心,坐标)>
|
||||||
|
// /rtp <PlayerID(被传送玩家名)> <Radius(半径)> <OriginPos(随机中心,坐标)>
|
||||||
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
.then(argument(CommandArgumentName_Target, EntityArgument.entity())
|
||||||
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
.then(argument(CommandArgumentName_Radius, IntegerArgumentType.integer(0))
|
||||||
.then(argument(CommandArgumentName_OriginPosition, Vec2Argument.vec2())
|
.then(argument(CommandArgumentName_OriginPosition, Vec2Argument.vec2())
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import static xyz.thewhitedog9487.RandomTeleporter.MOD_ID;
|
|||||||
*/
|
*/
|
||||||
public class ResourceReloaderListener {
|
public class ResourceReloaderListener {
|
||||||
public static String CommandArgumentName_Radius = "Radius(半径)";
|
public static String CommandArgumentName_Radius = "Radius(半径)";
|
||||||
public static String CommandArgumentName_Target = "被传送玩家名(PlayerID)";
|
public static String CommandArgumentName_Target = "PlayerID(被传送玩家名)";
|
||||||
public static String CommandArgumentName_OriginPosition = "OriginPos(随机中心,坐标)";
|
public static String CommandArgumentName_OriginPosition = "OriginPos(随机中心,坐标)";
|
||||||
public static String CommandArgumentName_OriginEntity = "OriginEntity(随机中心,实体)";
|
public static String CommandArgumentName_OriginEntity = "OriginEntity(随机中心,实体)";
|
||||||
|
|
||||||
@@ -29,6 +29,6 @@ public class ResourceReloaderListener {
|
|||||||
@Override
|
@Override
|
||||||
protected void apply(Void prepared, SharedState store) {
|
protected void apply(Void prepared, SharedState store) {
|
||||||
CommandArgumentName_Radius = Component.translatableWithFallback("command.argument.radius", "Radius(半径)").getString();
|
CommandArgumentName_Radius = Component.translatableWithFallback("command.argument.radius", "Radius(半径)").getString();
|
||||||
CommandArgumentName_Target = Component.translatableWithFallback("command.argument.target", "被传送玩家名(PlayerID)").getString();
|
CommandArgumentName_Target = Component.translatableWithFallback("command.argument.target", "PlayerID(被传送玩家名)").getString();
|
||||||
CommandArgumentName_OriginPosition = Component.translatableWithFallback("command.argument.origin_pos", "OriginPos(随机中心,坐标)").getString();
|
CommandArgumentName_OriginPosition = Component.translatableWithFallback("command.argument.origin_pos", "OriginPos(随机中心,坐标)").getString();
|
||||||
CommandArgumentName_OriginEntity = Component.translatableWithFallback("command.argument.origin_entity", "OriginEntity(随机中心,实体)").getString(); } } ); } }
|
CommandArgumentName_OriginEntity = Component.translatableWithFallback("command.argument.origin_entity", "OriginEntity(随机中心,实体)").getString(); } } ); } }
|
||||||
Reference in New Issue
Block a user