Skip to content

Commit

Permalink
射出物リセットコマンド
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarri6343 committed Aug 31, 2023
1 parent 99933a5 commit c804fb5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/net/riblab/tradecore/command/CommandNames.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ enum CommandNames {
DUNGEON_LIST("list"),
WIKI("wiki"),
VERSION("tcver"),
SHOP_DUNGEON("dungeon");
SHOP_DUNGEON("dungeon"),
PROJECTILE("projectile"),
PROJECTILE_RESET("reset");

private final String name;

Expand Down
14 changes: 14 additions & 0 deletions src/main/java/net/riblab/tradecore/command/TCCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.riblab.tradecore.dungeon.DungeonDatas;
import net.riblab.tradecore.dungeon.DungeonService;
import net.riblab.tradecore.dungeon.IDungeonData;
import net.riblab.tradecore.entity.projectile.CustomProjectileService;
import net.riblab.tradecore.general.Utils;
import net.riblab.tradecore.integration.TCEconomy;
import net.riblab.tradecore.item.Materials;
Expand Down Expand Up @@ -257,5 +258,18 @@ private static void registerCommands() {
player.sendMessage(Utils.getVersion());
});
versionCommand.register();

CommandAPICommand projectileCommand = new CommandAPICommand(PROJECTILE.get())
.withPermission(CommandPermission.OP)
.executesPlayer((player, args) -> {
});
CommandAPICommand projectileResetCommand = new CommandAPICommand(PROJECTILE_RESET.get())
.withPermission(CommandPermission.OP)
.executesPlayer((player, args) -> {
CustomProjectileService.getImpl().deSpawnAll();
player.sendMessage("射出物をリセットしました");
});
projectileCommand.withSubcommand(projectileResetCommand);
projectileCommand.register();
}
}

0 comments on commit c804fb5

Please sign in to comment.