diff --git a/build.gradle b/build.gradle index cc80d05..9bcef5a 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,7 @@ String buildType = (isFat ? "FAT" : "THIN") String spongeForgeVersion = '1.12.2-2838-7.1.7-RC3886' String forgeVersion = '1.12.2-14.23.5.2838' -version = "1.12.2-GAMMA-1.7.1" +version = "1.12.2-GAMMA-1.7.2" group = "com.github.terminatornl" archivesBaseName = "Tiquality-"+ (isObfuscated ? "" : "DEOBF-") + buildType println("Compiling: " + archivesBaseName + "-" + version) diff --git a/src/main/java/com/github/terminatornl/tiquality/TiqualityConfig.java b/src/main/java/com/github/terminatornl/tiquality/TiqualityConfig.java index 4ab6dc7..52d12ca 100644 --- a/src/main/java/com/github/terminatornl/tiquality/TiqualityConfig.java +++ b/src/main/java/com/github/terminatornl/tiquality/TiqualityConfig.java @@ -55,6 +55,11 @@ public class TiqualityConfig { @Config.RangeDouble(min = 0, max = 1) public static double OFFLINE_PLAYER_TICK_TIME_MULTIPLIER = 0.5; + @Config.Comment({ + "The alias for the /tiquality command.", + "Bear in mind that when this alias is already in use by another mod, we skip command registration entirely. (Even /tiquality)" + }) + public static String TIQUALITY_COMMAND_ALIAS = "tq"; @Config.Comment({ "A block will tick if at least one of the following statements is true:", diff --git a/src/main/java/com/github/terminatornl/tiquality/command/CommandHub.java b/src/main/java/com/github/terminatornl/tiquality/command/CommandHub.java index 37c0562..f494e27 100644 --- a/src/main/java/com/github/terminatornl/tiquality/command/CommandHub.java +++ b/src/main/java/com/github/terminatornl/tiquality/command/CommandHub.java @@ -1,5 +1,6 @@ package com.github.terminatornl.tiquality.command; +import com.github.terminatornl.tiquality.TiqualityConfig; import net.minecraft.command.CommandHandler; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.server.permission.DefaultPermissionLevel; @@ -8,7 +9,7 @@ public class CommandHub { public static final CommandHub INSTANCE = new CommandHub(); - public static final String[] ALIASES = {"tiquality", "tq"}; + public static final String[] ALIASES = {"tiquality", TiqualityConfig.TIQUALITY_COMMAND_ALIAS}; public static final String DESCRIPTION_USE = "Allows use of Tiquality commands."; public static final String DESCRIPTION_CLAIM = "Allows claiming areas using commands."; public static final String DESCRIPTION_ADMIN = "Allows use of Tiquality admin commands."; diff --git a/src/main/java/com/github/terminatornl/tiquality/tracking/PlayerTracker.java b/src/main/java/com/github/terminatornl/tiquality/tracking/PlayerTracker.java index e387d19..35f513d 100644 --- a/src/main/java/com/github/terminatornl/tiquality/tracking/PlayerTracker.java +++ b/src/main/java/com/github/terminatornl/tiquality/tracking/PlayerTracker.java @@ -207,14 +207,14 @@ public void notifyFallingBehind(double ratio) { Entity e = FMLCommonHandler.instance().getMinecraftServerInstance().getEntityFromUuid(getOwner().getId()); if (e instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) e; - player.sendStatusMessage(new TextComponentString(TextFormatting.RED + "Warning: " + TextFormatting.GRAY + "Your blocks tick at " + (Math.round(ratio * 10000D) / 100D) + "% speed." + TextFormatting.DARK_GRAY + " (/tq notify)"), true); + player.sendStatusMessage(new TextComponentString(TextFormatting.RED + "Warning: " + TextFormatting.GRAY + "Your blocks tick at " + (Math.round(ratio * 10000D) / 100D) + "% speed." + TextFormatting.DARK_GRAY + " (/tiquality notify)"), true); double serverTPS_raw = Tiquality.TPS_MONITOR.getAverageTPS(); String serverTPS = TWO_DECIMAL_FORMATTER.format(Math.round(serverTPS_raw * 100D) / 100D); String playerTPS = TWO_DECIMAL_FORMATTER.format(Math.round(serverTPS_raw * ratio * 100D) / 100D); - player.sendMessage(new TextComponentString(PREFIX + "Your TPS: " + TextFormatting.WHITE + playerTPS + TextFormatting.GRAY + " (" + TextFormatting.WHITE + Math.round(ratio * 100D) + "%" + TextFormatting.GRAY + ")" + TextFormatting.DARK_GRAY + " (/tq notify)")); + player.sendMessage(new TextComponentString(PREFIX + "Your TPS: " + TextFormatting.WHITE + playerTPS + TextFormatting.GRAY + " (" + TextFormatting.WHITE + Math.round(ratio * 100D) + "%" + TextFormatting.GRAY + ")" + TextFormatting.DARK_GRAY + " (/tiquality notify)")); } } }