mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 00:45:27 +01:00
Release of 1.0.37
This commit is contained in:
parent
073028697f
commit
0c71b3acfe
@ -1,18 +1,25 @@
|
||||
Changelog:
|
||||
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code
|
||||
Version 1.0.37
|
||||
The donation message in /mcmmo is now toggle-able
|
||||
The anvil message now only gets shown the first time you place an anvil (after login)
|
||||
Reworked /mcmmo (an improvement I would say)
|
||||
Added /mcmmo text to localization file
|
||||
Archery fire rate now configurable
|
||||
Berserk mode stops items from being collected
|
||||
Taming no longer receives xp from wolves being harmed
|
||||
Fixed bug where /stats required Tree Feller permission to show Woodcutting skill
|
||||
Fixed bug where players with mcgod could be harmed by AoE
|
||||
Fixed bug where modifying a skill also modified the xp to the same amount (when it should be zero)
|
||||
|
||||
BukkitContrib Stuff
|
||||
Added 'notifications' on levelup (BukkitContrib)
|
||||
Added sound effects to abilities
|
||||
Added an extra cool sound for WoodCutting
|
||||
Added a pop-up when placing an Anvil
|
||||
Added pop-ups on levelup
|
||||
Added basic sound effects to various abilities (Berserk, Tree Feller, Super Breaker, Leaf Blower, etc...)
|
||||
|
||||
Code Stuff
|
||||
Added getPlayerProfile() which returns a PlayerProfile object for plugin devs
|
||||
Added checkXp(SkillType, Player) for plugin devs (use this after modifying XP to check for levels)
|
||||
Added getPlayerProfile() which returns a PlayerProfile object for plugin devs (You can do almost everything with this object)
|
||||
100% more enums
|
||||
Changed how checking skill xp worked to be more efficient
|
||||
|
||||
|
@ -1,15 +1,13 @@
|
||||
package com.gmail.nossr50.config;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import org.bukkit.util.config.Configuration;
|
||||
|
||||
public class LoadProperties
|
||||
{
|
||||
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 Boolean donateMessage, chimaeraWingEnable, xpGainsMobSpawners, myspawnEnable, mccEnable, mcmmoEnable, partyEnable, inviteEnable, acceptEnable, whoisEnable, statsEnable, addxpEnable, ptpEnable, mmoeditEnable, clearmyspawnEnable, mcgodEnable, mcabilityEnable, mctopEnable, mcrefreshEnable, 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 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 static int archeryLimit, chimaeraId, msandstone, mcocoa, water_thunder, cure_self, cure_other, 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");
|
||||
|
||||
@ -35,42 +33,34 @@ public class LoadProperties
|
||||
}
|
||||
private void write(String root, Object x)
|
||||
{
|
||||
Configuration config = load();
|
||||
Configuration config = load();
|
||||
config.setProperty(root, x);
|
||||
config.save();
|
||||
}
|
||||
private Boolean readBoolean(String root)
|
||||
{
|
||||
Configuration config = load();
|
||||
return config.getBoolean(root, false);
|
||||
}
|
||||
private Integer readInteger(String root)
|
||||
private Boolean readBoolean(String root, Boolean def)
|
||||
{
|
||||
Configuration config = load();
|
||||
return config.getInt(root, 0);
|
||||
Boolean result = config.getBoolean(root, def);
|
||||
config.save();
|
||||
return result;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private Double readDouble(String root)
|
||||
private Integer readInteger(String root, Integer def)
|
||||
{
|
||||
Configuration config = load();
|
||||
return config.getDouble(root, 0);
|
||||
}
|
||||
@SuppressWarnings("unused")
|
||||
private List<String> readStringList(String root)
|
||||
{
|
||||
Configuration config = load();
|
||||
return config.getKeys(root);
|
||||
Configuration config = load();
|
||||
Integer result = config.getInt(root, def);
|
||||
config.save();
|
||||
return result;
|
||||
}
|
||||
|
||||
private String readString(String root)
|
||||
private String readString(String root, String def)
|
||||
{
|
||||
Configuration config = load();
|
||||
return config.getString(root);
|
||||
Configuration config = load();
|
||||
String result = config.getString(root, def);
|
||||
config.save();
|
||||
return result;
|
||||
}
|
||||
private Configuration load()
|
||||
{
|
||||
|
||||
try {
|
||||
Configuration config = new Configuration(file);
|
||||
config.load();
|
||||
@ -179,6 +169,7 @@ public class LoadProperties
|
||||
write("Commands.mcrefresh.Name", "mcrefresh");
|
||||
write("Commands.mcrefresh.Enabled", true);
|
||||
write("Commands.mcmmo.Name", "mcmmo");
|
||||
write("Commands.mcmmo.Donate_Message", true);
|
||||
write("Commands.mcmmo.Enabled", true);
|
||||
write("Commands.mcc.Name", "mcc");
|
||||
write("Commands.mcc.Enabled", true);
|
||||
@ -221,197 +212,191 @@ public class LoadProperties
|
||||
write("Skills.Repair.Wood.ID", 5);
|
||||
write("Skills.Repair.Wood.Name", "Wood Planks");
|
||||
write("Skills.Repair.Diamond.ID", 264);
|
||||
write("Skills.Repair.Diamond.Name", "Diamond Ore");
|
||||
write("Skills.Repair.Diamond.Name", "Diamond");
|
||||
write("Skills.Repair.Diamond.Level_Required", 50);
|
||||
write("Skills.Repair.Iron.ID", 265);
|
||||
write("Skills.Repair.Iron.Name", "Iron Bars");
|
||||
write("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true);
|
||||
write("Skills.Archery.Fire_Rate_Limiter", true);
|
||||
write("Skills.Archery.Fire_Rate_Limiter.Enabled", true);
|
||||
write("Skills.Archery.Fire_Rate_Limiter.Interval", 1000);
|
||||
write("Skills.Mining.Requires_Pickaxe", true);
|
||||
write("Skills.Woodcutting.Requires_Axe", true);
|
||||
|
||||
loadkeys();
|
||||
loadkeys();
|
||||
}
|
||||
private void loadkeys()
|
||||
{
|
||||
System.out.println("Loading Config File...");
|
||||
|
||||
xpGainsMobSpawners = readBoolean("XP.Gains.Mobspawners.Enabled");
|
||||
donateMessage = readBoolean("Commands.mcmmo.Donate_Message", true);
|
||||
xpGainsMobSpawners = readBoolean("XP.Gains.Mobspawners.Enabled", false);
|
||||
|
||||
//cure_self = readInteger("Sorcery.Spells.Curative.Cure_Self.Mana_Cost");
|
||||
//cure_other = readInteger("Sorcery.Spells.Curative.Cure_Other.Mana_Cost");
|
||||
//water_thunder = readInteger("Sorcery.Spells.Water.Thunder");
|
||||
|
||||
msulphur = readInteger("XP.Excavation.Sulphur");
|
||||
mbones = readInteger("XP.Excavation.Bones");
|
||||
mbase = readInteger("XP.Excavation.Base");
|
||||
mmushroom2 = readInteger("XP.Excavation.Mushroom");
|
||||
mslowsand = readInteger("XP.Excavation.Slowsand");
|
||||
mglowstone2 = readInteger("XP.Excavation.Glowstone");
|
||||
mmusic = readInteger("XP.Excavation.Music");
|
||||
mdiamond2 = readInteger("XP.Excavation.Diamond");
|
||||
mapple = readInteger("XP.Excavation.Apple");
|
||||
meggs = readInteger("XP.Excavation.Eggs");
|
||||
mcake = readInteger("XP.Excavation.Cake");
|
||||
mcocoa = readInteger("XP.Excavation.Cocoa_Beans");
|
||||
msulphur = readInteger("XP.Excavation.Sulphur", 3);
|
||||
mbones = readInteger("XP.Excavation.Bones", 3);
|
||||
mbase = readInteger("XP.Excavation.Base", 4);
|
||||
mmushroom2 = readInteger("XP.Excavation.Mushroom", 8);
|
||||
mslowsand = readInteger("XP.Excavation.Slowsand", 8);
|
||||
mglowstone2 = readInteger("XP.Excavation.Glowstone", 8);
|
||||
mmusic = readInteger("XP.Excavation.Music", 300);
|
||||
mdiamond2 = readInteger("XP.Excavation.Diamond", 100);
|
||||
mapple = readInteger("XP.Excavation.Apple", 10);
|
||||
meggs = readInteger("XP.Excavation.Eggs", 10);
|
||||
mcake = readInteger("XP.Excavation.Cake", 300);
|
||||
mcocoa = readInteger("XP.Excavation.Cocoa_Beans", 10);
|
||||
|
||||
msugar = readInteger("XP.Herbalism.Sugar_Cane", 3);
|
||||
mwheat = readInteger("XP.Herbalism.Wheat", 5);
|
||||
mcactus = readInteger("XP.Herbalism.Cactus", 3);
|
||||
mpumpkin = readInteger("XP.Herbalism.Pumpkin", 55);
|
||||
mflower = readInteger("XP.Herbalism.Flowers", 10);
|
||||
mmushroom = readInteger("XP.Herbalism.Mushrooms", 15);
|
||||
|
||||
mpine = readInteger("XP.Woodcutting.Pine", 7);
|
||||
mbirch = readInteger("XP.Woodcutting.Birch", 8);
|
||||
mspruce = readInteger("XP.Woodcutting.Spruce", 9);
|
||||
|
||||
msugar = readInteger("XP.Herbalism.Sugar_Cane");
|
||||
mwheat = readInteger("XP.Herbalism.Wheat");
|
||||
mcactus = readInteger("XP.Herbalism.Cactus");
|
||||
mpumpkin = readInteger("XP.Herbalism.Pumpkin");
|
||||
mflower = readInteger("XP.Herbalism.Flowers");
|
||||
mmushroom = readInteger("XP.Herbalism.Mushrooms");
|
||||
|
||||
mpine = readInteger("XP.Woodcutting.Pine");
|
||||
mbirch = readInteger("XP.Woodcutting.Birch");
|
||||
mspruce = readInteger("XP.Woodcutting.Spruce");
|
||||
mgold = readInteger("XP.Mining.Gold", 25);
|
||||
mdiamond = readInteger("XP.Mining.Diamond", 75);
|
||||
miron = readInteger("XP.Mining.Iron", 25);
|
||||
mredstone = readInteger("XP.Mining.Redstone", 15);
|
||||
mlapus = readInteger("XP.Mining.Lapus", 40);
|
||||
mobsidian = readInteger("XP.Mining.Obsidian", 15);
|
||||
mnetherrack = readInteger("XP.Mining.Netherrack", 3);
|
||||
mglowstone = readInteger("XP.Mining.Glowstone", 3);
|
||||
mcoal = readInteger("XP.Mining.Coal", 10);
|
||||
mstone = readInteger("XP.Mining.Stone", 3);
|
||||
msandstone = readInteger("XP.Mining.Sandstone", 3);
|
||||
|
||||
mgold = readInteger("XP.Mining.Gold");
|
||||
mdiamond = readInteger("XP.Mining.Diamond");
|
||||
miron = readInteger("XP.Mining.Iron");
|
||||
mredstone = readInteger("XP.Mining.Redstone");
|
||||
mlapus = readInteger("XP.Mining.Lapus");
|
||||
mobsidian = readInteger("XP.Mining.Obsidian");
|
||||
mnetherrack = readInteger("XP.Mining.Netherrack");
|
||||
mglowstone = readInteger("XP.Mining.Glowstone");
|
||||
mcoal = readInteger("XP.Mining.Coal");
|
||||
mstone = readInteger("XP.Mining.Stone");
|
||||
msandstone = readInteger("XP.Mining.Sandstone");
|
||||
|
||||
enableMotd = readBoolean("enableMOTD");
|
||||
|
||||
greenTerraCooldown = readInteger("Abilities.Cooldowns.Green_Terra");
|
||||
superBreakerCooldown = readInteger("Abilities.Cooldowns.Super_Breaker");
|
||||
gigaDrillBreakerCooldown = readInteger("Abilities.Cooldowns.Giga_Drill_Breaker");
|
||||
treeFellerCooldown = readInteger("Abilities.Cooldowns.Tree_Feller");
|
||||
berserkCooldown = readInteger("Abilities.Cooldowns.Berserk");
|
||||
serratedStrikeCooldown = readInteger("Abilities.Cooldowns.Serrated_Strikes");
|
||||
skullSplitterCooldown = readInteger("Abilities.Cooldowns.Skull_Splitter");
|
||||
greenTerraCooldown = readInteger("Abilities.Cooldowns.Green_Terra", 240);
|
||||
superBreakerCooldown = readInteger("Abilities.Cooldowns.Super_Breaker", 240);
|
||||
gigaDrillBreakerCooldown = readInteger("Abilities.Cooldowns.Giga_Drill_Breaker", 240);
|
||||
treeFellerCooldown = readInteger("Abilities.Cooldowns.Tree_Feller", 240);
|
||||
berserkCooldown = readInteger("Abilities.Cooldowns.Berserk", 240);
|
||||
serratedStrikeCooldown = readInteger("Abilities.Cooldowns.Serrated_Strikes", 240);
|
||||
skullSplitterCooldown = readInteger("Abilities.Cooldowns.Skull_Splitter", 240);
|
||||
|
||||
MySQLserverName = readString("MySQL.Server.Address");
|
||||
MySQLserverName = readString("MySQL.Server.Address", "localhost");
|
||||
MySQLdbPass = readString("MySQL.Database.User.Password", "");
|
||||
|
||||
if(readString("MySQL.Database.User.Password") != null)
|
||||
MySQLdbPass = readString("MySQL.Database.User.Password");
|
||||
else
|
||||
MySQLdbPass = "";
|
||||
MySQLdbName = readString("MySQL.Database.Name", "DatabaseName");
|
||||
MySQLuserName = readString("MySQL.Database.User.Name", "UserName");
|
||||
MySQLtablePrefix = readString("MySQL.Database.TablePrefix", "mcmmo_");
|
||||
MySQLport = readInteger("MySQL.Server.Port", 3306);
|
||||
useMySQL = readBoolean("MySQL.Enabled", false);
|
||||
|
||||
MySQLdbName = readString("MySQL.Database.Name");
|
||||
MySQLuserName = readString("MySQL.Database.User.Name");
|
||||
MySQLtablePrefix = readString("MySQL.Database.TablePrefix");
|
||||
MySQLport = readInteger("MySQL.Server.Port");
|
||||
useMySQL = readBoolean("MySQL.Enabled");
|
||||
locale = readString("General.Locale", "en_us");
|
||||
enableMotd = readBoolean("General.MOTD.Enabled", true);
|
||||
enableMySpawn = readBoolean("General.MySpawn.Enabled", true);
|
||||
enableRegen = readBoolean("General.HP_Regeneration.Enabled", true);
|
||||
|
||||
locale = readString("General.Locale");
|
||||
enableMotd = readBoolean("General.MOTD.Enabled");
|
||||
enableMySpawn = readBoolean("General.MySpawn.Enabled");
|
||||
enableRegen = readBoolean("General.HP_Regeneration.Enabled");
|
||||
enableCobbleToMossy = readBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy", true);
|
||||
archeryFireRateLimit = readBoolean("Skills.Archery.Fire_Rate_Limiter.Enabled", true);
|
||||
archeryLimit = readInteger("Skills.Archery.Fire_Rate_Limiter.Interval", 1000);
|
||||
|
||||
enableCobbleToMossy = readBoolean("Skills.Herbalism.Green_Thumb.Cobble_To_Mossy");
|
||||
archeryFireRateLimit = readBoolean("Skills.Archery.Fire_Rate_Limiter");
|
||||
xpGainMultiplier = readInteger("XP.Gains.Multiplier.Global", 1);
|
||||
toolsLoseDurabilityFromAbilities = readBoolean("Abilities.Tools.Durability_Loss_Enabled", true);
|
||||
abilityDurabilityLoss = readInteger("Abilities.Tools.Durability_Loss", 2);
|
||||
|
||||
xpGainMultiplier = readInteger("XP.Gains.Multiplier.Global");
|
||||
toolsLoseDurabilityFromAbilities = readBoolean("Abilities.Tools.Durability_Loss_Enabled");
|
||||
abilityDurabilityLoss = readInteger("Abilities.Tools.Durability_Loss");
|
||||
feathersConsumedByChimaeraWing = readInteger("Items.Chimaera_Wing.Feather_Cost", 10);
|
||||
chimaeraId = readInteger("Items.Chimaera_Wing.Item_ID", 288);
|
||||
chimaeraWingEnable = readBoolean("Items.Chimaera_Wing.Enabled", true);
|
||||
|
||||
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");
|
||||
woodcuttingrequiresaxe = readBoolean("Skills.Woodcutting.Requires_Axe");
|
||||
repairdiamondlevel = readInteger("Skills.Repair.Diamond.Level_Required");
|
||||
pvpxp = readBoolean("XP.PVP.Rewards", true);
|
||||
pvpxprewardmodifier = readInteger("XP.Gains.Multiplier.PVP", 1);
|
||||
miningrequirespickaxe = readBoolean("Skills.Mining.Requires_Pickaxe", true);
|
||||
woodcuttingrequiresaxe = readBoolean("Skills.Woodcutting.Requires_Axe", true);
|
||||
repairdiamondlevel = readInteger("Skills.Repair.Diamond.Level_Required", 50);
|
||||
|
||||
globalxpmodifier = readInteger("XP.Formula.Multiplier.Global");
|
||||
if(readInteger("XP.Formula.Multiplier.Sorcery") != null)
|
||||
sorceryxpmodifier = readInteger("XP.Formula.Multiplier.Sorcery");
|
||||
else
|
||||
sorceryxpmodifier = 2;
|
||||
tamingxpmodifier = readInteger("XP.Formula.Multiplier.Taming");
|
||||
miningxpmodifier = readInteger("XP.Formula.Multiplier.Mining");
|
||||
repairxpmodifier = readInteger("XP.Formula.Multiplier.Repair");
|
||||
woodcuttingxpmodifier = readInteger("XP.Formula.Multiplier.Woodcutting");
|
||||
unarmedxpmodifier = readInteger("XP.Formula.Multiplier.Unarmed");
|
||||
herbalismxpmodifier = readInteger("XP.Formula.Multiplier.Herbalism");
|
||||
excavationxpmodifier = readInteger("XP.Formula.Multiplier.Excavation");
|
||||
archeryxpmodifier = readInteger("XP.Formula.Multiplier.Archery");
|
||||
swordsxpmodifier = readInteger("XP.Formula.Multiplier.Swords");
|
||||
axesxpmodifier = readInteger("XP.Formula.Multiplier.Axes");
|
||||
acrobaticsxpmodifier = readInteger("XP.Formula.Multiplier.Acrobatics");
|
||||
globalxpmodifier = readInteger("XP.Formula.Multiplier.Global", 1);
|
||||
sorceryxpmodifier = readInteger("XP.Formula.Multiplier.Sorcery", 2);
|
||||
tamingxpmodifier = readInteger("XP.Formula.Multiplier.Taming", 2);
|
||||
miningxpmodifier = readInteger("XP.Formula.Multiplier.Mining", 2);
|
||||
repairxpmodifier = readInteger("XP.Formula.Multiplier.Repair", 2);
|
||||
woodcuttingxpmodifier = readInteger("XP.Formula.Multiplier.Woodcutting", 2);
|
||||
unarmedxpmodifier = readInteger("XP.Formula.Multiplier.Unarmed", 2);
|
||||
herbalismxpmodifier = readInteger("XP.Formula.Multiplier.Herbalism", 2);
|
||||
excavationxpmodifier = readInteger("XP.Formula.Multiplier.Excavation", 2);
|
||||
archeryxpmodifier = readInteger("XP.Formula.Multiplier.Archery", 2);
|
||||
swordsxpmodifier = readInteger("XP.Formula.Multiplier.Swords", 2);
|
||||
axesxpmodifier = readInteger("XP.Formula.Multiplier.Axes", 2);
|
||||
acrobaticsxpmodifier = readInteger("XP.Formula.Multiplier.Acrobatics", 2);
|
||||
|
||||
anvilmessages = readBoolean("Skills.Repair.Anvil_Messages");
|
||||
anvilmessages = readBoolean("Skills.Repair.Anvil_Messages", true);
|
||||
|
||||
rGold = readInteger("Skills.Repair.Gold.ID");
|
||||
nGold = readString("Skills.Repair.Gold.Name");
|
||||
rStone = readInteger("Skills.Repair.Stone.ID");
|
||||
nStone = readString("Skills.Repair.Stone.Name");
|
||||
rWood = readInteger("Skills.Repair.Wood.ID");
|
||||
nWood = readString("Skills.Repair.Wood.Name");
|
||||
rDiamond = readInteger("Skills.Repair.Diamond.ID");
|
||||
nDiamond = readString("Skills.Repair.Diamond.Name");
|
||||
rIron = readInteger("Skills.Repair.Iron.ID");
|
||||
nIron = readString("Skills.Repair.Iron.Name");
|
||||
rGold = readInteger("Skills.Repair.Gold.ID", 266);
|
||||
nGold = readString("Skills.Repair.Gold.Name", "Gold Bars");
|
||||
rStone = readInteger("Skills.Repair.Stone.ID", 4);
|
||||
nStone = readString("Skills.Repair.Stone.Name", "Cobblestone");
|
||||
rWood = readInteger("Skills.Repair.Wood.ID", 5);
|
||||
nWood = readString("Skills.Repair.Wood.Name", "Wood Planks");
|
||||
rDiamond = readInteger("Skills.Repair.Diamond.ID", 264);
|
||||
nDiamond = readString("Skills.Repair.Diamond.Name", "Diamond");
|
||||
rIron = readInteger("Skills.Repair.Iron.ID", 265);
|
||||
nIron = readString("Skills.Repair.Iron.Name", "Iron Bars");
|
||||
|
||||
cocoabeans = readBoolean("Excavation.Drops.Cocoa_Beans");
|
||||
mushrooms = readBoolean("Excavation.Drops.Mushrooms");
|
||||
glowstone = readBoolean("Excavation.Drops.Glowstone");
|
||||
eggs = readBoolean("Excavation.Drops.Eggs");
|
||||
apples = readBoolean("Excavation.Drops.Apples");
|
||||
cake = readBoolean("Excavation.Drops.Cake");
|
||||
music = readBoolean("Excavation.Drops.Music");
|
||||
diamond = readBoolean("Excavation.Drops.Diamond");
|
||||
slowsand = readBoolean("Excavation.Drops.Slowsand");
|
||||
sulphur = readBoolean("Excavation.Drops.Sulphur");
|
||||
netherrack = readBoolean("Excavation.Drops.Netherrack");
|
||||
bones = readBoolean("Excavation.Drops.Bones");
|
||||
cocoabeans = readBoolean("Excavation.Drops.Cocoa_Beans", true);
|
||||
mushrooms = readBoolean("Excavation.Drops.Mushrooms", true);
|
||||
glowstone = readBoolean("Excavation.Drops.Glowstone", true);
|
||||
eggs = readBoolean("Excavation.Drops.Eggs", true);
|
||||
apples = readBoolean("Excavation.Drops.Apples", true);
|
||||
cake = readBoolean("Excavation.Drops.Cake", true);
|
||||
music = readBoolean("Excavation.Drops.Music", true);
|
||||
diamond = readBoolean("Excavation.Drops.Diamond", true);
|
||||
slowsand = readBoolean("Excavation.Drops.Slowsand", true);
|
||||
sulphur = readBoolean("Excavation.Drops.Sulphur", true);
|
||||
netherrack = readBoolean("Excavation.Drops.Netherrack", true);
|
||||
bones = readBoolean("Excavation.Drops.Bones", true);
|
||||
|
||||
mctop = readString("Commands.mctop.Name");
|
||||
mctopEnable = readBoolean("Commands.mctop.Enabled");
|
||||
mctop = readString("Commands.mctop.Name", "mctop");
|
||||
mctopEnable = readBoolean("Commands.mctop.Enabled", true);
|
||||
|
||||
addxp = readString("Commands.addxp.Name");
|
||||
addxpEnable = readBoolean("Commands.addxp.Enabled");
|
||||
addxp = readString("Commands.addxp.Name", "addxp");
|
||||
addxpEnable = readBoolean("Commands.addxp.Enabled", true);
|
||||
|
||||
mcability = readString("Commands.mcability.Name");
|
||||
mcabilityEnable = readBoolean("Commands.mcability.Enabled");
|
||||
mcability = readString("Commands.mcability.Name", "mcability");
|
||||
mcabilityEnable = readBoolean("Commands.mcability.Enabled", true);
|
||||
|
||||
mcrefresh = readString("Commands.mcrefresh.Name");
|
||||
mcrefreshEnable = readBoolean("Commands.mcrefresh.Enabled");
|
||||
mcrefresh = readString("Commands.mcrefresh.Name", "mcrefresh");
|
||||
mcrefreshEnable = readBoolean("Commands.mcrefresh.Enabled", true);
|
||||
|
||||
mcmmo = readString("Commands.mcmmo.Name");
|
||||
mcmmoEnable = readBoolean("Commands.mcmmo.Enabled");
|
||||
mcmmo = readString("Commands.mcmmo.Name", "mcmmo");
|
||||
mcmmoEnable = readBoolean("Commands.mcmmo.Enabled", true);
|
||||
|
||||
mcc = readString("Commands.mcc.Name");
|
||||
mccEnable = readBoolean("Commands.mcc.Enabled");
|
||||
mcc = readString("Commands.mcc.Name", "mcc");
|
||||
mccEnable = readBoolean("Commands.mcc.Enabled", true);
|
||||
|
||||
mcgod = readString("Commands.mcgod.Name");
|
||||
mcgodEnable = readBoolean("Commands.mcgod.Enabled");
|
||||
mcgod = readString("Commands.mcgod.Name", "mcgod");
|
||||
mcgodEnable = readBoolean("Commands.mcgod.Enabled", true);
|
||||
|
||||
stats = readString("Commands.stats.Name");
|
||||
statsEnable = readBoolean("Commands.stats.Enabled");
|
||||
stats = readString("Commands.stats.Name", "stats");
|
||||
statsEnable = readBoolean("Commands.stats.Enabled", true);
|
||||
|
||||
mmoedit = readString("Commands.mmoedit.Name");
|
||||
mmoeditEnable = readBoolean("Commands.mmoedit.Enabled");
|
||||
mmoedit = readString("Commands.mmoedit.Name", "mmoedit");
|
||||
mmoeditEnable = readBoolean("Commands.mmoedit.Enabled", true);
|
||||
|
||||
ptp = readString("Commands.ptp.Name");
|
||||
ptpEnable = readBoolean("Commands.ptp.Enabled");
|
||||
ptp = readString("Commands.ptp.Name", "ptp");
|
||||
ptpEnable = readBoolean("Commands.ptp.Enabled", true);
|
||||
|
||||
party = readString("Commands.party.Name");
|
||||
partyEnable = readBoolean("Commands.party.Enabled");
|
||||
party = readString("Commands.party.Name", "party");
|
||||
partyEnable = readBoolean("Commands.party.Enabled", true);
|
||||
|
||||
myspawn = readString("Commands.myspawn.Name");
|
||||
myspawnEnable = readBoolean("Commands.myspawn.Enabled");
|
||||
myspawn = readString("Commands.myspawn.Name", "myspawn");
|
||||
myspawnEnable = readBoolean("Commands.myspawn.Enabled", true);
|
||||
|
||||
whois = readString("Commands.whois.Name");
|
||||
whoisEnable = readBoolean("Commands.whois.Enabled");
|
||||
whois = readString("Commands.whois.Name", "whois");
|
||||
whoisEnable = readBoolean("Commands.whois.Enabled", true);
|
||||
|
||||
invite = readString("Commands.invite.Name");
|
||||
inviteEnable = readBoolean("Commands.invite.Enabled");
|
||||
invite = readString("Commands.invite.Name", "invite");
|
||||
inviteEnable = readBoolean("Commands.invite.Enabled", true);
|
||||
|
||||
accept = readString("Commands.accept.Name");
|
||||
acceptEnable = readBoolean("Commands.accept.Enabled");
|
||||
accept = readString("Commands.accept.Name", "accept");
|
||||
acceptEnable = readBoolean("Commands.accept.Enabled", true);
|
||||
|
||||
clearmyspawn = readString("Commands.clearmyspawn.Name");
|
||||
clearmyspawnEnable = readBoolean("Commands.clearmyspawn.Enabled");
|
||||
clearmyspawn = readString("Commands.clearmyspawn.Name", "clearmyspawn");
|
||||
clearmyspawnEnable = readBoolean("Commands.clearmyspawn.Enabled", true);
|
||||
}
|
||||
}
|
@ -21,11 +21,8 @@ public class contribStuff
|
||||
{
|
||||
//Contrib stuff
|
||||
ContribPlayer cPlayer = ContribCraftPlayer.getContribPlayer(player);
|
||||
if(cPlayer.isBukkitContribEnabled())
|
||||
{
|
||||
SoundManager SM = BukkitContrib.getSoundManager();
|
||||
SM.playSoundEffect(cPlayer, effect, location);
|
||||
}
|
||||
SoundManager SM = BukkitContrib.getSoundManager();
|
||||
SM.playSoundEffect(cPlayer, effect, location);
|
||||
}
|
||||
public static void levelUpNotification(SkillType skillType, ContribPlayer cPlayer)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ public class PlayerProfile
|
||||
private String party, myspawn, myspawnworld, invite;
|
||||
|
||||
//TOGGLES
|
||||
private boolean partyChatMode = false, adminChatMode = false, godMode = false, greenTerraMode, partyChatOnly = false, greenTerraInformed = true, berserkInformed = true, skullSplitterInformed = true, gigaDrillBreakerInformed = true,
|
||||
private boolean placedAnvil = false, partyChatMode = false, adminChatMode = false, godMode = false, greenTerraMode, partyChatOnly = false, greenTerraInformed = true, berserkInformed = true, skullSplitterInformed = true, gigaDrillBreakerInformed = true,
|
||||
superBreakerInformed = true, serratedStrikesInformed = true, treeFellerInformed = true, dead, abilityuse = true, treeFellerMode, superBreakerMode, gigaDrillBreakerMode,
|
||||
serratedStrikesMode, hoePreparationMode = false, shovelPreparationMode = false, swordsPreparationMode = false, fistsPreparationMode = false, pickaxePreparationMode = false, axePreparationMode = false, skullSplitterMode, berserkMode;
|
||||
|
||||
@ -452,6 +452,14 @@ public class PlayerProfile
|
||||
public boolean getPartyChatMode() {return partyChatMode;}
|
||||
public boolean getGodMode() {return godMode;}
|
||||
|
||||
public void togglePlacedAnvil()
|
||||
{
|
||||
placedAnvil = !placedAnvil;
|
||||
}
|
||||
public Boolean getPlacedAnvil()
|
||||
{
|
||||
return placedAnvil;
|
||||
}
|
||||
public void toggleAdminChat()
|
||||
{
|
||||
adminChatMode = !adminChatMode;
|
||||
|
@ -19,6 +19,8 @@ import org.bukkit.event.block.BlockFromToEvent;
|
||||
import org.bukkit.event.block.BlockListener;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkitcontrib.player.ContribCraftPlayer;
|
||||
import org.bukkitcontrib.player.ContribPlayer;
|
||||
import org.bukkitcontrib.sound.SoundEffect;
|
||||
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
@ -54,7 +56,26 @@ public class mcBlockListener extends BlockListener {
|
||||
plugin.misc.blockWatchList.add(block);
|
||||
}
|
||||
if(block.getTypeId() == 42 && LoadProperties.anvilmessages)
|
||||
event.getPlayer().sendMessage(mcLocale.getString("mcBlockListener.PlacedAnvil")); //$NON-NLS-1$
|
||||
{
|
||||
ContribPlayer cPlayer = ContribCraftPlayer.getContribPlayer(player);
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
if(cPlayer.isBukkitContribEnabled())
|
||||
{
|
||||
if(!PP.getPlacedAnvil())
|
||||
{
|
||||
cPlayer.sendNotification("[mcMMO] Anvil Placed", "Right click to repair!", Material.IRON_BLOCK);
|
||||
PP.togglePlacedAnvil();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!PP.getPlacedAnvil())
|
||||
{
|
||||
event.getPlayer().sendMessage(mcLocale.getString("mcBlockListener.PlacedAnvil")); //$NON-NLS-1$
|
||||
PP.togglePlacedAnvil();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onBlockBreak(BlockBreakEvent event)
|
||||
@ -251,7 +272,8 @@ public class mcBlockListener extends BlockListener {
|
||||
|
||||
|
||||
if(mcPermissions.getInstance().mining(player) && Mining.canBeSuperBroken(block) &&
|
||||
m.blockBreakSimulate(block, player, plugin) && PP.getSkillLevel(SkillType.MINING) >= 250 && block.getType() != Material.STONE)
|
||||
m.blockBreakSimulate(block, player, plugin) && PP.getSkillLevel(SkillType.MINING) >= 250
|
||||
&& block.getType() != Material.STONE && m.isMiningPick(inhand))
|
||||
{
|
||||
contribStuff.playSoundForPlayer(SoundEffect.FIZZ, player, block.getLocation());
|
||||
if(PP.getSkillLevel(SkillType.MINING) >= 500)
|
||||
|
@ -106,9 +106,8 @@ public class mcPlayerListener extends PlayerListener
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
|
||||
|
||||
public void onPlayerInteract(PlayerInteractEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
Action action = event.getAction();
|
||||
@ -117,8 +116,10 @@ public class mcPlayerListener extends PlayerListener
|
||||
|
||||
|
||||
//Archery Nerf
|
||||
if(player.getItemInHand().getTypeId() == 261 && LoadProperties.archeryFireRateLimit){
|
||||
if(System.currentTimeMillis() < PP.getArcheryShotATS() + 1000){
|
||||
if(player.getItemInHand().getTypeId() == 261 && LoadProperties.archeryFireRateLimit)
|
||||
{
|
||||
if(System.currentTimeMillis() < PP.getArcheryShotATS() + LoadProperties.archeryLimit)
|
||||
{
|
||||
/*
|
||||
if(m.hasArrows(player))
|
||||
m.addArrows(player);
|
||||
|
@ -318,4 +318,5 @@ m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELL
|
||||
Combat.BeastLore=[[GREEN]]**BESTIENKUNDE**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]BEsitzer ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Gesundheit ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Gesundheit ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Gesundheit ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: WHAT IS IT?,[[GOLD]]mcMMO is an [[RED]]OPEN SOURCE[[GOLD]] RPG mod for Bukkit by [[BLUE]]nossr50,[[GOLD]]There are many skills added by mcMMO to Minecraft.,[[GOLD]]You can gain experience in many different ways,[[GOLD]]You will want to type [[GREEN]]/SKILLNAME[[GOLD]] to find out more about a skill.,[[DARK_AQUA]]Q: WHAT DOES IT DO?,[[GOLD]]As an example... in [[DARK_AQUA]]Mining[[GOLD]] you will receive benefits like,[[RED]]Double Drops[[GOLD]] or the ability [[RED]]Super Breaker[[GOLD]] which when,[[GOLD]]activated by right-click allows fast Mining during its duration,[[GOLD]]which is related to your skill level. Leveling [[BLUE]]Mining,[[GOLD]]is as simple as mining precious materials!,[[DARK_AQUA]]Q: WHAT DOES THIS MEAN?,[[GOLD]]Almost all of the skills in [[GREEN]]mcMMO[[GOLD]] add cool new things!.,[[GOLD]]You can also type [[GREEN]]/{0}[[GOLD]] to find out commands,[[GOLD]]The goal of mcMMO is to provide a quality RPG experience.,[[DARK_AQUA]]Q: WHERE DO I SUGGEST NEW STUFF!?,[[GOLD]]On the mcMMO thread in the bukkit forums!,[[DARK_AQUA]]Q: HOW DO I DO THIS AND THAT?,[[RED]]PLEASE [[GOLD]]checkout the wiki! [[DARK_AQUA]]mcmmo.wikia.com
|
@ -320,4 +320,5 @@ m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELL
|
||||
Combat.BeastLore=[[GREEN]]**BEAST LORE**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Owner ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: WHAT IS IT?,[[GOLD]]mcMMO is an [[RED]]OPEN SOURCE[[GOLD]] RPG mod for Bukkit by [[BLUE]]nossr50,[[GOLD]]There are many skills added by mcMMO to Minecraft.,[[GOLD]]You can gain experience in many different ways,[[GOLD]]You will want to type [[GREEN]]/SKILLNAME[[GOLD]] to find out more about a skill.,[[DARK_AQUA]]Q: WHAT DOES IT DO?,[[GOLD]]As an example... in [[DARK_AQUA]]Mining[[GOLD]] you will receive benefits like,[[RED]]Double Drops[[GOLD]] or the ability [[RED]]Super Breaker[[GOLD]] which when,[[GOLD]]activated by right-click allows fast Mining during its duration,[[GOLD]]which is related to your skill level. Leveling [[BLUE]]Mining,[[GOLD]]is as simple as mining precious materials!,[[DARK_AQUA]]Q: WHAT DOES THIS MEAN?,[[GOLD]]Almost all of the skills in [[GREEN]]mcMMO[[GOLD]] add cool new things!.,[[GOLD]]You can also type [[GREEN]]/{0}[[GOLD]] to find out commands,[[GOLD]]The goal of mcMMO is to provide a quality RPG experience.,[[DARK_AQUA]]Q: WHERE DO I SUGGEST NEW STUFF!?,[[GOLD]]On the mcMMO thread in the bukkit forums!,[[DARK_AQUA]]Q: HOW DO I DO THIS AND THAT?,[[RED]]PLEASE [[GOLD]]checkout the wiki! [[DARK_AQUA]]mcmmo.wikia.com
|
@ -297,4 +297,5 @@ Skills.HerbalismUp=[[YELLOW]]Herbalism skill increased by {0}. Total ({1})
|
||||
Skills.MiningUp=[[YELLOW]]Mining skill increased by {0}. Total ({1})
|
||||
Skills.WoodcuttingUp=[[YELLOW]]Woodcutting skill increased by {0}. Total ({1})
|
||||
Skills.RepairUp=[[YELLOW]]Repair skill increased by {0}. Total ({1})
|
||||
Skills.ExcavationUp=[[YELLOW]]Excavation skill increased by {0}. Total ({1})
|
||||
Skills.ExcavationUp=[[YELLOW]]Excavation skill increased by {0}. Total ({1})
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: WHAT IS IT?,[[GOLD]]mcMMO is an [[RED]]OPEN SOURCE[[GOLD]] RPG mod for Bukkit by [[BLUE]]nossr50,[[GOLD]]There are many skills added by mcMMO to Minecraft.,[[GOLD]]You can gain experience in many different ways,[[GOLD]]You will want to type [[GREEN]]/SKILLNAME[[GOLD]] to find out more about a skill.,[[DARK_AQUA]]Q: WHAT DOES IT DO?,[[GOLD]]As an example... in [[DARK_AQUA]]Mining[[GOLD]] you will receive benefits like,[[RED]]Double Drops[[GOLD]] or the ability [[RED]]Super Breaker[[GOLD]] which when,[[GOLD]]activated by right-click allows fast Mining during its duration,[[GOLD]]which is related to your skill level. Leveling [[BLUE]]Mining,[[GOLD]]is as simple as mining precious materials!,[[DARK_AQUA]]Q: WHAT DOES THIS MEAN?,[[GOLD]]Almost all of the skills in [[GREEN]]mcMMO[[GOLD]] add cool new things!.,[[GOLD]]You can also type [[GREEN]]/{0}[[GOLD]] to find out commands,[[GOLD]]The goal of mcMMO is to provide a quality RPG experience.,[[DARK_AQUA]]Q: WHERE DO I SUGGEST NEW STUFF!?,[[GOLD]]On the mcMMO thread in the bukkit forums!,[[DARK_AQUA]]Q: HOW DO I DO THIS AND THAT?,[[RED]]PLEASE [[GOLD]]checkout the wiki! [[DARK_AQUA]]mcmmo.wikia.com
|
@ -318,4 +318,5 @@ m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELL
|
||||
Combat.BeastLore=[[GREEN]]**BEAST LORE**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Owner ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: WHAT IS IT?,[[GOLD]]mcMMO is an [[RED]]OPEN SOURCE[[GOLD]] RPG mod for Bukkit by [[BLUE]]nossr50,[[GOLD]]There are many skills added by mcMMO to Minecraft.,[[GOLD]]You can gain experience in many different ways,[[GOLD]]You will want to type [[GREEN]]/SKILLNAME[[GOLD]] to find out more about a skill.,[[DARK_AQUA]]Q: WHAT DOES IT DO?,[[GOLD]]As an example... in [[DARK_AQUA]]Mining[[GOLD]] you will receive benefits like,[[RED]]Double Drops[[GOLD]] or the ability [[RED]]Super Breaker[[GOLD]] which when,[[GOLD]]activated by right-click allows fast Mining during its duration,[[GOLD]]which is related to your skill level. Leveling [[BLUE]]Mining,[[GOLD]]is as simple as mining precious materials!,[[DARK_AQUA]]Q: WHAT DOES THIS MEAN?,[[GOLD]]Almost all of the skills in [[GREEN]]mcMMO[[GOLD]] add cool new things!.,[[GOLD]]You can also type [[GREEN]]/{0}[[GOLD]] to find out commands,[[GOLD]]The goal of mcMMO is to provide a quality RPG experience.,[[DARK_AQUA]]Q: WHERE DO I SUGGEST NEW STUFF!?,[[GOLD]]On the mcMMO thread in the bukkit forums!,[[DARK_AQUA]]Q: HOW DO I DO THIS AND THAT?,[[RED]]PLEASE [[GOLD]]checkout the wiki! [[DARK_AQUA]]mcmmo.wikia.com
|
@ -326,4 +326,5 @@ m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELL
|
||||
Combat.BeastLore=[[GREEN]]**WOLFINSPECTIE**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Eigenaar ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Levens ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Levens ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Levens ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: WHAT IS IT?,[[GOLD]]mcMMO is an [[RED]]OPEN SOURCE[[GOLD]] RPG mod for Bukkit by [[BLUE]]nossr50,[[GOLD]]There are many skills added by mcMMO to Minecraft.,[[GOLD]]You can gain experience in many different ways,[[GOLD]]You will want to type [[GREEN]]/SKILLNAME[[GOLD]] to find out more about a skill.,[[DARK_AQUA]]Q: WHAT DOES IT DO?,[[GOLD]]As an example... in [[DARK_AQUA]]Mining[[GOLD]] you will receive benefits like,[[RED]]Double Drops[[GOLD]] or the ability [[RED]]Super Breaker[[GOLD]] which when,[[GOLD]]activated by right-click allows fast Mining during its duration,[[GOLD]]which is related to your skill level. Leveling [[BLUE]]Mining,[[GOLD]]is as simple as mining precious materials!,[[DARK_AQUA]]Q: WHAT DOES THIS MEAN?,[[GOLD]]Almost all of the skills in [[GREEN]]mcMMO[[GOLD]] add cool new things!.,[[GOLD]]You can also type [[GREEN]]/{0}[[GOLD]] to find out commands,[[GOLD]]The goal of mcMMO is to provide a quality RPG experience.,[[DARK_AQUA]]Q: WHERE DO I SUGGEST NEW STUFF!?,[[GOLD]]On the mcMMO thread in the bukkit forums!,[[DARK_AQUA]]Q: HOW DO I DO THIS AND THAT?,[[RED]]PLEASE [[GOLD]]checkout the wiki! [[DARK_AQUA]]mcmmo.wikia.com
|
@ -320,4 +320,5 @@ m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]Doswiadczenia[[YELLOW]]([[GOLD
|
||||
Combat.BeastLore=[[GREEN]]**WIEDZA BESTI**
|
||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Wlasciciel ([[RED]]{0}[[DARK_AQUA]])
|
||||
Combat.BeastLoreHealthWolfTamed=[[DARK_AQUA]]Zycie ([[GREEN]]{0}[[DARK_AQUA]]/20)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Zycie ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
Combat.BeastLoreHealthWolf=[[DARK_AQUA]]Zycie ([[GREEN]]{0}[[DARK_AQUA]]/8)
|
||||
mcMMO.Description=[[DARK_AQUA]]Q: WHAT IS IT?,[[GOLD]]mcMMO is an [[RED]]OPEN SOURCE[[GOLD]] RPG mod for Bukkit by [[BLUE]]nossr50,[[GOLD]]There are many skills added by mcMMO to Minecraft.,[[GOLD]]You can gain experience in many different ways,[[GOLD]]You will want to type [[GREEN]]/SKILLNAME[[GOLD]] to find out more about a skill.,[[DARK_AQUA]]Q: WHAT DOES IT DO?,[[GOLD]]As an example... in [[DARK_AQUA]]Mining[[GOLD]] you will receive benefits like,[[RED]]Double Drops[[GOLD]] or the ability [[RED]]Super Breaker[[GOLD]] which when,[[GOLD]]activated by right-click allows fast Mining during its duration,[[GOLD]]which is related to your skill level. Leveling [[BLUE]]Mining,[[GOLD]]is as simple as mining precious materials!,[[DARK_AQUA]]Q: WHAT DOES THIS MEAN?,[[GOLD]]Almost all of the skills in [[GREEN]]mcMMO[[GOLD]] add cool new things!.,[[GOLD]]You can also type [[GREEN]]/{0}[[GOLD]] to find out commands,[[GOLD]]The goal of mcMMO is to provide a quality RPG experience.,[[DARK_AQUA]]Q: WHERE DO I SUGGEST NEW STUFF!?,[[GOLD]]On the mcMMO thread in the bukkit forums!,[[DARK_AQUA]]Q: HOW DO I DO THIS AND THAT?,[[RED]]PLEASE [[GOLD]]checkout the wiki! [[DARK_AQUA]]mcmmo.wikia.com
|
@ -14,9 +14,17 @@ import com.nijikokun.bukkit.Permissions.Permissions;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Timer;
|
||||
@ -31,6 +39,8 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkitcontrib.player.ContribCraftPlayer;
|
||||
import org.bukkitcontrib.player.ContribPlayer;
|
||||
|
||||
|
||||
public class mcMMO extends JavaPlugin
|
||||
@ -76,7 +86,6 @@ public class mcMMO extends JavaPlugin
|
||||
|
||||
if(!LoadProperties.useMySQL)
|
||||
Users.getInstance().loadUsers(); //Load Users file
|
||||
|
||||
/*
|
||||
* REGISTER EVENTS
|
||||
*/
|
||||
@ -115,16 +124,61 @@ public class mcMMO extends JavaPlugin
|
||||
Leaderboard.makeLeaderboards(); //Make the leaderboards
|
||||
|
||||
for(Player player : getServer().getOnlinePlayers()){Users.addUser(player);} //In case of reload add all users back into PlayerProfile
|
||||
|
||||
if (pm.getPlugin("BukkitContrib") == null)
|
||||
try {
|
||||
download(log, new URL("http://bit.ly/autoupdateBukkitContrib"), new File("plugins/BukkitContrib.jar"));
|
||||
pm.loadPlugin(new File("plugins" + File.separator + "BukkitContrib.jar"));
|
||||
pm.enablePlugin(pm.getPlugin("BukkitContrib"));
|
||||
} catch (final Exception ex) {
|
||||
log.warning("[mcMMO] Failed to install BukkitContrib, you may have to restart your server or install it manually.");
|
||||
}
|
||||
|
||||
System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
|
||||
mcMMO_Timer.schedule(new mcTimer(this), (long)0, (long)(1000));
|
||||
//mcMMO_SpellTimer.schedule(new mcTimerSpells(this), (long)0, (long)(100));
|
||||
}
|
||||
|
||||
public static void download(Logger log, URL url, File file) throws IOException
|
||||
{
|
||||
if (!file.getParentFile().exists())
|
||||
file.getParentFile().mkdir();
|
||||
if (file.exists())
|
||||
file.delete();
|
||||
file.createNewFile();
|
||||
final int size = url.openConnection().getContentLength();
|
||||
log.info("Downloading " + file.getName() + " (" + size / 1024 + "kb) ...");
|
||||
final InputStream in = url.openStream();
|
||||
final OutputStream out = new BufferedOutputStream(new FileOutputStream(file));
|
||||
final byte[] buffer = new byte[1024];
|
||||
int len, downloaded = 0, msgs = 0;
|
||||
final long start = System.currentTimeMillis();
|
||||
while ((len = in.read(buffer)) >= 0) {
|
||||
out.write(buffer, 0, len);
|
||||
downloaded += len;
|
||||
if ((int)((System.currentTimeMillis() - start) / 500) > msgs) {
|
||||
log.info((int)((double)downloaded / (double)size * 100d) + "%");
|
||||
msgs++;
|
||||
}
|
||||
}
|
||||
in.close();
|
||||
out.close();
|
||||
log.info("Download finished");
|
||||
}
|
||||
|
||||
public PlayerProfile getPlayerProfile(Player player)
|
||||
{
|
||||
return Users.getProfile(player);
|
||||
}
|
||||
|
||||
public void checkXp(Player player, SkillType skillType)
|
||||
{
|
||||
if(skillType == SkillType.ALL)
|
||||
Skills.XpCheckAll(player);
|
||||
else
|
||||
Skills.XpCheckSkill(skillType, player);
|
||||
}
|
||||
|
||||
public boolean inSameParty(Player playera, Player playerb)
|
||||
{
|
||||
if(Users.getProfile(playera).inParty() && Users.getProfile(playerb).inParty()){
|
||||
@ -180,17 +234,17 @@ public class mcMMO extends JavaPlugin
|
||||
public boolean onCommand( CommandSender sender, Command command, String label, String[] args ) {
|
||||
Player player = null;
|
||||
PlayerProfile PP = null;
|
||||
if(!isConsole(sender)) {
|
||||
if(sender instanceof Player) {
|
||||
player = (Player) sender;
|
||||
PP = Users.getProfile(player);
|
||||
}
|
||||
|
||||
|
||||
String[] split = new String[args.length + 1];
|
||||
split[0] = label;
|
||||
for(int a = 0; a < args.length; a++){
|
||||
split[a + 1] = args[a];
|
||||
}
|
||||
|
||||
|
||||
//Check if the command is an MMO related help command
|
||||
if(label.equalsIgnoreCase("taming") || split[0].toLowerCase().equalsIgnoreCase(mcLocale.getString("m.SkillTaming").toLowerCase())){
|
||||
float skillvalue = (float)PP.getSkillLevel(SkillType.TAMING);
|
||||
@ -574,26 +628,20 @@ public class mcMMO extends JavaPlugin
|
||||
*/
|
||||
}
|
||||
|
||||
else if(LoadProperties.mcmmoEnable && label.equalsIgnoreCase(LoadProperties.mcmmo)){
|
||||
player.sendMessage(ChatColor.RED+"-----[]"+ChatColor.GREEN+"mMO"+ChatColor.RED+"[]-----");
|
||||
player.sendMessage(ChatColor.YELLOW+"mcMMO is an RPG server mod for minecraft.");
|
||||
player.sendMessage(ChatColor.YELLOW+"There are many skills added by mcMMO to minecraft.");
|
||||
player.sendMessage(ChatColor.YELLOW+"They can do anything from giving a chance");
|
||||
player.sendMessage(ChatColor.YELLOW+"for double drops to letting you break materials instantly.");
|
||||
player.sendMessage(ChatColor.YELLOW+"For example, by harvesting logs from trees you will gain");
|
||||
player.sendMessage(ChatColor.YELLOW+"Woodcutting xp and once you have enough xp you will gain");
|
||||
player.sendMessage(ChatColor.YELLOW+"a skill level in Woodcutting. By raising this skill you will");
|
||||
player.sendMessage(ChatColor.YELLOW+"be able to receive benefits like "+ChatColor.RED+"double drops");
|
||||
player.sendMessage(ChatColor.YELLOW+"and increase the effects of the "+ChatColor.RED+"\"Tree Felling\""+ChatColor.YELLOW+" ability.");
|
||||
player.sendMessage(ChatColor.YELLOW+"mMO has abilities related to the skill, skills normally");
|
||||
player.sendMessage(ChatColor.YELLOW+"provide passive bonuses but they also have activated");
|
||||
player.sendMessage(ChatColor.YELLOW+"abilities too. Each ability is activated by holding");
|
||||
player.sendMessage(ChatColor.YELLOW+"the appropriate tool and "+ChatColor.RED+"right clicking.");
|
||||
player.sendMessage(ChatColor.YELLOW+"For example, if you hold a Mining Pick and right click");
|
||||
player.sendMessage(ChatColor.YELLOW+"you will ready your Pickaxe, attack mining materials");
|
||||
player.sendMessage(ChatColor.YELLOW+"and then "+ChatColor.RED+"Super Breaker "+ChatColor.YELLOW+"will activate.");
|
||||
player.sendMessage(ChatColor.GREEN+"Find out mcMMO commands with "+ChatColor.DARK_AQUA+LoadProperties.mcc);
|
||||
player.sendMessage(ChatColor.GREEN+"You can donate via paypal to"+ChatColor.DARK_RED+" nossr50@gmail.com");
|
||||
else if(LoadProperties.mcmmoEnable && label.equalsIgnoreCase(LoadProperties.mcmmo))
|
||||
{
|
||||
player.sendMessage(ChatColor.RED+"-----[]"+ChatColor.GREEN+"mcMMO"+ChatColor.RED+"[]-----");
|
||||
String description = mcLocale.getString("mcMMO.Description", new Object[] {LoadProperties.mcc});
|
||||
String[] mcSplit = description.split(",");
|
||||
|
||||
for(String x : mcSplit)
|
||||
{
|
||||
player.sendMessage(x);
|
||||
}
|
||||
|
||||
ContribPlayer cPlayer = ContribCraftPlayer.getContribPlayer(player);
|
||||
if(LoadProperties.donateMessage)
|
||||
cPlayer.sendNotification("[mcMMO] Donate!", "Paypal nossr50@gmail.com", Material.CAKE);
|
||||
}
|
||||
else if(LoadProperties.mccEnable && label.equalsIgnoreCase(LoadProperties.mcc)){
|
||||
player.sendMessage(ChatColor.RED+"---[]"+ChatColor.YELLOW+"mcMMO Commands"+ChatColor.RED+"[]---");
|
||||
@ -1079,10 +1127,11 @@ public class mcMMO extends JavaPlugin
|
||||
/*
|
||||
* STATS COMMAND
|
||||
*/
|
||||
else if(LoadProperties.statsEnable && label.equalsIgnoreCase(LoadProperties.stats)){
|
||||
else if(LoadProperties.statsEnable && label.equalsIgnoreCase(LoadProperties.stats))
|
||||
{
|
||||
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.YourStats"));
|
||||
|
||||
|
||||
if(mcPermissions.getEnabled())
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.NoSkillNote"));
|
||||
|
||||
@ -1096,7 +1145,7 @@ public class mcMMO extends JavaPlugin
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.HerbalismSkill"), PP.getSkillLevel(SkillType.HERBALISM), PP.getSkillXpLevel(SkillType.HERBALISM), PP.getXpToLevel(SkillType.HERBALISM)));
|
||||
if(mcPermissions.getInstance().mining(player))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.MiningSkill"), PP.getSkillLevel(SkillType.MINING), PP.getSkillXpLevel(SkillType.MINING), PP.getXpToLevel(SkillType.MINING)));
|
||||
if(mcPermissions.getInstance().woodCuttingAbility(player))
|
||||
if(mcPermissions.getInstance().woodcutting(player))
|
||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.WoodcuttingSkill"), PP.getSkillLevel(SkillType.WOODCUTTING), PP.getSkillXpLevel(SkillType.WOODCUTTING), PP.getXpToLevel(SkillType.WOODCUTTING)));
|
||||
}
|
||||
if(Skills.hasCombatSkills(player)){
|
||||
@ -1142,8 +1191,8 @@ public class mcMMO extends JavaPlugin
|
||||
Player target = getPlayer(split[1]);
|
||||
PlayerProfile PPt = Users.getProfile(target);
|
||||
PPt.modifyInvite(PP.getParty());
|
||||
|
||||
|
||||
|
||||
|
||||
player.sendMessage(mcLocale.getString("mcPlayerListener.InviteSuccess"));
|
||||
//target.sendMessage(ChatColor.RED+"ALERT: "+ChatColor.GREEN+"You have received a party invite for "+PPt.getInvite()+" from "+player.getName());
|
||||
target.sendMessage(mcLocale.getString("mcPlayerListener.ReceivedInvite1", new Object[] {PPt.getInvite(), player.getName()}));
|
||||
@ -1209,20 +1258,21 @@ public class mcMMO extends JavaPlugin
|
||||
else if(LoadProperties.partyEnable && label.equalsIgnoreCase("p")){
|
||||
|
||||
// Console message?
|
||||
if(isConsole(sender)) {
|
||||
if(!(sender instanceof Player))
|
||||
{
|
||||
if(args.length < 2) return true;
|
||||
String pMessage = args[1];
|
||||
for (int i = 2; i <= args.length - 1; i++) {
|
||||
pMessage = pMessage + " " + args[i];
|
||||
}
|
||||
|
||||
|
||||
String pPrefix = ChatColor.GREEN + "(" + ChatColor.WHITE
|
||||
+ "*Console*" + ChatColor.GREEN + ") ";
|
||||
|
||||
|
||||
log.log(Level.INFO,
|
||||
"[P](" + args[0] + ")" + "<*Console*> "
|
||||
+ pMessage);
|
||||
|
||||
|
||||
for(Player herp : getServer().getOnlinePlayers()) {
|
||||
if(Users.getProfile(herp).inParty()) {
|
||||
log.info(Users.getProfile(herp).getParty());
|
||||
@ -1233,12 +1283,12 @@ public class mcMMO extends JavaPlugin
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if(!mcPermissions.getInstance().party(player)){
|
||||
player.sendMessage(ChatColor.YELLOW+"[mcMMO]"+ChatColor.DARK_RED +mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Not a toggle, a message
|
||||
|
||||
if (args.length >= 1) {
|
||||
@ -1262,7 +1312,7 @@ public class mcMMO extends JavaPlugin
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if(PP.getAdminChatMode())
|
||||
PP.toggleAdminChat();
|
||||
|
||||
@ -1278,27 +1328,28 @@ public class mcMMO extends JavaPlugin
|
||||
}
|
||||
|
||||
else if(label.equalsIgnoreCase("a")){
|
||||
|
||||
|
||||
// Console message?
|
||||
if(isConsole(sender) && args.length >= 1) {
|
||||
if(!(sender instanceof Player) && args.length >= 1)
|
||||
{
|
||||
String aMessage = args[0];
|
||||
for (int i = 1; i <= args.length - 1; i++) {
|
||||
aMessage = aMessage + " " + args[i];
|
||||
}
|
||||
|
||||
|
||||
String aPrefix = ChatColor.AQUA + "{" + ChatColor.WHITE
|
||||
+ "*Console*" + ChatColor.AQUA + "} ";
|
||||
|
||||
|
||||
log.log(Level.INFO, "[A]<*Console*> "
|
||||
+ aMessage);
|
||||
|
||||
|
||||
for (Player herp : getServer().getOnlinePlayers()) {
|
||||
if (mcPermissions.getInstance().adminChat(herp))
|
||||
herp.sendMessage(aPrefix + aMessage);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if(!mcPermissions.getInstance().adminChat(player)){
|
||||
player.sendMessage(ChatColor.YELLOW+"[mcMMO]"+ChatColor.DARK_RED +mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||
return true;
|
||||
@ -1322,7 +1373,7 @@ public class mcMMO extends JavaPlugin
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if(PP.getPartyChatMode())
|
||||
PP.togglePartyChat();
|
||||
|
||||
@ -1383,10 +1434,6 @@ public class mcMMO extends JavaPlugin
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isConsole(CommandSender sender) {
|
||||
return !(sender instanceof Player);
|
||||
}
|
||||
|
||||
public Player getPlayer(String playerName){
|
||||
for(Player herp : getPlayersOnline()){
|
||||
if(herp.getName().toLowerCase().equals(playerName.toLowerCase())){
|
||||
|
Loading…
x
Reference in New Issue
Block a user