diff options
| author | anhgelus <anhgelus.morhtuuzh@proton.me> | 2024-09-08 11:36:44 +0000 |
|---|---|---|
| committer | anhgelus <anhgelus.morhtuuzh@proton.me> | 2024-09-08 11:36:44 +0000 |
| commit | a19b4998a33df2f097d19b6ecc7c2c915ad87a8a (patch) | |
| tree | 5e3ab017be1c8c8a9fee4c6ddcd4f78c3850c162 /src/main/java/world/anhgelus | |
| parent | d76eae35d3c16b18c0b65ee040f8395131fa0377 (diff) | |
style(method name): remove 'are' and 'is'
Follow yarn conventions
Diffstat (limited to 'src/main/java/world/anhgelus')
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);
}
}
|
