Skip to content

Commit 3eeb9ff

Browse files
Prefix commands
Currently this is setup to be optional on most commands. I will likely make this configurable so modpacks can fix name collisions.
1 parent 988a19e commit 3eeb9ff

16 files changed

+307
-277
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// 1.21.4 -999999999-01-01T00:00:00 Decree/Language (en_us)
2-
9c64e6a9c0139a062644ee582eb8dd5329b94203 assets/decree/lang/en_us.json
2+
7607c3d8878ae54b11bf5e1e432a4b621e142d49 assets/decree/lang/en_us.json

src/main/generated/assets/decree/lang/en_us.json

+63-63
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
11
{
2-
"commands.clearspawnpoint.failed": "Failed to clear spawnpoint",
3-
"commands.clearspawnpoint.success": "Cleared spawnpoint of %s player(s)",
4-
"commands.cpride.evict_riders.failed": "Failed to evict rider(s)",
5-
"commands.cpride.evict_riders.success": "Evicted rider(s)",
6-
"commands.cpride.start_riding.failed": "Failed to ride the entity",
7-
"commands.cpride.start_riding.success": "Mounted entities",
8-
"commands.cpride.stop_riding.failed": "Failed to dismount the entity",
9-
"commands.cpride.stop_riding.success": "Dismounted entities",
10-
"commands.cpride.summon_ride.failed": "Failed to summon a ride",
11-
"commands.cpride.summon_ride.success": "Summoned and mounted to a %s",
12-
"commands.cpride.summon_rider.failed": "Failed to summon a rider",
13-
"commands.cpride.summon_rider.success": "Summoned and mounted a %s",
14-
"commands.cpstop.cancel.failed": "Failed to cancel server stop",
15-
"commands.cpstop.cancel.success": "Canceled server stop",
16-
"commands.cpstop.immediate": "Stopping server now",
17-
"commands.cpstop.stop": "Stopped server",
18-
"commands.cpstop.time": "Stopping server in %s second(s)...",
19-
"commands.daylock.disabled": "Disabled daylock",
20-
"commands.daylock.enabled": "Enabled daylock",
21-
"commands.gamerulepreset.load.changed": "Changed gamerule %s: %s -> %s",
22-
"commands.gamerulepreset.load.failed": "Failed to load gamerule preset: %s",
23-
"commands.gamerulepreset.load.success": "Loaded gamerule preset: %s",
24-
"commands.gamerulepreset.load.unchanged": "No gamerules were affected by: %s",
25-
"commands.gamerulepreset.save.success": "Saved gamerule preset: %s",
26-
"commands.head.give.failed": "Failed to give head to player",
27-
"commands.head.give.success": "Gave head to player",
28-
"commands.head.query.name.success": "The head belongs to %s",
29-
"commands.head.query.uuid.success": "The head's owner's UUID is %s",
30-
"commands.health.add.failed": "Failed to add health",
31-
"commands.health.add.success": "Added %s health",
32-
"commands.health.query.failed": "Failed to query health",
33-
"commands.health.query.success": "Health is %s",
34-
"commands.health.set.failed": "Failed to set health",
35-
"commands.health.set.success": "Set health to %s",
36-
"commands.hunger.add.exhaustion.failed": "Failed to add exhaustion",
37-
"commands.hunger.add.exhaustion.success": "Added %s exhaustion",
38-
"commands.hunger.add.food.failed": "Failed to add food",
39-
"commands.hunger.add.food.success": "Added %s food",
40-
"commands.hunger.add.saturation.failed": "Failed to add saturation",
41-
"commands.hunger.add.saturation.success": "Added %s saturation",
42-
"commands.hunger.query.exhaustion.failed": "Failed to query exhaustion",
43-
"commands.hunger.query.exhaustion.success": "Player's exhaustion is %s",
44-
"commands.hunger.query.food.failed": "Failed to query food",
45-
"commands.hunger.query.food.success": "Player's food is %s",
46-
"commands.hunger.query.saturation.failed": "Failed to query saturation",
47-
"commands.hunger.query.saturation.success": "Player's saturation is %s",
48-
"commands.hunger.set.exhaustion.failed": "Failed to set exhaustion",
49-
"commands.hunger.set.exhaustion.success": "Set exhaustion to %s",
50-
"commands.hunger.set.food.failed": "Failed to set food",
51-
"commands.hunger.set.food.success": "Set food to %s",
52-
"commands.hunger.set.saturation.failed": "Failed to set saturation",
53-
"commands.hunger.set.saturation.success": "Set saturation to %s",
54-
"commands.name.entity.name.failed": "Failed to name entity",
55-
"commands.name.entity.name.success": "Named entity to \"%s\"",
56-
"commands.name.entity.remove.failed": "Failed to remove entity name",
57-
"commands.name.entity.remove.success": "Removed entity name",
58-
"commands.name.item.name.failed": "Failed to name item",
59-
"commands.name.item.name.success": "Named item to \"%s\"",
60-
"commands.name.item.remove.failed": "Failed to remove item name",
61-
"commands.name.item.remove.success": "Removed item name",
62-
"commands.setowner.failed": "Failed to set pet's owner",
63-
"commands.setowner.success": "Set pet's owner to %s",
64-
"commands.toggledownfall.success": "Toggled downfall",
2+
"commands.decree.clearspawnpoint.failed": "Failed to clear spawnpoint",
3+
"commands.decree.clearspawnpoint.success": "Cleared spawnpoint of %s player(s)",
4+
"commands.decree.cpride.evict_riders.failed": "Failed to evict rider(s)",
5+
"commands.decree.cpride.evict_riders.success": "Evicted rider(s)",
6+
"commands.decree.cpride.start_riding.failed": "Failed to ride the entity",
7+
"commands.decree.cpride.start_riding.success": "Mounted entities",
8+
"commands.decree.cpride.stop_riding.failed": "Failed to dismount the entity",
9+
"commands.decree.cpride.stop_riding.success": "Dismounted entities",
10+
"commands.decree.cpride.summon_ride.failed": "Failed to summon a ride",
11+
"commands.decree.cpride.summon_ride.success": "Summoned and mounted to a %s",
12+
"commands.decree.cpride.summon_rider.failed": "Failed to summon a rider",
13+
"commands.decree.cpride.summon_rider.success": "Summoned and mounted a %s",
14+
"commands.decree.cpstop.cancel.failed": "Failed to cancel server stop",
15+
"commands.decree.cpstop.cancel.success": "Canceled server stop",
16+
"commands.decree.cpstop.immediate": "Stopping server now",
17+
"commands.decree.cpstop.stop": "Stopped server",
18+
"commands.decree.cpstop.time": "Stopping server in %s second(s)...",
19+
"commands.decree.daylock.disabled": "Disabled daylock",
20+
"commands.decree.daylock.enabled": "Enabled daylock",
21+
"commands.decree.gamerulepreset.load.changed": "Changed gamerule %s: %s -> %s",
22+
"commands.decree.gamerulepreset.load.failed": "Failed to load gamerule preset: %s",
23+
"commands.decree.gamerulepreset.load.success": "Loaded gamerule preset: %s",
24+
"commands.decree.gamerulepreset.load.unchanged": "No gamerules were affected by: %s",
25+
"commands.decree.gamerulepreset.save.success": "Saved gamerule preset: %s",
26+
"commands.decree.head.give.failed": "Failed to give head to player",
27+
"commands.decree.head.give.success": "Gave head to player",
28+
"commands.decree.head.query.name.success": "The head belongs to %s",
29+
"commands.decree.head.query.uuid.success": "The head's owner's UUID is %s",
30+
"commands.decree.health.add.failed": "Failed to add health",
31+
"commands.decree.health.add.success": "Added %s health",
32+
"commands.decree.health.query.failed": "Failed to query health",
33+
"commands.decree.health.query.success": "Health is %s",
34+
"commands.decree.health.set.failed": "Failed to set health",
35+
"commands.decree.health.set.success": "Set health to %s",
36+
"commands.decree.hunger.add.exhaustion.failed": "Failed to add exhaustion",
37+
"commands.decree.hunger.add.exhaustion.success": "Added %s exhaustion",
38+
"commands.decree.hunger.add.food.failed": "Failed to add food",
39+
"commands.decree.hunger.add.food.success": "Added %s food",
40+
"commands.decree.hunger.add.saturation.failed": "Failed to add saturation",
41+
"commands.decree.hunger.add.saturation.success": "Added %s saturation",
42+
"commands.decree.hunger.query.exhaustion.failed": "Failed to query exhaustion",
43+
"commands.decree.hunger.query.exhaustion.success": "Player's exhaustion is %s",
44+
"commands.decree.hunger.query.food.failed": "Failed to query food",
45+
"commands.decree.hunger.query.food.success": "Player's food is %s",
46+
"commands.decree.hunger.query.saturation.failed": "Failed to query saturation",
47+
"commands.decree.hunger.query.saturation.success": "Player's saturation is %s",
48+
"commands.decree.hunger.set.exhaustion.failed": "Failed to set exhaustion",
49+
"commands.decree.hunger.set.exhaustion.success": "Set exhaustion to %s",
50+
"commands.decree.hunger.set.food.failed": "Failed to set food",
51+
"commands.decree.hunger.set.food.success": "Set food to %s",
52+
"commands.decree.hunger.set.saturation.failed": "Failed to set saturation",
53+
"commands.decree.hunger.set.saturation.success": "Set saturation to %s",
54+
"commands.decree.name.entity.name.failed": "Failed to name entity",
55+
"commands.decree.name.entity.name.success": "Named entity to \"%s\"",
56+
"commands.decree.name.entity.remove.failed": "Failed to remove entity name",
57+
"commands.decree.name.entity.remove.success": "Removed entity name",
58+
"commands.decree.name.item.name.failed": "Failed to name item",
59+
"commands.decree.name.item.name.success": "Named item to \"%s\"",
60+
"commands.decree.name.item.remove.failed": "Failed to remove item name",
61+
"commands.decree.name.item.remove.success": "Removed item name",
62+
"commands.decree.setowner.failed": "Failed to set pet's owner",
63+
"commands.decree.setowner.success": "Set pet's owner to %s",
64+
"commands.decree.toggledownfall.success": "Toggled downfall",
6565
"gamerule.doEndermanPickup": "Do Enderman Pickup",
6666
"gamerule.doEndermanPickup.description": "Allow Endermen to pickup blocks.",
6767
"gamerule.doEndermanPlace": "Do Enderman Place",

src/main/java/com/thepinkhacker/decree/Decree.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import com.mojang.brigadier.CommandDispatcher;
44
import com.thepinkhacker.decree.command.argument.ArgumentTypeManager;
55
import com.thepinkhacker.decree.server.command.*;
6-
import com.thepinkhacker.decree.server.dedicated.command.CPStopCommand;
6+
import com.thepinkhacker.decree.server.dedicated.command.StopCommand;
77
import com.thepinkhacker.decree.server.dedicated.command.CommandRegistrationCallbackDedicated;
8-
import com.thepinkhacker.decree.util.command.AliasUtils;
8+
import com.thepinkhacker.decree.util.command.DecreeUtils;
99
import com.thepinkhacker.decree.world.DecreeGameRules;
1010
import net.fabricmc.api.ModInitializer;
1111
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
@@ -39,12 +39,12 @@ public void onInitialize() {
3939
new RideCommand(),
4040
new SetOwnerCommand(),
4141
new ToggleDownfallCommand(),
42-
new CPStopCommand()
42+
new StopCommand()
4343
);
4444

4545
// Aliases
46-
AliasUtils.createAlias(dispatcher, "gamemode", "gm", 2);
47-
AliasUtils.createAlias(dispatcher, "help", "?");
46+
DecreeUtils.createAlias(dispatcher, "gamemode", "gm", 2);
47+
DecreeUtils.createAlias(dispatcher, "help", "?");
4848

4949
LOGGER.info("Registered commands+.");
5050
});

0 commit comments

Comments
 (0)