diff options
author | dev@ftbsc <dev@fantabos.co> | 2023-01-28 18:04:45 +0100 |
---|---|---|
committer | dev@ftbsc <dev@fantabos.co> | 2023-01-28 18:04:45 +0100 |
commit | 732fa8e4aa247e60cb7b408ecbe8c9ac6ddba312 (patch) | |
tree | ac0a9d6b997c7cb1de4258327b5590d1784edf27 /src/main/java/co/fantabos | |
parent | 9767eaffa349039a28dfbfeea9c8907abf945c79 (diff) |
fix: strip leading /, reduce fullbright duration
Diffstat (limited to 'src/main/java/co/fantabos')
-rw-r--r-- | src/main/java/co/fantabos/bscv/BoSCoVicino.java | 10 | ||||
-rw-r--r-- | src/main/java/co/fantabos/bscv/Fullbright.java | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/co/fantabos/bscv/BoSCoVicino.java b/src/main/java/co/fantabos/bscv/BoSCoVicino.java index f139294..de3cc3a 100644 --- a/src/main/java/co/fantabos/bscv/BoSCoVicino.java +++ b/src/main/java/co/fantabos/bscv/BoSCoVicino.java @@ -7,6 +7,7 @@ import net.minecraft.command.CommandSource; import net.minecraftforge.client.event.ClientChatEvent; import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.RegisterCommandsEvent; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.InterModComms; @@ -98,9 +99,7 @@ public class BoSCoVicino { // @SubscribeEvent // public void onRegisterCommand(RegisterCommandsEvent event) { - // for (Module mod : BoSCoVicino.mods) { - // mod.registerCommands(event.getDispatcher()); - // } + // this.dispatcher. // } @SubscribeEvent @@ -108,10 +107,11 @@ public class BoSCoVicino { if (event.getMessage().startsWith("/")) { CommandSource source = BoSCoVicino.minecraft.player.createCommandSourceStack(); try { - this.dispatcher.execute(event.getMessage(), source); + LOGGER.info(String.format("Running command %s", event.getMessage())); + this.dispatcher.execute(event.getMessage().substring(1), source); event.setCanceled(true); } catch (CommandSyntaxException e) { - LOGGER.error("Syntax error in command : %s", e.toString()); + LOGGER.error(String.format("Syntax error in command : %s", e.toString())); } } } diff --git a/src/main/java/co/fantabos/bscv/Fullbright.java b/src/main/java/co/fantabos/bscv/Fullbright.java index bd5fe27..04a1abc 100644 --- a/src/main/java/co/fantabos/bscv/Fullbright.java +++ b/src/main/java/co/fantabos/bscv/Fullbright.java @@ -24,7 +24,7 @@ public class Fullbright extends Module { if (BoSCoVicino.minecraft == null) return; if (BoSCoVicino.minecraft.player == null) return; if (this.mode.get().equals("potion")) { - BoSCoVicino.minecraft.player.addEffect(new EffectInstance(Effect.byId(16), 5204)); + BoSCoVicino.minecraft.player.addEffect(new EffectInstance(Effect.byId(16), 2)); } } } |