diff --git a/Changelog.txt b/Changelog.txt index c42df8351..7e69a3ae9 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -24,7 +24,7 @@ Version 2.0.00-dev = Fixed bug where Green Terra didn't work on Stone Brick = Fixed bug where Tree Feller could be used without permissions = Fixed exploit where falling sand & gravel weren't tracked - ! Changed PTP to prevent teleporting if you've been hurt in the last 30 seconds + ! Changed PTP to prevent teleporting if you've been hurt in the last 30 seconds (configurable) ! Changed Chimera Wing failure check to use the maxWorldHeight. ! Changed inspect failed message to say inspect rather than whois ! Changed Call of the Wild to activate on left-click rather than right-click diff --git a/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java b/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java index 08c069625..8c9e4c7ca 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/party/PtpCommand.java @@ -9,6 +9,7 @@ import org.bukkit.entity.Player; import com.gmail.nossr50.Users; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcPermissions; +import com.gmail.nossr50.config.LoadProperties; import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.locale.mcLocale; import com.gmail.nossr50.party.Party; @@ -42,9 +43,9 @@ public class PtpCommand implements CommandExecutor { return true; } - if(PP.getRecentlyHurt()+(30*1000) > System.currentTimeMillis()) + if(PP.getRecentlyHurt()+(LoadProperties.ptpCommandCooldown*1000) > System.currentTimeMillis()) { - player.sendMessage(ChatColor.RED+"You've been hurt in the last 30 seconds and cannnot teleport."); + player.sendMessage(ChatColor.RED+"You've been hurt in the last " + LoadProperties.ptpCommandCooldown + " seconds and cannnot teleport."); return true; } diff --git a/src/main/java/com/gmail/nossr50/config/LoadProperties.java b/src/main/java/com/gmail/nossr50/config/LoadProperties.java index 4c5f7b774..cdf56d94f 100644 --- a/src/main/java/com/gmail/nossr50/config/LoadProperties.java +++ b/src/main/java/com/gmail/nossr50/config/LoadProperties.java @@ -47,7 +47,8 @@ public class LoadProperties { anvilID, saveInterval, fishingTier1, fishingTier2, fishingTier3, fishingTier4, fishingTier5, repairStoneLevel, repairIronLevel, repairGoldLevel, arcaneRank1, arcaneRank2, arcaneRank3, arcaneRank4, detonatorID, fishConsumedByCOTW, dAxe, dHoe, dShovel, dSword, dPickaxe, gAxe, gHoe, gShovel, gSword, gPickaxe, - iAxe, iHoe, iShovel, iSword, iPickaxe, wAxe, wHoe, wShovel, wSword, wPickaxe; + iAxe, iHoe, iShovel, iSword, iPickaxe, wAxe, wHoe, wShovel, wSword, wPickaxe, + ptpCommandCooldown; public static double xpbackground_r, xpbackground_g, xpbackground_b, xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g, @@ -399,6 +400,8 @@ public class LoadProperties { aDisplayNames = readBoolean("Commands.a.Display_Names", true); pDisplayNames = readBoolean("Commands.p.Display_Names", true); + ptpCommandCooldown = readInteger("Commands.ptp.Cooldown", 30); + animalXP = readDouble("Experience.Combat.Multiplier.Animals", 1.0); creeperXP = readDouble("Experience.Combat.Multiplier.Creeper", 4.0); skeletonXP = readDouble("Experience.Combat.Multiplier.Skeleton", 2.0); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index b3c3c04e3..30590855a 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -316,6 +316,7 @@ Commands: Enabled: true ptp: Enabled: true + Cooldown: 30 p: Enabled: true Display_Names: true