1
- package com .thepinkhacker .commandsplus ;
1
+ package com .thepinkhacker .decree ;
2
2
3
3
import com .mojang .brigadier .CommandDispatcher ;
4
- import com .thepinkhacker .commandsplus .command .argument .ArgumentTypeManager ;
5
- import com .thepinkhacker .commandsplus .server .command .*;
6
- import com .thepinkhacker .commandsplus .server .dedicated .command .CPStopCommand ;
7
- import com .thepinkhacker .commandsplus .server .dedicated .command .CommandRegistrationCallbackDedicated ;
8
- import com .thepinkhacker .commandsplus .util .command .AliasUtils ;
9
- import com .thepinkhacker .commandsplus .world .GameRuleManager ;
4
+ import com .thepinkhacker .decree .command .argument .ArgumentTypeManager ;
5
+ import com .thepinkhacker .decree .server .command .*;
6
+ import com .thepinkhacker .decree .server .dedicated .command .CPStopCommand ;
7
+ import com .thepinkhacker .decree .server .dedicated .command .CommandRegistrationCallbackDedicated ;
8
+ import com .thepinkhacker .decree .util .command .AliasUtils ;
9
+ import com .thepinkhacker .decree .world .DecreeGameRules ;
10
10
import net .fabricmc .api .ModInitializer ;
11
11
import net .fabricmc .fabric .api .command .v2 .CommandRegistrationCallback ;
12
12
import net .minecraft .command .CommandRegistryAccess ;
15
15
import org .apache .logging .log4j .LogManager ;
16
16
import org .apache .logging .log4j .Logger ;
17
17
18
- public class CommandsPlus implements ModInitializer {
19
- public static final String MOD_ID = "commandsplus " ;
18
+ public class Decree implements ModInitializer {
19
+ public static final String MOD_ID = "decree " ;
20
20
public static final Logger LOGGER = LogManager .getLogger (MOD_ID );
21
21
22
22
@ Override
23
23
public void onInitialize () {
24
24
ArgumentTypeManager .register ();
25
- GameRuleManager .register ();
25
+ DecreeGameRules .register ();
26
26
27
27
CommandRegistrationCallback .EVENT .register ((dispatcher , registryAccess , environment ) -> {
28
28
registerCommands (
29
29
dispatcher ,
30
30
registryAccess ,
31
31
environment ,
32
- new CommandRegistrationCallback [] {
33
- new ClearSpawnPointCommand (),
34
- new DayLockCommand (),
35
- new GameRulePresetCommand (),
36
- new HeadCommand (),
37
- new HealthCommand (),
38
- new HungerCommand (),
39
- new NameCommand (),
40
- new RideCommand (),
41
- new SetOwnerCommand (),
42
- new ToggleDownfallCommand (),
43
- new CPStopCommand (),
44
- }
32
+ new ClearSpawnPointCommand (),
33
+ new DayLockCommand (),
34
+ new GameRulePresetCommand (),
35
+ new HeadCommand (),
36
+ new HealthCommand (),
37
+ new HungerCommand (),
38
+ new NameCommand (),
39
+ new RideCommand (),
40
+ new SetOwnerCommand (),
41
+ new ToggleDownfallCommand (),
42
+ new CPStopCommand ()
45
43
);
46
44
47
45
// Aliases
@@ -56,7 +54,7 @@ private static void registerCommands(
56
54
CommandDispatcher <net .minecraft .server .command .ServerCommandSource > dispatcher ,
57
55
CommandRegistryAccess registryAccess ,
58
56
CommandManager .RegistrationEnvironment environment ,
59
- CommandRegistrationCallback [] commands
57
+ CommandRegistrationCallback ... commands
60
58
) {
61
59
for (CommandRegistrationCallback command : commands ) {
62
60
if (command instanceof CommandRegistrationCallbackDedicated ) {
@@ -67,7 +65,7 @@ private static void registerCommands(
67
65
}
68
66
}
69
67
70
- public static Identifier identifier (String id ) {
68
+ public static Identifier id (String id ) {
71
69
return Identifier .of (MOD_ID , id );
72
70
}
73
71
}
0 commit comments