Skip to content

Commit

Permalink
Small tweaks + CS
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugman76 committed Dec 7, 2024
1 parent c71d368 commit 082f8c7
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 24 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/hugman/uhc/command/ModulesCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ public static void register(CommandDispatcher<ServerCommandSource> dispatcher) {
.requires(ModulesCommand::supportsModules)
.executes(ModulesCommand::displayModules)
.then(CommandManager.literal("enable")
.requires(source -> source.hasPermissionLevel(2))
.then(UHCModuleArgument.argumentFromDisabled("module")
.executes(context -> enableModule(context, UHCModuleArgument.get(context, MODULE_ARG)))))
.then(CommandManager.literal("disable")
.requires(source -> source.hasPermissionLevel(2))
.then(UHCModuleArgument.argumentFromEnabled("module")
.executes(context -> disableModule(context, UHCModuleArgument.get(context, MODULE_ARG)))))
);
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/hugman/uhc/game/ModuleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
import net.minecraft.screen.ScreenHandlerType;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.text.*;
import net.minecraft.text.Style;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/hugman/uhc/modifier/Modifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.hugman.uhc.game.UHCPlayerManager;
import com.hugman.uhc.registry.UHCRegistries;
import com.mojang.serialization.Codec;
import net.minecraft.server.PlayerManager;

public interface Modifier {
Codec<Modifier> TYPE_CODEC = UHCRegistries.MODIFIER_TYPE.getCodec().dispatch(Modifier::getType, ModifierType::codec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.server.PlayerManager;
import net.minecraft.server.network.ServerPlayerEntity;

public record PermanentEffectModifier(
Expand All @@ -34,7 +33,7 @@ public void enable(UHCPlayerManager playerManager) {
}

@Override
public void disable(UHCPlayerManager playerManager) {
public void disable(UHCPlayerManager playerManager) {
playerManager.forEachAliveParticipant(player -> player.removeStatusEffect(this.effect));
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package com.hugman.uhc.modifier;

import com.hugman.uhc.UHC;
import com.hugman.uhc.game.UHCPlayerManager;
import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import net.minecraft.entity.attribute.EntityAttribute;
import net.minecraft.entity.attribute.EntityAttributeInstance;
import net.minecraft.entity.attribute.EntityAttributeModifier;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.server.PlayerManager;
import net.minecraft.server.network.ServerPlayerEntity;

public record PlayerAttributeModifier(
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/hugman/uhc/module/ModuleEvents.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.hugman.uhc.module;

import com.hugman.uhc.game.UHCPlayerManager;
import net.minecraft.registry.entry.RegistryEntry;
import xyz.nucleoid.stimuli.event.StimulusEvent;

Expand Down
17 changes: 0 additions & 17 deletions src/main/resources/data/doublerunner/plasmid/game/test.json

This file was deleted.

0 comments on commit 082f8c7

Please sign in to comment.