Lets add some CONFIG to that cooldown

This commit is contained in:
NuclearW 2012-03-09 19:54:56 -05:00
parent 0c8b944b12
commit f5a559efa6
4 changed files with 9 additions and 4 deletions

View File

@ -24,7 +24,7 @@ Version 2.0.00-dev
= Fixed bug where Green Terra didn't work on Stone Brick = Fixed bug where Green Terra didn't work on Stone Brick
= Fixed bug where Tree Feller could be used without permissions = Fixed bug where Tree Feller could be used without permissions
= Fixed exploit where falling sand & gravel weren't tracked = 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 Chimera Wing failure check to use the maxWorldHeight.
! Changed inspect failed message to say inspect rather than whois ! Changed inspect failed message to say inspect rather than whois
! Changed Call of the Wild to activate on left-click rather than right-click ! Changed Call of the Wild to activate on left-click rather than right-click

View File

@ -9,6 +9,7 @@ import org.bukkit.entity.Player;
import com.gmail.nossr50.Users; import com.gmail.nossr50.Users;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.mcPermissions; import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.config.LoadProperties;
import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.locale.mcLocale; import com.gmail.nossr50.locale.mcLocale;
import com.gmail.nossr50.party.Party; import com.gmail.nossr50.party.Party;
@ -42,9 +43,9 @@ public class PtpCommand implements CommandExecutor {
return true; 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; return true;
} }

View File

@ -47,7 +47,8 @@ public class LoadProperties {
anvilID, saveInterval, fishingTier1, fishingTier2, fishingTier3, fishingTier4, fishingTier5, anvilID, saveInterval, fishingTier1, fishingTier2, fishingTier3, fishingTier4, fishingTier5,
repairStoneLevel, repairIronLevel, repairGoldLevel, arcaneRank1, arcaneRank2, arcaneRank3, arcaneRank4, repairStoneLevel, repairIronLevel, repairGoldLevel, arcaneRank1, arcaneRank2, arcaneRank3, arcaneRank4,
detonatorID, fishConsumedByCOTW, dAxe, dHoe, dShovel, dSword, dPickaxe, gAxe, gHoe, gShovel, gSword, gPickaxe, 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, public static double xpbackground_r, xpbackground_g, xpbackground_b,
xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g, xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g,
@ -399,6 +400,8 @@ public class LoadProperties {
aDisplayNames = readBoolean("Commands.a.Display_Names", true); aDisplayNames = readBoolean("Commands.a.Display_Names", true);
pDisplayNames = readBoolean("Commands.p.Display_Names", true); pDisplayNames = readBoolean("Commands.p.Display_Names", true);
ptpCommandCooldown = readInteger("Commands.ptp.Cooldown", 30);
animalXP = readDouble("Experience.Combat.Multiplier.Animals", 1.0); animalXP = readDouble("Experience.Combat.Multiplier.Animals", 1.0);
creeperXP = readDouble("Experience.Combat.Multiplier.Creeper", 4.0); creeperXP = readDouble("Experience.Combat.Multiplier.Creeper", 4.0);
skeletonXP = readDouble("Experience.Combat.Multiplier.Skeleton", 2.0); skeletonXP = readDouble("Experience.Combat.Multiplier.Skeleton", 2.0);

View File

@ -316,6 +316,7 @@ Commands:
Enabled: true Enabled: true
ptp: ptp:
Enabled: true Enabled: true
Cooldown: 30
p: p:
Enabled: true Enabled: true
Display_Names: true Display_Names: true