aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/world/anhgelus/molehunt/Molehunt.java2
-rw-r--r--src/main/java/world/anhgelus/molehunt/config/Config.java12
-rw-r--r--src/main/java/world/anhgelus/molehunt/mixin/NoPortals.java2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/world/anhgelus/molehunt/Molehunt.java b/src/main/java/world/anhgelus/molehunt/Molehunt.java
index 9b1197a..b867337 100644
--- a/src/main/java/world/anhgelus/molehunt/Molehunt.java
+++ b/src/main/java/world/anhgelus/molehunt/Molehunt.java
@@ -201,7 +201,7 @@ public class Molehunt implements ModInitializer {
ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> {
ServerPlayNetworking.send(
handler.player,
- new ConfigPayload(CONFIG.areNametagsEnabled(), CONFIG.areSkinsEnabled(), CONFIG.isTabEnabled())
+ new ConfigPayload(CONFIG.nametagsEnabled(), CONFIG.skinsEnabled(), CONFIG.tabEnabled())
);
ServerPlayNetworking.send(
handler.player,
diff --git a/src/main/java/world/anhgelus/molehunt/config/Config.java b/src/main/java/world/anhgelus/molehunt/config/Config.java
index 96f62d8..9db560b 100644
--- a/src/main/java/world/anhgelus/molehunt/config/Config.java
+++ b/src/main/java/world/anhgelus/molehunt/config/Config.java
@@ -11,11 +11,11 @@ public class Config {
public Config(MinecraftServer server) {
this.server = server;
- sendConfigPayload(areNametagsEnabled(), areSkinsEnabled(), isTabEnabled());
+ sendConfigPayload(nametagsEnabled(), skinsEnabled(), tabEnabled());
}
public void sendConfigPayload() {
- final var payload = new ConfigPayload(areNametagsEnabled(), areSkinsEnabled(), isTabEnabled());
+ final var payload = new ConfigPayload(nametagsEnabled(), skinsEnabled(), tabEnabled());
server.getPlayerManager().getPlayerList().forEach(p -> ServerPlayNetworking.send(p, payload));
}
@@ -36,15 +36,15 @@ public class Config {
return server.getGameRules().getInt(Molehunt.MOLE_COUNT);
}
- public boolean areNametagsEnabled() {
+ public boolean nametagsEnabled() {
return server.getGameRules().getBoolean(Molehunt.SHOW_NAMETAGS);
}
- public boolean areSkinsEnabled() {
+ public boolean skinsEnabled() {
return server.getGameRules().getBoolean(Molehunt.SHOW_SKINS);
}
- public boolean isTabEnabled() {
+ public boolean tabEnabled() {
return server.getGameRules().getBoolean(Molehunt.SHOW_TAB);
}
@@ -60,7 +60,7 @@ public class Config {
return server.getGameRules().getInt(Molehunt.MOVING_STARTING_TIME_OFFSET);
}
- public boolean arePortalsEnabled() {
+ public boolean portalsEnabled() {
return server.getGameRules().getBoolean(Molehunt.ENABLE_PORTALS);
}
diff --git a/src/main/java/world/anhgelus/molehunt/mixin/NoPortals.java b/src/main/java/world/anhgelus/molehunt/mixin/NoPortals.java
index 96c63aa..a71e6d1 100644
--- a/src/main/java/world/anhgelus/molehunt/mixin/NoPortals.java
+++ b/src/main/java/world/anhgelus/molehunt/mixin/NoPortals.java
@@ -13,7 +13,7 @@ import world.anhgelus.molehunt.Molehunt;
public class NoPortals {
@Inject(at = @At("HEAD"), method = "tick", cancellable = true)
public void disableTick(ServerWorld world, Entity entity, boolean canUsePortals, CallbackInfoReturnable<Boolean> cir) {
- if (Molehunt.CONFIG == null || Molehunt.CONFIG.arePortalsEnabled()) return;
+ if (Molehunt.CONFIG == null || Molehunt.CONFIG.portalsEnabled()) return;
cir.setReturnValue(false);
}
}