mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Release of 1.2.00
This commit is contained in:
parent
a334787209
commit
a814b57311
@ -1,11 +1,13 @@
|
|||||||
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.2.00
|
Version 1.2.00
|
||||||
New mobs added to xp tables
|
Added Fishing Skill
|
||||||
Party leaders can now give bonus xp to nearby party members when grouped provided they are more skilled than their underlings
|
Added Call Of The Wild to Taming
|
||||||
|
Added Arcane Forging to Repair
|
||||||
|
Added new mobs to XP tables
|
||||||
|
Added Master/Apprentice system to the Party system
|
||||||
Animals now give xp to combat skills (those poor sheep ;_;)
|
Animals now give xp to combat skills (those poor sheep ;_;)
|
||||||
Removed unnecessary sorcery permissions from plugin.yml
|
Removed unnecessary sorcery permissions from plugin.yml
|
||||||
Added 'Arcane Forging' subskill to Repair
|
|
||||||
|
|
||||||
Version 1.1.17
|
Version 1.1.17
|
||||||
XP gained in combat is now softcapped by the remaining health of the entity you are damaging, preventing many exploits.
|
XP gained in combat is now softcapped by the remaining health of the entity you are damaging, preventing many exploits.
|
||||||
|
@ -85,6 +85,11 @@ public class Database {
|
|||||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||||
|
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "skills2` (`user_id` int(10) unsigned NOT NULL,"
|
||||||
|
+ "`fishing` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
|
+ "`enchanting` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
|
+ "`alchemy` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
|
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "experience` (`user_id` int(10) unsigned NOT NULL,"
|
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "experience` (`user_id` int(10) unsigned NOT NULL,"
|
||||||
+ "`taming` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`taming` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "`mining` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`mining` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
@ -98,6 +103,11 @@ public class Database {
|
|||||||
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`axes` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
+ "`acrobatics` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||||
|
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "experience2` (`user_id` int(10) unsigned NOT NULL,"
|
||||||
|
+ "`fishing` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
|
+ "`enchanting` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
|
+ "`alchemy` int(10) unsigned NOT NULL DEFAULT '0',"
|
||||||
|
+ "PRIMARY KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
|
||||||
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "spawn` (`user_id` int(10) NOT NULL,"
|
Write("CREATE TABLE IF NOT EXISTS `" + LoadProperties.MySQLtablePrefix + "spawn` (`user_id` int(10) NOT NULL,"
|
||||||
+ "`x` int(64) NOT NULL DEFAULT '0',"
|
+ "`x` int(64) NOT NULL DEFAULT '0',"
|
||||||
+ "`y` int(64) NOT NULL DEFAULT '0',"
|
+ "`y` int(64) NOT NULL DEFAULT '0',"
|
||||||
|
@ -122,6 +122,11 @@ public class Leaderboard
|
|||||||
Taming.add(p, Integer.valueOf(character[24]));
|
Taming.add(p, Integer.valueOf(character[24]));
|
||||||
Plvl += Integer.valueOf(character[24]);
|
Plvl += Integer.valueOf(character[24]);
|
||||||
}
|
}
|
||||||
|
if(character.length > 34 && m.isInt(character[34]))
|
||||||
|
{
|
||||||
|
Fishing.add(p, Integer.valueOf(character[34]));
|
||||||
|
Plvl += Integer.valueOf(character[34]);
|
||||||
|
}
|
||||||
|
|
||||||
PowerLevel.add(p, Plvl);
|
PowerLevel.add(p, Plvl);
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,7 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
|
|||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
import com.gmail.nossr50.locale.mcLocale;
|
||||||
import com.gmail.nossr50.party.Party;
|
import com.gmail.nossr50.party.Party;
|
||||||
|
import com.gmail.nossr50.skills.Fishing;
|
||||||
import com.gmail.nossr50.skills.Repair;
|
import com.gmail.nossr50.skills.Repair;
|
||||||
import com.gmail.nossr50.skills.Skills;
|
import com.gmail.nossr50.skills.Skills;
|
||||||
import com.gmail.nossr50.spout.SpoutStuff;
|
import com.gmail.nossr50.spout.SpoutStuff;
|
||||||
@ -104,6 +105,8 @@ public class Commands
|
|||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming4_0"), mcLocale.getString("m.EffectsTaming4_1")}));
|
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming4_0"), mcLocale.getString("m.EffectsTaming4_1")}));
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming5_0"), mcLocale.getString("m.EffectsTaming5_1")}));
|
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming5_0"), mcLocale.getString("m.EffectsTaming5_1")}));
|
||||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming6_0"), mcLocale.getString("m.EffectsTaming6_1")}));
|
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming6_0"), mcLocale.getString("m.EffectsTaming6_1")}));
|
||||||
|
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming7_0"), mcLocale.getString("m.EffectsTaming7_1")}));
|
||||||
|
player.sendMessage(mcLocale.getString("m.EffectsTaming7_2"));
|
||||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] {mcLocale.getString("m.YourStats")}));
|
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] {mcLocale.getString("m.YourStats")}));
|
||||||
if(PP.getSkillLevel(SkillType.TAMING) < 100)
|
if(PP.getSkillLevel(SkillType.TAMING) < 100)
|
||||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] {mcLocale.getString("m.AbilLockTaming1")}));
|
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] {mcLocale.getString("m.AbilLockTaming1")}));
|
||||||
@ -324,6 +327,24 @@ public class Commands
|
|||||||
player.sendMessage(mcLocale.getString("m.ArcaneForgingMilestones2"));
|
player.sendMessage(mcLocale.getString("m.ArcaneForgingMilestones2"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if(label.equals("fishing")){
|
||||||
|
//float skillvalue = (float)PP.getSkillLevel(SkillType.FISHING);
|
||||||
|
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] {mcLocale.getString("m.SkillFishing")}));
|
||||||
|
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] {mcLocale.getString("m.XPGainFishing")}));
|
||||||
|
if(mcPermissions.getInstance().fishing(player))
|
||||||
|
player.sendMessage(mcLocale.getString("m.LVL", new Object[] {PP.getSkillLevel(SkillType.FISHING), PP.getSkillXpLevel(SkillType.FISHING), PP.getXpToLevel(SkillType.FISHING)}));
|
||||||
|
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] {mcLocale.getString("m.Effects")}));
|
||||||
|
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsFishing1_0"), mcLocale.getString("m.EffectsFishing1_1")}));
|
||||||
|
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsFishing2_0"), mcLocale.getString("m.EffectsFishing2_1")}));
|
||||||
|
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsFishing3_0"), mcLocale.getString("m.EffectsFishing3_1")}));
|
||||||
|
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] {mcLocale.getString("m.YourStats")}));
|
||||||
|
player.sendMessage(mcLocale.getString("m.FishingRank", new Object[] {Fishing.getFishingLootTier(PP)}));
|
||||||
|
player.sendMessage(mcLocale.getString("m.FishingMagicInfo"));
|
||||||
|
if(PP.getSkillLevel(SkillType.FISHING) < 150)
|
||||||
|
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] {mcLocale.getString("m.AbilLockFishing1")}));
|
||||||
|
else
|
||||||
|
player.sendMessage(mcLocale.getString("m.ShakeInfo", new Object[] {Fishing.getFishingLootTier(PP)}));
|
||||||
|
}
|
||||||
else if(label.equalsIgnoreCase("unarmed")){
|
else if(label.equalsIgnoreCase("unarmed")){
|
||||||
String percentage, arrowpercentage;
|
String percentage, arrowpercentage;
|
||||||
float skillvalue = (float)PP.getSkillLevel(SkillType.UNARMED);
|
float skillvalue = (float)PP.getSkillLevel(SkillType.UNARMED);
|
||||||
@ -1074,10 +1095,10 @@ public class Commands
|
|||||||
player.sendMessage(ChatColor.GOLD+"-=MISC SKILLS=-");
|
player.sendMessage(ChatColor.GOLD+"-=MISC SKILLS=-");
|
||||||
if(mcPermissions.getInstance().acrobatics(target))
|
if(mcPermissions.getInstance().acrobatics(target))
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AcrobaticsSkill"), PPt.getSkillLevel(SkillType.ACROBATICS), PPt.getSkillXpLevel(SkillType.ACROBATICS), PPt.getXpToLevel(SkillType.ACROBATICS)));
|
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AcrobaticsSkill"), PPt.getSkillLevel(SkillType.ACROBATICS), PPt.getSkillXpLevel(SkillType.ACROBATICS), PPt.getXpToLevel(SkillType.ACROBATICS)));
|
||||||
if(mcPermissions.getInstance().alchemy(target))
|
//if(mcPermissions.getInstance().alchemy(target))
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AlchemySkill"), PPt.getSkillLevel(SkillType.ALCHEMY), PPt.getSkillXpLevel(SkillType.ALCHEMY), PPt.getXpToLevel(SkillType.ALCHEMY)));
|
//player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AlchemySkill"), PPt.getSkillLevel(SkillType.ALCHEMY), PPt.getSkillXpLevel(SkillType.ALCHEMY), PPt.getXpToLevel(SkillType.ALCHEMY)));
|
||||||
if(mcPermissions.getInstance().enchanting(target))
|
//if(mcPermissions.getInstance().enchanting(target))
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.EnchantingSkill"), PPt.getSkillLevel(SkillType.ENCHANTING), PPt.getSkillXpLevel(SkillType.ENCHANTING), PPt.getXpToLevel(SkillType.ENCHANTING)));
|
//player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.EnchantingSkill"), PPt.getSkillLevel(SkillType.ENCHANTING), PPt.getSkillXpLevel(SkillType.ENCHANTING), PPt.getXpToLevel(SkillType.ENCHANTING)));
|
||||||
if(mcPermissions.getInstance().repair(target))
|
if(mcPermissions.getInstance().repair(target))
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.RepairSkill"), PPt.getSkillLevel(SkillType.REPAIR), PPt.getSkillXpLevel(SkillType.REPAIR), PPt.getXpToLevel(SkillType.REPAIR)));
|
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.RepairSkill"), PPt.getSkillLevel(SkillType.REPAIR), PPt.getSkillXpLevel(SkillType.REPAIR), PPt.getXpToLevel(SkillType.REPAIR)));
|
||||||
|
|
||||||
@ -1130,10 +1151,10 @@ public class Commands
|
|||||||
player.sendMessage(header+"-=MISC SKILLS=-");
|
player.sendMessage(header+"-=MISC SKILLS=-");
|
||||||
if(mcPermissions.getInstance().acrobatics(player))
|
if(mcPermissions.getInstance().acrobatics(player))
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AcrobaticsSkill"), PP.getSkillLevel(SkillType.ACROBATICS), PP.getSkillXpLevel(SkillType.ACROBATICS), PP.getXpToLevel(SkillType.ACROBATICS)));
|
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AcrobaticsSkill"), PP.getSkillLevel(SkillType.ACROBATICS), PP.getSkillXpLevel(SkillType.ACROBATICS), PP.getXpToLevel(SkillType.ACROBATICS)));
|
||||||
if(mcPermissions.getInstance().alchemy(player))
|
//if(mcPermissions.getInstance().alchemy(player))
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AlchemySkill"), PP.getSkillLevel(SkillType.ALCHEMY), PP.getSkillXpLevel(SkillType.ALCHEMY), PP.getXpToLevel(SkillType.ALCHEMY)));
|
//player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.AlchemySkill"), PP.getSkillLevel(SkillType.ALCHEMY), PP.getSkillXpLevel(SkillType.ALCHEMY), PP.getXpToLevel(SkillType.ALCHEMY)));
|
||||||
if(mcPermissions.getInstance().enchanting(player))
|
//if(mcPermissions.getInstance().enchanting(player))
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.EnchantingSkill"), PP.getSkillLevel(SkillType.ENCHANTING), PP.getSkillXpLevel(SkillType.ENCHANTING), PP.getXpToLevel(SkillType.ENCHANTING)));
|
//player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.EnchantingSkill"), PP.getSkillLevel(SkillType.ENCHANTING), PP.getSkillXpLevel(SkillType.ENCHANTING), PP.getXpToLevel(SkillType.ENCHANTING)));
|
||||||
if(mcPermissions.getInstance().repair(player))
|
if(mcPermissions.getInstance().repair(player))
|
||||||
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.RepairSkill"), PP.getSkillLevel(SkillType.REPAIR), PP.getSkillXpLevel(SkillType.REPAIR), PP.getXpToLevel(SkillType.REPAIR)));
|
player.sendMessage(Skills.getSkillStats(mcLocale.getString("mcPlayerListener.RepairSkill"), PP.getSkillLevel(SkillType.REPAIR), PP.getSkillXpLevel(SkillType.REPAIR), PP.getXpToLevel(SkillType.REPAIR)));
|
||||||
}
|
}
|
||||||
|
@ -176,6 +176,15 @@ public class PlayerProfile
|
|||||||
skills.put(SkillType.SWORDS, Integer.valueOf(stats.get(1).get(8)));
|
skills.put(SkillType.SWORDS, Integer.valueOf(stats.get(1).get(8)));
|
||||||
skills.put(SkillType.AXES, Integer.valueOf(stats.get(1).get(9)));
|
skills.put(SkillType.AXES, Integer.valueOf(stats.get(1).get(9)));
|
||||||
skills.put(SkillType.ACROBATICS, Integer.valueOf(stats.get(1).get(10)));
|
skills.put(SkillType.ACROBATICS, Integer.valueOf(stats.get(1).get(10)));
|
||||||
|
HashMap<Integer, ArrayList<String>> stats2 = mcMMO.database.Read("SELECT fishing, enchanting, alchemy FROM "+LoadProperties.MySQLtablePrefix+"skills2 WHERE user_id = " + id);
|
||||||
|
if(stats2.get(1) == null)
|
||||||
|
{
|
||||||
|
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"skills2 (user_id) VALUES ("+id+")");
|
||||||
|
} else {
|
||||||
|
skills.put(SkillType.FISHING, Integer.valueOf(stats2.get(1).get(0)));
|
||||||
|
skills.put(SkillType.ENCHANTING, Integer.valueOf(stats2.get(1).get(1)));
|
||||||
|
skills.put(SkillType.ALCHEMY, Integer.valueOf(stats2.get(1).get(2)));
|
||||||
|
}
|
||||||
HashMap<Integer, ArrayList<String>> experience = mcMMO.database.Read("SELECT taming, mining, repair, woodcutting, unarmed, herbalism, excavation, archery, swords, axes, acrobatics FROM "+LoadProperties.MySQLtablePrefix+"experience WHERE user_id = " + id);
|
HashMap<Integer, ArrayList<String>> experience = mcMMO.database.Read("SELECT taming, mining, repair, woodcutting, unarmed, herbalism, excavation, archery, swords, axes, acrobatics FROM "+LoadProperties.MySQLtablePrefix+"experience WHERE user_id = " + id);
|
||||||
skillsXp.put(SkillType.TAMING, Integer.valueOf(experience.get(1).get(0)));
|
skillsXp.put(SkillType.TAMING, Integer.valueOf(experience.get(1).get(0)));
|
||||||
skillsXp.put(SkillType.MINING, Integer.valueOf(experience.get(1).get(1)));
|
skillsXp.put(SkillType.MINING, Integer.valueOf(experience.get(1).get(1)));
|
||||||
@ -188,6 +197,15 @@ public class PlayerProfile
|
|||||||
skillsXp.put(SkillType.SWORDS, Integer.valueOf(experience.get(1).get(8)));
|
skillsXp.put(SkillType.SWORDS, Integer.valueOf(experience.get(1).get(8)));
|
||||||
skillsXp.put(SkillType.AXES, Integer.valueOf(experience.get(1).get(9)));
|
skillsXp.put(SkillType.AXES, Integer.valueOf(experience.get(1).get(9)));
|
||||||
skillsXp.put(SkillType.ACROBATICS, Integer.valueOf(experience.get(1).get(10)));
|
skillsXp.put(SkillType.ACROBATICS, Integer.valueOf(experience.get(1).get(10)));
|
||||||
|
HashMap<Integer, ArrayList<String>> experience2 = mcMMO.database.Read("SELECT fishing, enchanting, alchemy FROM "+LoadProperties.MySQLtablePrefix+"experience2 WHERE user_id = " + id);
|
||||||
|
if(experience2.get(1) == null)
|
||||||
|
{
|
||||||
|
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"experience2 (user_id) VALUES ("+id+")");
|
||||||
|
} else {
|
||||||
|
skillsXp.put(SkillType.FISHING, Integer.valueOf(experience2.get(1).get(0)));
|
||||||
|
skillsXp.put(SkillType.ENCHANTING, Integer.valueOf(experience2.get(1).get(1)));
|
||||||
|
skillsXp.put(SkillType.ALCHEMY, Integer.valueOf(experience2.get(1).get(2)));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -201,7 +219,9 @@ public class PlayerProfile
|
|||||||
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"cooldowns (user_id) VALUES ("+id+")");
|
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"cooldowns (user_id) VALUES ("+id+")");
|
||||||
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"spawn (user_id) VALUES ("+id+")");
|
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"spawn (user_id) VALUES ("+id+")");
|
||||||
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"skills (user_id) VALUES ("+id+")");
|
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"skills (user_id) VALUES ("+id+")");
|
||||||
|
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"skills2 (user_id) VALUES ("+id+")");
|
||||||
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"experience (user_id) VALUES ("+id+")");
|
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"experience (user_id) VALUES ("+id+")");
|
||||||
|
mcMMO.database.Write("INSERT INTO "+LoadProperties.MySQLtablePrefix+"experience2 (user_id) VALUES ("+id+")");
|
||||||
this.userid = id;
|
this.userid = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,6 +317,10 @@ public class PlayerProfile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(character.length > 34)
|
||||||
|
skills.put(SkillType.FISHING, Integer.valueOf(character[34]));
|
||||||
|
if(character.length > 35)
|
||||||
|
skillsXp.put(SkillType.FISHING, Integer.valueOf(character[35]));
|
||||||
in.close();
|
in.close();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -341,6 +365,11 @@ public class PlayerProfile
|
|||||||
+", axes = "+skills.get(SkillType.AXES)
|
+", axes = "+skills.get(SkillType.AXES)
|
||||||
+", acrobatics = "+skills.get(SkillType.ACROBATICS)
|
+", acrobatics = "+skills.get(SkillType.ACROBATICS)
|
||||||
+" WHERE user_id = "+this.userid);
|
+" WHERE user_id = "+this.userid);
|
||||||
|
mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"skills2 SET "
|
||||||
|
+" fishing = "+skills.get(SkillType.TAMING)
|
||||||
|
+", enchanting = "+skills.get(SkillType.MINING)
|
||||||
|
+", alchemy = "+skills.get(SkillType.REPAIR)
|
||||||
|
+" WHERE user_id = "+this.userid);
|
||||||
mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"experience SET "
|
mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"experience SET "
|
||||||
+" taming = "+skillsXp.get(SkillType.TAMING)
|
+" taming = "+skillsXp.get(SkillType.TAMING)
|
||||||
+", mining = "+skillsXp.get(SkillType.MINING)
|
+", mining = "+skillsXp.get(SkillType.MINING)
|
||||||
@ -354,7 +383,11 @@ public class PlayerProfile
|
|||||||
+", axes = "+skillsXp.get(SkillType.AXES)
|
+", axes = "+skillsXp.get(SkillType.AXES)
|
||||||
+", acrobatics = "+skillsXp.get(SkillType.ACROBATICS)
|
+", acrobatics = "+skillsXp.get(SkillType.ACROBATICS)
|
||||||
+" WHERE user_id = "+this.userid);
|
+" WHERE user_id = "+this.userid);
|
||||||
|
mcMMO.database.Write("UPDATE "+LoadProperties.MySQLtablePrefix+"experience2 SET "
|
||||||
|
+" fishing = "+skills.get(SkillType.TAMING)
|
||||||
|
+", enchanting = "+skills.get(SkillType.MINING)
|
||||||
|
+", alchemy = "+skills.get(SkillType.REPAIR)
|
||||||
|
+" WHERE user_id = "+this.userid);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
// otherwise save to flatfile
|
// otherwise save to flatfile
|
||||||
@ -412,6 +445,8 @@ public class PlayerProfile
|
|||||||
writer.append(String.valueOf(skullSplitterDATS)+":");
|
writer.append(String.valueOf(skullSplitterDATS)+":");
|
||||||
writer.append(String.valueOf(superBreakerDATS)+":");
|
writer.append(String.valueOf(superBreakerDATS)+":");
|
||||||
writer.append(hud.toString()+":");
|
writer.append(hud.toString()+":");
|
||||||
|
writer.append(skills.get(SkillType.FISHING) + ":");
|
||||||
|
writer.append(skillsXp.get(SkillType.FISHING) + ":");
|
||||||
writer.append("\r\n");
|
writer.append("\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -467,6 +502,8 @@ public class PlayerProfile
|
|||||||
out.append(0+":"); //DATS
|
out.append(0+":"); //DATS
|
||||||
out.append(0+":"); //DATS
|
out.append(0+":"); //DATS
|
||||||
out.append(LoadProperties.defaulthud.toString()+":");//HUD
|
out.append(LoadProperties.defaulthud.toString()+":");//HUD
|
||||||
|
out.append(0+":"); //Fishing
|
||||||
|
out.append(0+":"); //FishingXP
|
||||||
|
|
||||||
//Add more in the same format as the line above
|
//Add more in the same format as the line above
|
||||||
|
|
||||||
@ -1032,8 +1069,8 @@ public class PlayerProfile
|
|||||||
|
|
||||||
if(bonusModifier > 0)
|
if(bonusModifier > 0)
|
||||||
{
|
{
|
||||||
if(bonusModifier >= 3)
|
if(bonusModifier >= 2)
|
||||||
bonusModifier = 3;
|
bonusModifier = 2;
|
||||||
|
|
||||||
double trueBonus = bonusModifier * xp;
|
double trueBonus = bonusModifier * xp;
|
||||||
double oldxp = xp;
|
double oldxp = xp;
|
||||||
|
@ -24,6 +24,7 @@ import com.gmail.nossr50.config.LoadProperties;
|
|||||||
import com.gmail.nossr50.spout.SpoutStuff;
|
import com.gmail.nossr50.spout.SpoutStuff;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Statistic;
|
import org.bukkit.Statistic;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
@ -440,8 +441,6 @@ public class mcBlockListener extends BlockListener
|
|||||||
|
|
||||||
public void onBlockFromTo(BlockFromToEvent event)
|
public void onBlockFromTo(BlockFromToEvent event)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
Block blockFrom = event.getBlock();
|
Block blockFrom = event.getBlock();
|
||||||
Block blockTo = event.getToBlock();
|
Block blockTo = event.getToBlock();
|
||||||
if(m.shouldBeWatched(blockFrom) && blockFrom.getData() == (byte)5)
|
if(m.shouldBeWatched(blockFrom) && blockFrom.getData() == (byte)5)
|
||||||
|
@ -52,8 +52,6 @@ public class mcEntityListener extends EntityListener
|
|||||||
|
|
||||||
public void onEntityDamage(EntityDamageEvent event)
|
public void onEntityDamage(EntityDamageEvent event)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if(event.isCancelled())
|
if(event.isCancelled())
|
||||||
return;
|
return;
|
||||||
//Check for world pvp flag
|
//Check for world pvp flag
|
||||||
@ -185,7 +183,6 @@ public class mcEntityListener extends EntityListener
|
|||||||
|
|
||||||
public void onCreatureSpawn(CreatureSpawnEvent event)
|
public void onCreatureSpawn(CreatureSpawnEvent event)
|
||||||
{
|
{
|
||||||
|
|
||||||
SpawnReason reason = event.getSpawnReason();
|
SpawnReason reason = event.getSpawnReason();
|
||||||
|
|
||||||
if(reason == SpawnReason.SPAWNER && !LoadProperties.xpGainsMobSpawners)
|
if(reason == SpawnReason.SPAWNER && !LoadProperties.xpGainsMobSpawners)
|
||||||
|
@ -23,12 +23,16 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.command.ColouredConsoleSender;
|
import org.bukkit.craftbukkit.command.ColouredConsoleSender;
|
||||||
import org.bukkit.craftbukkit.entity.CraftItem;
|
import org.bukkit.craftbukkit.entity.CraftItem;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.entity.AnimalTamer;
|
||||||
import org.bukkit.entity.Fish;
|
import org.bukkit.entity.CreatureType;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.entity.Wolf;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.PlayerChatEvent;
|
||||||
import org.bukkit.event.player.PlayerFishEvent;
|
import org.bukkit.event.player.PlayerFishEvent;
|
||||||
@ -41,8 +45,6 @@ import org.bukkit.event.player.PlayerPickupItemEvent;
|
|||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.material.MaterialData;
|
|
||||||
|
|
||||||
import com.gmail.nossr50.Item;
|
import com.gmail.nossr50.Item;
|
||||||
import com.gmail.nossr50.Users;
|
import com.gmail.nossr50.Users;
|
||||||
import com.gmail.nossr50.m;
|
import com.gmail.nossr50.m;
|
||||||
@ -60,6 +62,7 @@ import com.gmail.nossr50.skills.Fishing;
|
|||||||
import com.gmail.nossr50.skills.Herbalism;
|
import com.gmail.nossr50.skills.Herbalism;
|
||||||
import com.gmail.nossr50.skills.Repair;
|
import com.gmail.nossr50.skills.Repair;
|
||||||
import com.gmail.nossr50.skills.Skills;
|
import com.gmail.nossr50.skills.Skills;
|
||||||
|
import com.gmail.nossr50.skills.Taming;
|
||||||
|
|
||||||
|
|
||||||
public class mcPlayerListener extends PlayerListener
|
public class mcPlayerListener extends PlayerListener
|
||||||
@ -73,17 +76,21 @@ public class mcPlayerListener extends PlayerListener
|
|||||||
plugin = instance;
|
plugin = instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Fishing stuff
|
|
||||||
public void onPlayerFish(PlayerFishEvent event)
|
public void onPlayerFish(PlayerFishEvent event)
|
||||||
{
|
{
|
||||||
Player player = event.getPlayer();
|
if(mcPermissions.getInstance().fishing(event.getPlayer()))
|
||||||
if(mcPermissions.getInstance().fishing(player))
|
|
||||||
{
|
{
|
||||||
if(event.getState() == State.CAUGHT_FISH)
|
if(event.getState() == State.CAUGHT_FISH)
|
||||||
{
|
{
|
||||||
if(event.getCaught() instanceof CraftItem)
|
if(event.getCaught() instanceof CraftItem)
|
||||||
{
|
{
|
||||||
Fishing.getFishingResults(player, event);
|
Fishing.processResults(event);
|
||||||
|
}
|
||||||
|
} else if (event.getState() == State.CAUGHT_ENTITY)
|
||||||
|
{
|
||||||
|
if(Users.getProfile(event.getPlayer()).getSkillLevel(SkillType.FISHING) >= 150 && event.getCaught() instanceof LivingEntity)
|
||||||
|
{
|
||||||
|
Fishing.shakeMob(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,6 +256,43 @@ public class mcPlayerListener extends PlayerListener
|
|||||||
if(m.abilityBlockCheck(event.getClickedBlock()))
|
if(m.abilityBlockCheck(event.getClickedBlock()))
|
||||||
Item.itemchecks(player, plugin);
|
Item.itemchecks(player, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(player.isSneaking() && mcPermissions.getInstance().taming(player) && (action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK))
|
||||||
|
{
|
||||||
|
if(player.getItemInHand().getType() == Material.BONE && player.getItemInHand().getAmount() > 9)
|
||||||
|
{
|
||||||
|
for(Entity x : player.getNearbyEntities(40, 40, 40))
|
||||||
|
{
|
||||||
|
if(x instanceof Wolf)
|
||||||
|
{
|
||||||
|
player.sendMessage(mcLocale.getString("m.TamingSummonFailed"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
World world = player.getWorld();
|
||||||
|
world.spawnCreature(player.getLocation(), CreatureType.WOLF);
|
||||||
|
|
||||||
|
ItemStack[] inventory = player.getInventory().getContents();
|
||||||
|
for(ItemStack x : inventory){
|
||||||
|
if(x != null && x.getType() == Material.BONE){
|
||||||
|
if(x.getAmount() >= 10)
|
||||||
|
{
|
||||||
|
x.setAmount(x.getAmount() - 10);
|
||||||
|
player.getInventory().setContents(inventory);
|
||||||
|
player.updateInventory();
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
x.setAmount(0);
|
||||||
|
x.setTypeId(0);
|
||||||
|
player.getInventory().setContents(inventory);
|
||||||
|
player.updateInventory();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
player.sendMessage(mcLocale.getString("m.TamingSummon"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPlayerChat(PlayerChatEvent event)
|
public void onPlayerChat(PlayerChatEvent event)
|
||||||
|
@ -374,4 +374,23 @@ m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
|||||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||||
|
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
|
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||||
|
m.SkillFishing=FISHING
|
||||||
|
m.XPGainFishing=Fishing (Go figure!)
|
||||||
|
m.EffectsFishing1_0=Treasure Hunter (Passive)
|
||||||
|
m.EffectsFishing1_1=Fish up misc objects
|
||||||
|
m.EffectsFishing2_0=Magic Hunter
|
||||||
|
m.EffectsFishing2_1=Find Enchanted Items
|
||||||
|
m.EffectsFishing3_0=Shake (vs. Entities)
|
||||||
|
m.EffectsFishing3_1=Shake items off of mobs w/ fishing pole
|
||||||
|
m.FishingRank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/5
|
||||||
|
m.FishingMagicInfo=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
|
||||||
|
m.ShakeInfo=[[RED]]Shake: [[YELLOW]]Tear items off mobs, mutilating them in the process ;_;
|
||||||
|
m.AbilLockFishing1=LOCKED UNTIL 150+ SKILL (SHAKE)
|
||||||
|
m.TamingSummon=[[GREEN]]Summoning complete
|
||||||
|
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||||
|
m.EffectsTaming7_0=Call of the Wild
|
||||||
|
m.EffectsTaming7_1=Summon a wolf to your side
|
||||||
|
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
|
@ -368,4 +368,23 @@ m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
|||||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||||
|
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
|
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||||
|
m.SkillFishing=FISHING
|
||||||
|
m.XPGainFishing=Fishing (Go figure!)
|
||||||
|
m.EffectsFishing1_0=Treasure Hunter (Passive)
|
||||||
|
m.EffectsFishing1_1=Fish up misc objects
|
||||||
|
m.EffectsFishing2_0=Magic Hunter
|
||||||
|
m.EffectsFishing2_1=Find Enchanted Items
|
||||||
|
m.EffectsFishing3_0=Shake (vs. Entities)
|
||||||
|
m.EffectsFishing3_1=Shake items off of mobs w/ fishing pole
|
||||||
|
m.FishingRank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/5
|
||||||
|
m.FishingMagicInfo=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
|
||||||
|
m.ShakeInfo=[[RED]]Shake: [[YELLOW]]Tear items off mobs, mutilating them in the process ;_;
|
||||||
|
m.AbilLockFishing1=LOCKED UNTIL 150+ SKILL (SHAKE)
|
||||||
|
m.TamingSummon=[[GREEN]]Summoning complete
|
||||||
|
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||||
|
m.EffectsTaming7_0=Call of the Wild
|
||||||
|
m.EffectsTaming7_1=Summon a wolf to your side
|
||||||
|
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
|
@ -368,4 +368,23 @@ m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
|||||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||||
|
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
|
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||||
|
m.SkillFishing=FISHING
|
||||||
|
m.XPGainFishing=Fishing (Go figure!)
|
||||||
|
m.EffectsFishing1_0=Treasure Hunter (Passive)
|
||||||
|
m.EffectsFishing1_1=Fish up misc objects
|
||||||
|
m.EffectsFishing2_0=Magic Hunter
|
||||||
|
m.EffectsFishing2_1=Find Enchanted Items
|
||||||
|
m.EffectsFishing3_0=Shake (vs. Entities)
|
||||||
|
m.EffectsFishing3_1=Shake items off of mobs w/ fishing pole
|
||||||
|
m.FishingRank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/5
|
||||||
|
m.FishingMagicInfo=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
|
||||||
|
m.ShakeInfo=[[RED]]Shake: [[YELLOW]]Tear items off mobs, mutilating them in the process ;_;
|
||||||
|
m.AbilLockFishing1=LOCKED UNTIL 150+ SKILL (SHAKE)
|
||||||
|
m.TamingSummon=[[GREEN]]Summoning complete
|
||||||
|
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||||
|
m.EffectsTaming7_0=Call of the Wild
|
||||||
|
m.EffectsTaming7_1=Summon a wolf to your side
|
||||||
|
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
|
@ -347,4 +347,23 @@ m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
|||||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||||
|
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
|
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||||
|
m.SkillFishing=FISHING
|
||||||
|
m.XPGainFishing=Fishing (Go figure!)
|
||||||
|
m.EffectsFishing1_0=Treasure Hunter (Passive)
|
||||||
|
m.EffectsFishing1_1=Fish up misc objects
|
||||||
|
m.EffectsFishing2_0=Magic Hunter
|
||||||
|
m.EffectsFishing2_1=Find Enchanted Items
|
||||||
|
m.EffectsFishing3_0=Shake (vs. Entities)
|
||||||
|
m.EffectsFishing3_1=Shake items off of mobs w/ fishing pole
|
||||||
|
m.FishingRank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/5
|
||||||
|
m.FishingMagicInfo=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
|
||||||
|
m.ShakeInfo=[[RED]]Shake: [[YELLOW]]Tear items off mobs, mutilating them in the process ;_;
|
||||||
|
m.AbilLockFishing1=LOCKED UNTIL 150+ SKILL (SHAKE)
|
||||||
|
m.TamingSummon=[[GREEN]]Summoning complete
|
||||||
|
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||||
|
m.EffectsTaming7_0=Call of the Wild
|
||||||
|
m.EffectsTaming7_1=Summon a wolf to your side
|
||||||
|
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
|
@ -368,4 +368,23 @@ m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
|||||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||||
|
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
|
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||||
|
m.SkillFishing=FISHING
|
||||||
|
m.XPGainFishing=Fishing (Go figure!)
|
||||||
|
m.EffectsFishing1_0=Treasure Hunter (Passive)
|
||||||
|
m.EffectsFishing1_1=Fish up misc objects
|
||||||
|
m.EffectsFishing2_0=Magic Hunter
|
||||||
|
m.EffectsFishing2_1=Find Enchanted Items
|
||||||
|
m.EffectsFishing3_0=Shake (vs. Entities)
|
||||||
|
m.EffectsFishing3_1=Shake items off of mobs w/ fishing pole
|
||||||
|
m.FishingRank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/5
|
||||||
|
m.FishingMagicInfo=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
|
||||||
|
m.ShakeInfo=[[RED]]Shake: [[YELLOW]]Tear items off mobs, mutilating them in the process ;_;
|
||||||
|
m.AbilLockFishing1=LOCKED UNTIL 150+ SKILL (SHAKE)
|
||||||
|
m.TamingSummon=[[GREEN]]Summoning complete
|
||||||
|
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||||
|
m.EffectsTaming7_0=Call of the Wild
|
||||||
|
m.EffectsTaming7_1=Summon a wolf to your side
|
||||||
|
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
|
@ -374,4 +374,23 @@ m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
|||||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||||
|
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
|
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||||
|
m.SkillFishing=FISHING
|
||||||
|
m.XPGainFishing=Fishing (Go figure!)
|
||||||
|
m.EffectsFishing1_0=Treasure Hunter (Passive)
|
||||||
|
m.EffectsFishing1_1=Fish up misc objects
|
||||||
|
m.EffectsFishing2_0=Magic Hunter
|
||||||
|
m.EffectsFishing2_1=Find Enchanted Items
|
||||||
|
m.EffectsFishing3_0=Shake (vs. Entities)
|
||||||
|
m.EffectsFishing3_1=Shake items off of mobs w/ fishing pole
|
||||||
|
m.FishingRank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/5
|
||||||
|
m.FishingMagicInfo=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
|
||||||
|
m.ShakeInfo=[[RED]]Shake: [[YELLOW]]Tear items off mobs, mutilating them in the process ;_;
|
||||||
|
m.AbilLockFishing1=LOCKED UNTIL 150+ SKILL (SHAKE)
|
||||||
|
m.TamingSummon=[[GREEN]]Summoning complete
|
||||||
|
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||||
|
m.EffectsTaming7_0=Call of the Wild
|
||||||
|
m.EffectsTaming7_1=Summon a wolf to your side
|
||||||
|
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
|
@ -368,4 +368,23 @@ m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
|||||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||||
|
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
|
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||||
|
m.SkillFishing=FISHING
|
||||||
|
m.XPGainFishing=Fishing (Go figure!)
|
||||||
|
m.EffectsFishing1_0=Treasure Hunter (Passive)
|
||||||
|
m.EffectsFishing1_1=Fish up misc objects
|
||||||
|
m.EffectsFishing2_0=Magic Hunter
|
||||||
|
m.EffectsFishing2_1=Find Enchanted Items
|
||||||
|
m.EffectsFishing3_0=Shake (vs. Entities)
|
||||||
|
m.EffectsFishing3_1=Shake items off of mobs w/ fishing pole
|
||||||
|
m.FishingRank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/5
|
||||||
|
m.FishingMagicInfo=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
|
||||||
|
m.ShakeInfo=[[RED]]Shake: [[YELLOW]]Tear items off mobs, mutilating them in the process ;_;
|
||||||
|
m.AbilLockFishing1=LOCKED UNTIL 150+ SKILL (SHAKE)
|
||||||
|
m.TamingSummon=[[GREEN]]Summoning complete
|
||||||
|
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||||
|
m.EffectsTaming7_0=Call of the Wild
|
||||||
|
m.EffectsTaming7_1=Summon a wolf to your side
|
||||||
|
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
|
@ -39,7 +39,6 @@ m.AbilityLockTemplate=[[GRAY]]{0}
|
|||||||
m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
|
m.AbilityBonusTemplate=[[RED]]{0}: [[YELLOW]]{1}
|
||||||
m.Effects=EFEITOS
|
m.Effects=EFEITOS
|
||||||
m.YourStats=SUAS ESTATISTICAS
|
m.YourStats=SUAS ESTATISTICAS
|
||||||
|
|
||||||
m.SkillTaming=DOMESTICAR
|
m.SkillTaming=DOMESTICAR
|
||||||
m.XPGainTaming=Ataque com um lobo
|
m.XPGainTaming=Ataque com um lobo
|
||||||
m.EffectsTaming1_0=Conhecimento de Feras
|
m.EffectsTaming1_0=Conhecimento de Feras
|
||||||
@ -383,4 +382,23 @@ m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
|||||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||||
|
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
|
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||||
|
m.SkillFishing=FISHING
|
||||||
|
m.XPGainFishing=Fishing (Go figure!)
|
||||||
|
m.EffectsFishing1_0=Treasure Hunter (Passive)
|
||||||
|
m.EffectsFishing1_1=Fish up misc objects
|
||||||
|
m.EffectsFishing2_0=Magic Hunter
|
||||||
|
m.EffectsFishing2_1=Find Enchanted Items
|
||||||
|
m.EffectsFishing3_0=Shake (vs. Entities)
|
||||||
|
m.EffectsFishing3_1=Shake items off of mobs w/ fishing pole
|
||||||
|
m.FishingRank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/5
|
||||||
|
m.FishingMagicInfo=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
|
||||||
|
m.ShakeInfo=[[RED]]Shake: [[YELLOW]]Tear items off mobs, mutilating them in the process ;_;
|
||||||
|
m.AbilLockFishing1=LOCKED UNTIL 150+ SKILL (SHAKE)
|
||||||
|
m.TamingSummon=[[GREEN]]Summoning complete
|
||||||
|
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||||
|
m.EffectsTaming7_0=Call of the Wild
|
||||||
|
m.EffectsTaming7_1=Summon a wolf to your side
|
||||||
|
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
|
@ -360,4 +360,23 @@ m.ArcaneForgingRank=[[RED]]Arcane Forging: [[YELLOW]]Rank {0}/4
|
|||||||
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
m.ArcaneEnchantKeepChance=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
|
||||||
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
m.ArcaneEnchantDowngradeChance=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
|
||||||
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
m.ArcaneForgingMilestones=[[GOLD]][TIP] AF Rank Ups: [[GRAY]]Rank 1 = 100+, Rank 2 = 250+,
|
||||||
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
m.ArcaneForgingMilestones2=[[GRAY]] Rank 3 = 500+, Rank 4 = 750+
|
||||||
|
Fishing.MagicFound=[[GRAY]]You feel a touch of magic with this catch...
|
||||||
|
Fishing.ItemFound=[[GRAY]]Treasure found!
|
||||||
|
m.SkillFishing=FISHING
|
||||||
|
m.XPGainFishing=Fishing (Go figure!)
|
||||||
|
m.EffectsFishing1_0=Treasure Hunter (Passive)
|
||||||
|
m.EffectsFishing1_1=Fish up misc objects
|
||||||
|
m.EffectsFishing2_0=Magic Hunter
|
||||||
|
m.EffectsFishing2_1=Find Enchanted Items
|
||||||
|
m.EffectsFishing3_0=Shake (vs. Entities)
|
||||||
|
m.EffectsFishing3_1=Shake items off of mobs w/ fishing pole
|
||||||
|
m.FishingRank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/5
|
||||||
|
m.FishingMagicInfo=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
|
||||||
|
m.ShakeInfo=[[RED]]Shake: [[YELLOW]]Tear items off mobs, mutilating them in the process ;_;
|
||||||
|
m.AbilLockFishing1=LOCKED UNTIL 150+ SKILL (SHAKE)
|
||||||
|
m.TamingSummon=[[GREEN]]Summoning complete
|
||||||
|
m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more.
|
||||||
|
m.EffectsTaming7_0=Call of the Wild
|
||||||
|
m.EffectsTaming7_1=Summon a wolf to your side
|
||||||
|
m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand
|
@ -117,6 +117,8 @@ public class m
|
|||||||
x+=PP.getSkillLevel(SkillType.ACROBATICS);
|
x+=PP.getSkillLevel(SkillType.ACROBATICS);
|
||||||
if(mcPermissions.getInstance().repair(player))
|
if(mcPermissions.getInstance().repair(player))
|
||||||
x+=PP.getSkillLevel(SkillType.REPAIR);
|
x+=PP.getSkillLevel(SkillType.REPAIR);
|
||||||
|
if(mcPermissions.getInstance().fishing(player))
|
||||||
|
x+=PP.getSkillLevel(SkillType.FISHING);
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
package com.gmail.nossr50.skills;
|
package com.gmail.nossr50.skills;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||||
|
@ -1,14 +1,26 @@
|
|||||||
package com.gmail.nossr50.skills;
|
package com.gmail.nossr50.skills;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.World;
|
||||||
import org.bukkit.craftbukkit.entity.CraftItem;
|
import org.bukkit.craftbukkit.entity.CraftItem;
|
||||||
|
import org.bukkit.enchantments.Enchantment;
|
||||||
|
import org.bukkit.entity.Chicken;
|
||||||
|
import org.bukkit.entity.Cow;
|
||||||
|
import org.bukkit.entity.Creeper;
|
||||||
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
import org.bukkit.entity.Pig;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.entity.Sheep;
|
||||||
|
import org.bukkit.entity.Skeleton;
|
||||||
|
import org.bukkit.entity.Spider;
|
||||||
import org.bukkit.event.player.PlayerFishEvent;
|
import org.bukkit.event.player.PlayerFishEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.material.Wool;
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
import com.gmail.nossr50.Users;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||||
import com.gmail.nossr50.datatypes.SkillType;
|
import com.gmail.nossr50.datatypes.SkillType;
|
||||||
|
import com.gmail.nossr50.locale.mcLocale;
|
||||||
|
|
||||||
public class Fishing {
|
public class Fishing {
|
||||||
|
|
||||||
@ -37,24 +49,8 @@ public class Fishing {
|
|||||||
|
|
||||||
public static short getItemMaxDurability(Material mat)
|
public static short getItemMaxDurability(Material mat)
|
||||||
{
|
{
|
||||||
//Return the max durability of an item
|
|
||||||
|
|
||||||
//KEY
|
|
||||||
//TOOLS
|
|
||||||
//GOLD = 33, WOOD = 60, STONE = 132, IRON = 251, DIAMOND = 1562
|
|
||||||
//HELMETS
|
|
||||||
//LEATHER = 34, CHAINMAIL = 67, GOLD = 68, IRON = 136, DIAMOND = 272
|
|
||||||
//CHESTPLATES
|
|
||||||
//LEATHER = 49, CHAINMAIL = 96, GOLD = 96, IRON = 192, DIAMOND = 384
|
|
||||||
//LEGGINGS
|
|
||||||
//LEATHER = 46, CHAINMAIL = 92, GOLD = 92, IRON = 184, DIAMOND = 368
|
|
||||||
//BOOTS
|
|
||||||
//LEATHER = 40, CHAINMAIL = 79, GOLD = 80, IRON = 160, DIAMOND = 320
|
|
||||||
|
|
||||||
|
|
||||||
switch(mat)
|
switch(mat)
|
||||||
{
|
{
|
||||||
//Leather Items
|
|
||||||
case LEATHER_BOOTS:
|
case LEATHER_BOOTS:
|
||||||
return (short) 40;
|
return (short) 40;
|
||||||
case LEATHER_LEGGINGS:
|
case LEATHER_LEGGINGS:
|
||||||
@ -63,8 +59,90 @@ public class Fishing {
|
|||||||
return (short) 34;
|
return (short) 34;
|
||||||
case LEATHER_CHESTPLATE:
|
case LEATHER_CHESTPLATE:
|
||||||
return (short) 49;
|
return (short) 49;
|
||||||
|
case CHAINMAIL_BOOTS:
|
||||||
|
return (short) 79;
|
||||||
|
case CHAINMAIL_LEGGINGS:
|
||||||
|
return (short) 92;
|
||||||
|
case CHAINMAIL_HELMET:
|
||||||
|
return (short) 67;
|
||||||
|
case CHAINMAIL_CHESTPLATE:
|
||||||
|
return (short) 96;
|
||||||
|
case GOLD_BOOTS:
|
||||||
|
return (short) 80;
|
||||||
|
case GOLD_LEGGINGS:
|
||||||
|
return (short) 92;
|
||||||
|
case GOLD_HELMET:
|
||||||
|
return (short) 68;
|
||||||
|
case GOLD_CHESTPLATE:
|
||||||
|
return (short) 96;
|
||||||
|
case IRON_BOOTS:
|
||||||
|
return (short) 160;
|
||||||
|
case IRON_LEGGINGS:
|
||||||
|
return (short) 184;
|
||||||
|
case IRON_HELMET:
|
||||||
|
return (short) 136;
|
||||||
|
case IRON_CHESTPLATE:
|
||||||
|
return (short) 192;
|
||||||
|
case DIAMOND_BOOTS:
|
||||||
|
return (short) 320;
|
||||||
|
case DIAMOND_LEGGINGS:
|
||||||
|
return (short) 368;
|
||||||
|
case DIAMOND_HELMET:
|
||||||
|
return (short) 272;
|
||||||
|
case DIAMOND_CHESTPLATE:
|
||||||
|
return (short) 384;
|
||||||
|
case GOLD_AXE:
|
||||||
|
return (short) 33;
|
||||||
|
case GOLD_SWORD:
|
||||||
|
return (short) 33;
|
||||||
|
case GOLD_HOE:
|
||||||
|
return (short) 33;
|
||||||
|
case GOLD_SPADE:
|
||||||
|
return (short) 33;
|
||||||
|
case GOLD_PICKAXE:
|
||||||
|
return (short) 33;
|
||||||
|
case WOOD_AXE:
|
||||||
|
return (short) 60;
|
||||||
|
case WOOD_SWORD:
|
||||||
|
return (short) 60;
|
||||||
|
case WOOD_HOE:
|
||||||
|
return (short) 60;
|
||||||
|
case WOOD_SPADE:
|
||||||
|
return (short) 60;
|
||||||
|
case WOOD_PICKAXE:
|
||||||
|
return (short) 60;
|
||||||
|
case STONE_AXE:
|
||||||
|
return (short) 132;
|
||||||
|
case STONE_SWORD:
|
||||||
|
return (short) 132;
|
||||||
|
case STONE_HOE:
|
||||||
|
return (short) 132;
|
||||||
|
case STONE_SPADE:
|
||||||
|
return (short) 132;
|
||||||
|
case STONE_PICKAXE:
|
||||||
|
return (short) 132;
|
||||||
|
case IRON_AXE:
|
||||||
|
return (short) 251;
|
||||||
|
case IRON_SWORD:
|
||||||
|
return (short) 251;
|
||||||
|
case IRON_HOE:
|
||||||
|
return (short) 251;
|
||||||
|
case IRON_SPADE:
|
||||||
|
return (short) 251;
|
||||||
|
case IRON_PICKAXE:
|
||||||
|
return (short) 251;
|
||||||
|
case DIAMOND_AXE:
|
||||||
|
return (short) 1562;
|
||||||
|
case DIAMOND_SWORD:
|
||||||
|
return (short) 1562;
|
||||||
|
case DIAMOND_HOE:
|
||||||
|
return (short) 1562;
|
||||||
|
case DIAMOND_SPADE:
|
||||||
|
return (short) 1562;
|
||||||
|
case DIAMOND_PICKAXE:
|
||||||
|
return (short) 1562;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return (short) 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,27 +152,27 @@ public class Fishing {
|
|||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
getFishingResultsTier1(player, event);
|
getFishingResultsTier1(player, event);
|
||||||
Users.getProfile(player).addXP(SkillType.FISHING, 200, player);
|
Users.getProfile(player).addXP(SkillType.FISHING, 1500, player);
|
||||||
player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.RAW_FISH, 1));
|
player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.RAW_FISH, 1));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
getFishingResultsTier2(player, event);
|
getFishingResultsTier2(player, event);
|
||||||
Users.getProfile(player).addXP(SkillType.FISHING, 400, player);
|
Users.getProfile(player).addXP(SkillType.FISHING, 1500, player);
|
||||||
player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.RAW_FISH, 2));
|
player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.RAW_FISH, 2));
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
getFishingResultsTier3(player, event);
|
getFishingResultsTier3(player, event);
|
||||||
Users.getProfile(player).addXP(SkillType.FISHING, 600, player);
|
Users.getProfile(player).addXP(SkillType.FISHING, 1500, player);
|
||||||
player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.RAW_FISH, 3));
|
player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.RAW_FISH, 3));
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
getFishingResultsTier4(player, event);
|
getFishingResultsTier4(player, event);
|
||||||
Users.getProfile(player).addXP(SkillType.FISHING, 800, player);
|
Users.getProfile(player).addXP(SkillType.FISHING, 1500, player);
|
||||||
player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.RAW_FISH, 4));
|
player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.RAW_FISH, 4));
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
getFishingResultsTier5(player, event);
|
getFishingResultsTier5(player, event);
|
||||||
Users.getProfile(player).addXP(SkillType.FISHING, 1000, player);
|
Users.getProfile(player).addXP(SkillType.FISHING, 1500, player);
|
||||||
player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.RAW_FISH, 5));
|
player.getWorld().dropItem(player.getLocation(), new ItemStack(Material.RAW_FISH, 5));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -103,58 +181,59 @@ public class Fishing {
|
|||||||
|
|
||||||
private static void getFishingResultsTier1(Player player, PlayerFishEvent event)
|
private static void getFishingResultsTier1(Player player, PlayerFishEvent event)
|
||||||
{
|
{
|
||||||
//About 12 items for Tier 1
|
|
||||||
int randomNum = (int)(Math.random() * 14);
|
int randomNum = (int)(Math.random() * 14);
|
||||||
CraftItem theCatch = (CraftItem)event.getCaught();
|
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||||
|
|
||||||
switch(randomNum)
|
if(Math.random() * 100 < 20)
|
||||||
{
|
{
|
||||||
//Armors
|
switch(randomNum)
|
||||||
case 1:
|
{
|
||||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_BOOTS, 1));
|
case 1:
|
||||||
break;
|
theCatch.setItemStack(new ItemStack(Material.LEATHER_BOOTS, 1));
|
||||||
case 2:
|
break;
|
||||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1));
|
case 2:
|
||||||
break;
|
theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1));
|
||||||
case 3:
|
break;
|
||||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1));
|
case 3:
|
||||||
break;
|
theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1));
|
||||||
case 4:
|
break;
|
||||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1));
|
case 4:
|
||||||
break;
|
theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1));
|
||||||
//Tools
|
break;
|
||||||
//WOOD TOOLS
|
case 5:
|
||||||
case 5:
|
theCatch.setItemStack(new ItemStack(Material.WOOD_AXE, 1));
|
||||||
theCatch.setItemStack(new ItemStack(Material.WOOD_AXE, 1));
|
break;
|
||||||
break;
|
case 6:
|
||||||
case 6:
|
theCatch.setItemStack(new ItemStack(Material.WOOD_PICKAXE, 1));
|
||||||
theCatch.setItemStack(new ItemStack(Material.WOOD_PICKAXE, 1));
|
break;
|
||||||
break;
|
case 7:
|
||||||
case 7:
|
theCatch.setItemStack(new ItemStack(Material.WOOD_SWORD, 1));
|
||||||
theCatch.setItemStack(new ItemStack(Material.WOOD_SWORD, 1));
|
break;
|
||||||
break;
|
case 8:
|
||||||
case 8:
|
theCatch.setItemStack(new ItemStack(Material.WOOD_HOE, 1));
|
||||||
theCatch.setItemStack(new ItemStack(Material.WOOD_HOE, 1));
|
break;
|
||||||
break;
|
case 9:
|
||||||
case 9:
|
theCatch.setItemStack(new ItemStack(Material.WOOD_SPADE, 1));
|
||||||
theCatch.setItemStack(new ItemStack(Material.WOOD_SPADE, 1));
|
break;
|
||||||
break;
|
case 10:
|
||||||
//STONE TOOLS
|
theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1));
|
||||||
case 10:
|
break;
|
||||||
theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1));
|
case 11:
|
||||||
break;
|
theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1));
|
||||||
case 11:
|
break;
|
||||||
theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1));
|
case 12:
|
||||||
break;
|
theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1));
|
||||||
case 12:
|
break;
|
||||||
theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1));
|
case 13:
|
||||||
break;
|
theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1));
|
||||||
case 13:
|
break;
|
||||||
theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1));
|
case 14:
|
||||||
break;
|
theCatch.setItemStack(new ItemStack(Material.STONE_SPADE, 1));
|
||||||
case 14:
|
break;
|
||||||
theCatch.setItemStack(new ItemStack(Material.STONE_SPADE, 1));
|
}
|
||||||
break;
|
} else
|
||||||
|
{
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||||
}
|
}
|
||||||
//Change durability to random value
|
//Change durability to random value
|
||||||
theCatch.getItemStack().setDurability((short) (Math.random() * Fishing.getItemMaxDurability(theCatch.getItemStack().getType()))); //Change the damage value
|
theCatch.getItemStack().setDurability((short) (Math.random() * Fishing.getItemMaxDurability(theCatch.getItemStack().getType()))); //Change the damage value
|
||||||
@ -163,21 +242,559 @@ public class Fishing {
|
|||||||
|
|
||||||
private static void getFishingResultsTier2(Player player, PlayerFishEvent event)
|
private static void getFishingResultsTier2(Player player, PlayerFishEvent event)
|
||||||
{
|
{
|
||||||
|
int randomNum = (int)(Math.random() * 19);
|
||||||
|
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||||
|
|
||||||
|
if(Math.random() * 100 < 25)
|
||||||
|
{
|
||||||
|
switch(randomNum)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.LEATHER_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.STONE_SPADE, 1));
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 19:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RAW_FISH, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
//Change durability to random value
|
||||||
|
theCatch.getItemStack().setDurability((short) (Math.random() * Fishing.getItemMaxDurability(theCatch.getItemStack().getType())));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void getFishingResultsTier3(Player player, PlayerFishEvent event)
|
private static void getFishingResultsTier3(Player player, PlayerFishEvent event)
|
||||||
{
|
{
|
||||||
|
int randomNum = (int)(Math.random() * 23);
|
||||||
|
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||||
|
|
||||||
|
if(Math.random() * 100 < 30)
|
||||||
|
{
|
||||||
|
switch(randomNum)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1));
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 19:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1));
|
||||||
|
break;
|
||||||
|
case 21:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1));
|
||||||
|
break;
|
||||||
|
case 22:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1));
|
||||||
|
break;
|
||||||
|
case 23:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_5, 1));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RAW_FISH, 1));
|
||||||
|
}
|
||||||
|
//Change durability to random value
|
||||||
|
theCatch.getItemStack().setDurability((short) (Math.random() * Fishing.getItemMaxDurability(theCatch.getItemStack().getType())));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void getFishingResultsTier4(Player player, PlayerFishEvent event)
|
private static void getFishingResultsTier4(Player player, PlayerFishEvent event)
|
||||||
{
|
{
|
||||||
|
int randomNum = (int)(Math.random() * 40);
|
||||||
|
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||||
|
|
||||||
|
if(Math.random() * 100 < 35)
|
||||||
|
{
|
||||||
|
switch(randomNum)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1));
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 19:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1));
|
||||||
|
break;
|
||||||
|
case 21:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1));
|
||||||
|
break;
|
||||||
|
case 22:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1));
|
||||||
|
break;
|
||||||
|
case 23:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_5, 1));
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 25:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 26:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 27:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 28:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 29:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 30:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 31:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1));
|
||||||
|
break;
|
||||||
|
case 33:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_6, 1));
|
||||||
|
break;
|
||||||
|
case 34:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_7, 1));
|
||||||
|
break;
|
||||||
|
case 35:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_8, 1));
|
||||||
|
break;
|
||||||
|
case 36:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_9, 1));
|
||||||
|
break;
|
||||||
|
case 37:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_10, 1));
|
||||||
|
break;
|
||||||
|
case 38:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_11, 1));
|
||||||
|
break;
|
||||||
|
case 39:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.REDSTONE_WIRE, 64));
|
||||||
|
break;
|
||||||
|
case 40:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND, (int)(Math.random() * 10)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RAW_FISH, 1));
|
||||||
|
}
|
||||||
|
//Change durability to random value
|
||||||
|
theCatch.getItemStack().setDurability((short) (Math.random() * Fishing.getItemMaxDurability(theCatch.getItemStack().getType())));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void getFishingResultsTier5(Player player, PlayerFishEvent event)
|
private static void getFishingResultsTier5(Player player, PlayerFishEvent event)
|
||||||
{
|
{
|
||||||
|
int randomNum = (int)(Math.random() * 49);
|
||||||
|
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||||
|
|
||||||
|
if(Math.random() * 100 < 40)
|
||||||
|
{
|
||||||
|
switch(randomNum)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1));
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 19:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1));
|
||||||
|
break;
|
||||||
|
case 21:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1));
|
||||||
|
break;
|
||||||
|
case 22:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1));
|
||||||
|
break;
|
||||||
|
case 23:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_5, 1));
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 25:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 26:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 27:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 28:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 29:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 30:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 31:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1));
|
||||||
|
break;
|
||||||
|
case 33:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_6, 1));
|
||||||
|
break;
|
||||||
|
case 34:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_7, 1));
|
||||||
|
break;
|
||||||
|
case 35:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_8, 1));
|
||||||
|
break;
|
||||||
|
case 36:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_9, 1));
|
||||||
|
break;
|
||||||
|
case 37:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_10, 1));
|
||||||
|
break;
|
||||||
|
case 38:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RECORD_11, 1));
|
||||||
|
break;
|
||||||
|
case 39:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.REDSTONE_WIRE, 64));
|
||||||
|
break;
|
||||||
|
case 40:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND, (int)(Math.random() * 20)));
|
||||||
|
break;
|
||||||
|
case 41:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1));
|
||||||
|
break;
|
||||||
|
case 42:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1));
|
||||||
|
break;
|
||||||
|
case 43:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
|
||||||
|
break;
|
||||||
|
case 44:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
|
||||||
|
break;
|
||||||
|
case 45:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1));
|
||||||
|
break;
|
||||||
|
case 46:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1));
|
||||||
|
break;
|
||||||
|
case 47:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1));
|
||||||
|
break;
|
||||||
|
case 48:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1));
|
||||||
|
break;
|
||||||
|
case 49:
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
theCatch.setItemStack(new ItemStack(Material.RAW_FISH, 1));
|
||||||
|
}
|
||||||
|
//Change durability to random value
|
||||||
|
theCatch.getItemStack().setDurability((short) (Math.random() * Fishing.getItemMaxDurability(theCatch.getItemStack().getType())));
|
||||||
|
}
|
||||||
|
public static void processResults(PlayerFishEvent event)
|
||||||
|
{
|
||||||
|
Player player = event.getPlayer();
|
||||||
|
PlayerProfile PP = Users.getProfile(player);
|
||||||
|
|
||||||
|
Fishing.getFishingResults(player, event);
|
||||||
|
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||||
|
|
||||||
|
if(theCatch.getItemStack().getType() != Material.RAW_FISH)
|
||||||
|
{
|
||||||
|
//Inform the player they retrieved a treasure...
|
||||||
|
player.sendMessage(mcLocale.getString("Fishing.ItemFound"));
|
||||||
|
|
||||||
|
//Keep track of whether or not the treasure is enchanted
|
||||||
|
boolean enchanted = false;
|
||||||
|
|
||||||
|
ItemStack fishingResults = theCatch.getItemStack();
|
||||||
|
if(Repair.isArmor(fishingResults) || Repair.isTools(fishingResults))
|
||||||
|
{
|
||||||
|
//Fishing up items will have a 10% chance to enter them into random enchantment lottery
|
||||||
|
if(Math.random() * 100 < 10)
|
||||||
|
{
|
||||||
|
for(Enchantment x : Enchantment.values())
|
||||||
|
{
|
||||||
|
if(x.canEnchantItem(fishingResults))
|
||||||
|
{
|
||||||
|
//Actual chance to have an enchantment is related to your fishing skill
|
||||||
|
if(Math.random() * 15 < Fishing.getFishingLootTier(PP))
|
||||||
|
{
|
||||||
|
enchanted = true;
|
||||||
|
fishingResults.addEnchantment(x, (int)(Math.random() * x.getMaxLevel()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Inform the player of magical properties
|
||||||
|
if(enchanted)
|
||||||
|
{
|
||||||
|
player.sendMessage(mcLocale.getString("Fishing.MagicFound"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static void shakeMob(PlayerFishEvent event)
|
||||||
|
{
|
||||||
|
LivingEntity le = (LivingEntity)event.getCaught();
|
||||||
|
if(le instanceof Player)
|
||||||
|
return;
|
||||||
|
le.damage(1);
|
||||||
|
World world = le.getWorld();
|
||||||
|
|
||||||
|
if(le instanceof Sheep)
|
||||||
|
{
|
||||||
|
Sheep sheep = (Sheep)le;
|
||||||
|
if(!sheep.isSheared())
|
||||||
|
{
|
||||||
|
Wool wool = new Wool();
|
||||||
|
wool.setColor(sheep.getColor());
|
||||||
|
ItemStack theWool = wool.toItemStack();
|
||||||
|
theWool.setAmount((int)(Math.random() * 6));
|
||||||
|
world.dropItemNaturally(le.getLocation(), theWool);
|
||||||
|
sheep.setSheared(true);
|
||||||
|
}
|
||||||
|
} else if(le instanceof Pig)
|
||||||
|
{
|
||||||
|
world.dropItemNaturally(le.getLocation(), new ItemStack(Material.PORK, 1));
|
||||||
|
} else if(le instanceof Skeleton)
|
||||||
|
{
|
||||||
|
if(Math.random() * 10 < 5)
|
||||||
|
world.dropItemNaturally(le.getLocation(), new ItemStack(Material.BONE, 1));
|
||||||
|
else
|
||||||
|
world.dropItemNaturally(le.getLocation(), new ItemStack(Material.ARROW, 3));
|
||||||
|
} else if(le instanceof Cow)
|
||||||
|
{
|
||||||
|
world.dropItemNaturally(le.getLocation(), new ItemStack(Material.LEATHER, 1));
|
||||||
|
} else if(le instanceof Spider)
|
||||||
|
{
|
||||||
|
if(Math.random() * 10 < 5)
|
||||||
|
world.dropItemNaturally(le.getLocation(), new ItemStack(Material.SPIDER_EYE, 1));
|
||||||
|
else
|
||||||
|
world.dropItemNaturally(le.getLocation(), new ItemStack(Material.STRING, 1));
|
||||||
|
} else if(le instanceof Chicken)
|
||||||
|
{
|
||||||
|
if(Math.random() * 10 < 5)
|
||||||
|
world.dropItemNaturally(le.getLocation(), new ItemStack(Material.FEATHER, 1));
|
||||||
|
else
|
||||||
|
world.dropItemNaturally(le.getLocation(), new ItemStack(Material.EGG, 1));
|
||||||
|
} else if(le instanceof Creeper)
|
||||||
|
{
|
||||||
|
world.dropItemNaturally(le.getLocation(), new ItemStack(Material.SULPHUR, 1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,8 +69,6 @@ public class Repair {
|
|||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("[mcMMO] Enchantments stored!");
|
|
||||||
|
|
||||||
if(block != null && mcPermissions.getInstance().repair(player)){
|
if(block != null && mcPermissions.getInstance().repair(player)){
|
||||||
if(player.getItemInHand().getDurability() > 0 && player.getItemInHand().getAmount() < 2){
|
if(player.getItemInHand().getDurability() > 0 && player.getItemInHand().getAmount() < 2){
|
||||||
/*
|
/*
|
||||||
@ -296,9 +294,13 @@ public class Repair {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean failure = false, downgrade = false;
|
boolean failure = false, downgrade = false;
|
||||||
|
|
||||||
for(Enchantment x : enchants)
|
for(Enchantment x : enchants)
|
||||||
{
|
{
|
||||||
|
//Remove enchant
|
||||||
|
if(is.getEnchantments().containsKey(x))
|
||||||
|
is.removeEnchantment(x);
|
||||||
|
|
||||||
if(x.canEnchantItem(is))
|
if(x.canEnchantItem(is))
|
||||||
{
|
{
|
||||||
if(Math.random() * 100 <= getEnchantChance(rank))
|
if(Math.random() * 100 <= getEnchantChance(rank))
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: mcMMO
|
name: mcMMO
|
||||||
main: com.gmail.nossr50.mcMMO
|
main: com.gmail.nossr50.mcMMO
|
||||||
version: 1.2.00 WIP #1
|
version: 1.2.00
|
||||||
softdepend: [Spout]
|
softdepend: [Spout]
|
||||||
author: nossr50
|
author: nossr50
|
||||||
description: mcMMO takes core Minecraft game mechanics and expands them to add an extensive RPG experience, the goal of the project has always been a quality RPG experience. Everything in mcMMO is carefully thought out and is constantly improving. mcMMO adds eleven skills to train in and level in, while also offering a high level of customization for server admins. There are countless features, including custom sounds, graphical elements, and more added when running mcMMO in conjunction with Spout. I carefully read feedback and evaluate the mechanics of mcMMO in every update to provide an ever-evolving experience.
|
description: mcMMO takes core Minecraft game mechanics and expands them to add an extensive RPG experience, the goal of the project has always been a quality RPG experience. Everything in mcMMO is carefully thought out and is constantly improving. mcMMO adds eleven skills to train in and level in, while also offering a high level of customization for server admins. There are countless features, including custom sounds, graphical elements, and more added when running mcMMO in conjunction with Spout. I carefully read feedback and evaluate the mechanics of mcMMO in every update to provide an ever-evolving experience.
|
||||||
@ -82,6 +82,8 @@ commands:
|
|||||||
description: Detailed skill info
|
description: Detailed skill info
|
||||||
repair:
|
repair:
|
||||||
description: Detailed skill info
|
description: Detailed skill info
|
||||||
|
fishing:
|
||||||
|
description: Detailed skill info
|
||||||
a:
|
a:
|
||||||
description: Toggle Admin chat or send admin chat messages
|
description: Toggle Admin chat or send admin chat messages
|
||||||
permission: mcmmo.chat.adminchat
|
permission: mcmmo.chat.adminchat
|
||||||
|
Loading…
Reference in New Issue
Block a user