mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-25 01:58:28 +01:00
Release of 1.0.35
This commit is contained in:
parent
8b981cde75
commit
a6ba83683a
@ -1,6 +1,8 @@
|
||||
Changelog:
|
||||
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code
|
||||
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
|
||||
mcmmo.users file moved into /plugins/mcMMO/FlatFileStuff/
|
||||
Leaderboard files now moved into /plugins/mcMMO/FlatFileStuff/Leaderboards
|
||||
|
@ -15,9 +15,11 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
|
||||
public class Item {
|
||||
|
||||
public static void itehecks(Player player, Plugin plugin){
|
||||
public static void itemhecks(Player player, Plugin plugin)
|
||||
{
|
||||
ItemStack inhand = player.getItemInHand();
|
||||
if(inhand.getTypeId() == 288){
|
||||
if(LoadProperties.chimaeraWingEnable && inhand.getTypeId() == LoadProperties.chimaeraId)
|
||||
{
|
||||
chimaerawing(player, plugin);
|
||||
}
|
||||
}
|
||||
@ -28,7 +30,7 @@ public class Item {
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
ItemStack is = player.getItemInHand();
|
||||
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)
|
||||
{
|
||||
@ -36,7 +38,7 @@ public class Item {
|
||||
int y = derp.getY();
|
||||
ItemStack[] inventory = player.getInventory().getContents();
|
||||
for(ItemStack x : inventory){
|
||||
if(x != null && x.getTypeId() == 288){
|
||||
if(x != null && x.getTypeId() == LoadProperties.chimaeraId){
|
||||
if(x.getAmount() >= LoadProperties.feathersConsumedByChimaeraWing + 1)
|
||||
{
|
||||
x.setAmount(x.getAmount() - LoadProperties.feathersConsumedByChimaeraWing);
|
||||
@ -81,7 +83,7 @@ public class Item {
|
||||
} 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$
|
||||
} 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$
|
||||
}
|
||||
}
|
||||
|
@ -12,14 +12,16 @@ import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.datatypes.PlayerStat;
|
||||
import com.gmail.nossr50.datatypes.Tree;
|
||||
|
||||
public class Leaderboard {
|
||||
static String location = "plugins/mcMMO/mcmmo.users"; //$NON-NLS-1$
|
||||
public class Leaderboard
|
||||
{
|
||||
static String location = "plugins/mcMMO/FlatFileStuff/mcmmo.users"; //$NON-NLS-1$
|
||||
protected static final Logger log = Logger.getLogger("Minecraft"); //$NON-NLS-1$
|
||||
|
||||
/*
|
||||
* Read from the file
|
||||
*/
|
||||
public static void makeLeaderboards(){
|
||||
public static void makeLeaderboards()
|
||||
{
|
||||
//Make Trees
|
||||
Tree Mining = new Tree();
|
||||
Tree WoodCutting = new Tree();
|
||||
@ -42,7 +44,6 @@ public class Leaderboard {
|
||||
String line = ""; //$NON-NLS-1$
|
||||
while((line = in.readLine()) != null)
|
||||
{
|
||||
|
||||
String[] character = line.split(":"); //$NON-NLS-1$
|
||||
String p = character[0];
|
||||
|
||||
|
@ -6,9 +6,9 @@ import org.bukkit.util.config.Configuration;
|
||||
|
||||
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 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/";
|
||||
File file = new File(directory + File.separator + "config.yml");
|
||||
@ -100,7 +100,9 @@ public class LoadProperties
|
||||
write("General.HP_Regeneration.Enabled", true);
|
||||
write("General.Performance.Print_Reports", false);
|
||||
|
||||
write("Items.Chimaera_Wing.Enabled", true);
|
||||
write("Items.Chimaera_Wing.Feather_Cost", 10);
|
||||
write("Items.Chimaera_Wing.Item_ID", 288);
|
||||
|
||||
write("XP.PVP.Rewards", true);
|
||||
write("XP.Gains.Multiplier.PVP", 1);
|
||||
@ -313,6 +315,9 @@ public class LoadProperties
|
||||
abilityDurabilityLoss = readInteger("Abilities.Tools.Durability_Loss");
|
||||
|
||||
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");
|
||||
pvpxprewardmodifier = readInteger("XP.Gains.Multiplier.PVP");
|
||||
miningrequirespickaxe = readBoolean("Skills.Mining.Requires_Pickaxe");
|
||||
|
@ -192,11 +192,11 @@ public class mcPlayerListener extends PlayerListener
|
||||
* ITEM CHECKS
|
||||
*/
|
||||
if(action == Action.RIGHT_CLICK_AIR)
|
||||
Item.itehecks(player, plugin);
|
||||
Item.itemhecks(player, plugin);
|
||||
if(action == Action.RIGHT_CLICK_BLOCK)
|
||||
{
|
||||
if(m.abilityBlockCheck(event.getClickedBlock()))
|
||||
Item.itehecks(player, plugin);
|
||||
Item.itemhecks(player, plugin);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user