Release of 1.0.35

This commit is contained in:
nossr50 2011-07-16 06:36:07 -07:00
parent 8b981cde75
commit a6ba83683a
5 changed files with 23 additions and 13 deletions

View File

@ -1,6 +1,8 @@
Changelog: Changelog:
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code #Versions without changelogs probably had very small misc fixes, like tweaks to the source code
Version 1.0.35 Version 1.0.35
Added a Toggle for Chimaera Wing in config.yml
Added customization of what item is used for Chimaera Wing in config.yml
Fixed bug with randomly receiving Taming XP Fixed bug with randomly receiving Taming XP
mcmmo.users file moved into /plugins/mcMMO/FlatFileStuff/ mcmmo.users file moved into /plugins/mcMMO/FlatFileStuff/
Leaderboard files now moved into /plugins/mcMMO/FlatFileStuff/Leaderboards Leaderboard files now moved into /plugins/mcMMO/FlatFileStuff/Leaderboards

View File

@ -15,9 +15,11 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
public class Item { public class Item {
public static void itehecks(Player player, Plugin plugin){ public static void itemhecks(Player player, Plugin plugin)
{
ItemStack inhand = player.getItemInHand(); ItemStack inhand = player.getItemInHand();
if(inhand.getTypeId() == 288){ if(LoadProperties.chimaeraWingEnable && inhand.getTypeId() == LoadProperties.chimaeraId)
{
chimaerawing(player, plugin); chimaerawing(player, plugin);
} }
} }
@ -28,7 +30,7 @@ public class Item {
PlayerProfile PP = Users.getProfile(player); PlayerProfile PP = Users.getProfile(player);
ItemStack is = player.getItemInHand(); ItemStack is = player.getItemInHand();
Block block = player.getLocation().getBlock(); Block block = player.getLocation().getBlock();
if(mcPermissions.getInstance().chimaeraWing(player) && is.getTypeId() == 288) if(mcPermissions.getInstance().chimaeraWing(player) && is.getTypeId() == LoadProperties.chimaeraId)
{ {
if(Skills.cooldownOver(player, PP.getRecentlyHurt(), 60) && is.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing) if(Skills.cooldownOver(player, PP.getRecentlyHurt(), 60) && is.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing)
{ {
@ -36,7 +38,7 @@ public class Item {
int y = derp.getY(); int y = derp.getY();
ItemStack[] inventory = player.getInventory().getContents(); ItemStack[] inventory = player.getInventory().getContents();
for(ItemStack x : inventory){ for(ItemStack x : inventory){
if(x != null && x.getTypeId() == 288){ if(x != null && x.getTypeId() == LoadProperties.chimaeraId){
if(x.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing + 1) if(x.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing + 1)
{ {
x.setAmount(x.getAmount() - LoadProperties.feathersConsumedByChimaeraWing); x.setAmount(x.getAmount() - LoadProperties.feathersConsumedByChimaeraWing);
@ -81,7 +83,7 @@ public class Item {
} else if (!Skills.cooldownOver(player, PP.getRecentlyHurt(), 60) && is.getAmount() >= 10) } else if (!Skills.cooldownOver(player, PP.getRecentlyHurt(), 60) && is.getAmount() >= 10)
{ {
player.sendMessage(mcLocale.getString("Item.InjuredWait", new Object[] {Skills.calculateTimeLeft(player, PP.getRecentlyHurt(), 60)})); //$NON-NLS-1$ player.sendMessage(mcLocale.getString("Item.InjuredWait", new Object[] {Skills.calculateTimeLeft(player, PP.getRecentlyHurt(), 60)})); //$NON-NLS-1$
} else if (is.getTypeId() == 288 && is.getAmount() <= 9){ } else if (is.getTypeId() == LoadProperties.chimaeraId && is.getAmount() <= 9){
player.sendMessage(mcLocale.getString("Item.NeedFeathers")); //$NON-NLS-1$ player.sendMessage(mcLocale.getString("Item.NeedFeathers")); //$NON-NLS-1$
} }
} }

View File

@ -12,14 +12,16 @@ import com.gmail.nossr50.config.LoadProperties;
import com.gmail.nossr50.datatypes.PlayerStat; import com.gmail.nossr50.datatypes.PlayerStat;
import com.gmail.nossr50.datatypes.Tree; import com.gmail.nossr50.datatypes.Tree;
public class Leaderboard { public class Leaderboard
static String location = "plugins/mcMMO/mcmmo.users"; //$NON-NLS-1$ {
static String location = "plugins/mcMMO/FlatFileStuff/mcmmo.users"; //$NON-NLS-1$
protected static final Logger log = Logger.getLogger("Minecraft"); //$NON-NLS-1$ protected static final Logger log = Logger.getLogger("Minecraft"); //$NON-NLS-1$
/* /*
* Read from the file * Read from the file
*/ */
public static void makeLeaderboards(){ public static void makeLeaderboards()
{
//Make Trees //Make Trees
Tree Mining = new Tree(); Tree Mining = new Tree();
Tree WoodCutting = new Tree(); Tree WoodCutting = new Tree();
@ -42,7 +44,6 @@ public class Leaderboard {
String line = ""; //$NON-NLS-1$ String line = ""; //$NON-NLS-1$
while((line = in.readLine()) != null) while((line = in.readLine()) != null)
{ {
String[] character = line.split(":"); //$NON-NLS-1$ String[] character = line.split(":"); //$NON-NLS-1$
String p = character[0]; String p = character[0];

View File

@ -6,9 +6,9 @@ import org.bukkit.util.config.Configuration;
public class LoadProperties public class LoadProperties
{ {
public static Boolean xpGainsMobSpawners=false, myspawnEnable = true, mccEnable = true, mcmmoEnable = true, partyEnable = true, inviteEnable = true, acceptEnable = true, whoisEnable = true, statsEnable = true, addxpEnable = true, ptpEnable = true, mmoeditEnable = true, clearmyspawnEnable = true, mcgodEnable = true, mcabilityEnable = true, mctopEnable = true, mcrefreshEnable = true, enableMotd, enableMySpawn, enableRegen, enableCobbleToMossy, useMySQL, cocoabeans, archeryFireRateLimit, mushrooms, toolsLoseDurabilityFromAbilities, pvpxp, miningrequirespickaxe, woodcuttingrequiresaxe, eggs, apples, cake, music, diamond, glowstone, slowsand, sulphur, netherrack, bones, coal, clay, anvilmessages; public static Boolean chimaeraWingEnable=true, xpGainsMobSpawners=false, myspawnEnable = true, mccEnable = true, mcmmoEnable = true, partyEnable = true, inviteEnable = true, acceptEnable = true, whoisEnable = true, statsEnable = true, addxpEnable = true, ptpEnable = true, mmoeditEnable = true, clearmyspawnEnable = true, mcgodEnable = true, mcabilityEnable = true, mctopEnable = true, mcrefreshEnable = true, enableMotd, enableMySpawn, enableRegen, enableCobbleToMossy, useMySQL, cocoabeans, archeryFireRateLimit, mushrooms, toolsLoseDurabilityFromAbilities, pvpxp, miningrequirespickaxe, woodcuttingrequiresaxe, eggs, apples, cake, music, diamond, glowstone, slowsand, sulphur, netherrack, bones, coal, clay, anvilmessages;
public static String MySQLtablePrefix, MySQLuserName, MySQLserverName, MySQLdbName, MySQLdbPass, mctop, addxp, mcability, mcmmo, mcc, mcrefresh, mcgod, stats, mmoedit, ptp, party, myspawn, whois, invite, accept, clearmyspawn, nWood, nStone, nIron, nGold, nDiamond, locale; public static String MySQLtablePrefix, MySQLuserName, MySQLserverName, MySQLdbName, MySQLdbPass, mctop, addxp, mcability, mcmmo, mcc, mcrefresh, mcgod, stats, mmoedit, ptp, party, myspawn, whois, invite, accept, clearmyspawn, nWood, nStone, nIron, nGold, nDiamond, locale;
public static int msandstone, mcocoa = 10, water_thunder = 75, cure_self = 5, cure_other = 5, mbones, msulphur, mslowsand, mmushroom2, mglowstone2, mmusic, mdiamond2, mbase, mapple, meggs, mcake, mpine, mbirch, mspruce, mcactus, mmushroom, mflower, msugar, mpumpkin, mwheat, mgold, mdiamond, miron, mredstone, mlapus, mobsidian, mnetherrack, mglowstone, mcoal, mstone, MySQLport, xpGainMultiplier, superBreakerCooldown = 240, greenTerraCooldown = 240, gigaDrillBreakerCooldown = 240, treeFellerCooldown = 240, berserkCooldown = 240, serratedStrikeCooldown = 240, skullSplitterCooldown = 240, abilityDurabilityLoss, feathersConsumedByChimaeraWing, pvpxprewardmodifier, repairdiamondlevel, globalxpmodifier, tamingxpmodifier, miningxpmodifier, repairxpmodifier, woodcuttingxpmodifier, sorceryxpmodifier = 2, unarmedxpmodifier, herbalismxpmodifier, excavationxpmodifier, archeryxpmodifier, swordsxpmodifier, axesxpmodifier, acrobaticsxpmodifier, rWood, rStone, rIron, rGold, rDiamond; public static int chimaeraId=288, msandstone, mcocoa = 10, water_thunder = 75, cure_self = 5, cure_other = 5, mbones, msulphur, mslowsand, mmushroom2, mglowstone2, mmusic, mdiamond2, mbase, mapple, meggs, mcake, mpine, mbirch, mspruce, mcactus, mmushroom, mflower, msugar, mpumpkin, mwheat, mgold, mdiamond, miron, mredstone, mlapus, mobsidian, mnetherrack, mglowstone, mcoal, mstone, MySQLport, xpGainMultiplier, superBreakerCooldown = 240, greenTerraCooldown = 240, gigaDrillBreakerCooldown = 240, treeFellerCooldown = 240, berserkCooldown = 240, serratedStrikeCooldown = 240, skullSplitterCooldown = 240, abilityDurabilityLoss, feathersConsumedByChimaeraWing, pvpxprewardmodifier, repairdiamondlevel, globalxpmodifier, tamingxpmodifier, miningxpmodifier, repairxpmodifier, woodcuttingxpmodifier, sorceryxpmodifier = 2, unarmedxpmodifier, herbalismxpmodifier, excavationxpmodifier, archeryxpmodifier, swordsxpmodifier, axesxpmodifier, acrobaticsxpmodifier, rWood, rStone, rIron, rGold, rDiamond;
public String directory = "plugins/mcMMO/"; public String directory = "plugins/mcMMO/";
File file = new File(directory + File.separator + "config.yml"); File file = new File(directory + File.separator + "config.yml");
@ -100,7 +100,9 @@ public class LoadProperties
write("General.HP_Regeneration.Enabled", true); write("General.HP_Regeneration.Enabled", true);
write("General.Performance.Print_Reports", false); write("General.Performance.Print_Reports", false);
write("Items.Chimaera_Wing.Enabled", true);
write("Items.Chimaera_Wing.Feather_Cost", 10); write("Items.Chimaera_Wing.Feather_Cost", 10);
write("Items.Chimaera_Wing.Item_ID", 288);
write("XP.PVP.Rewards", true); write("XP.PVP.Rewards", true);
write("XP.Gains.Multiplier.PVP", 1); write("XP.Gains.Multiplier.PVP", 1);
@ -313,6 +315,9 @@ public class LoadProperties
abilityDurabilityLoss = readInteger("Abilities.Tools.Durability_Loss"); abilityDurabilityLoss = readInteger("Abilities.Tools.Durability_Loss");
feathersConsumedByChimaeraWing = readInteger("Items.Chimaera_Wing.Feather_Cost"); feathersConsumedByChimaeraWing = readInteger("Items.Chimaera_Wing.Feather_Cost");
chimaeraId = readInteger("Items.Chimaera_Wing.Item_ID");
chimaeraWingEnable = readBoolean("Items.Chimaera_Wing.Enabled");
pvpxp = readBoolean("XP.PVP.Rewards"); pvpxp = readBoolean("XP.PVP.Rewards");
pvpxprewardmodifier = readInteger("XP.Gains.Multiplier.PVP"); pvpxprewardmodifier = readInteger("XP.Gains.Multiplier.PVP");
miningrequirespickaxe = readBoolean("Skills.Mining.Requires_Pickaxe"); miningrequirespickaxe = readBoolean("Skills.Mining.Requires_Pickaxe");

View File

@ -192,11 +192,11 @@ public class mcPlayerListener extends PlayerListener
* ITEM CHECKS * ITEM CHECKS
*/ */
if(action == Action.RIGHT_CLICK_AIR) if(action == Action.RIGHT_CLICK_AIR)
Item.itehecks(player, plugin); Item.itemhecks(player, plugin);
if(action == Action.RIGHT_CLICK_BLOCK) if(action == Action.RIGHT_CLICK_BLOCK)
{ {
if(m.abilityBlockCheck(event.getClickedBlock())) if(m.abilityBlockCheck(event.getClickedBlock()))
Item.itehecks(player, plugin); Item.itemhecks(player, plugin);
} }
} }