mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
Merge remote branch 'org.eclipse.jgit.transport.RemoteConfig@10a3c73/master' into pullme
This commit is contained in:
commit
bb76b9765a
@ -9,6 +9,7 @@ Version 1.2.09-dev
|
||||
- Changed to fire EntityDamageEvents for all damage done by mcMMO
|
||||
- New custom event for developers McMMOPlayerLevelUpEvent
|
||||
- New custom event for developers McMMOItemSpawnEvent
|
||||
- Changed LoadProperties from the old Configuration to FileConfiguration
|
||||
|
||||
Version 1.2.08
|
||||
- Changed Bukkit events to new event system
|
||||
|
@ -16,8 +16,11 @@
|
||||
*/
|
||||
package com.gmail.nossr50.config;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import java.io.File;
|
||||
import org.bukkit.util.config.Configuration;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
import com.gmail.nossr50.datatypes.HUDType;
|
||||
|
||||
@ -54,21 +57,27 @@ public class LoadProperties
|
||||
archeryxpmodifier, swordsxpmodifier, axesxpmodifier, acrobaticsxpmodifier;
|
||||
|
||||
public static HUDType defaulthud;
|
||||
protected static File configFile;
|
||||
protected static File dataFolder;
|
||||
protected final mcMMO plugin;
|
||||
protected static FileConfiguration config;
|
||||
|
||||
public String directory = "plugins/mcMMO/";
|
||||
|
||||
File file = new File(directory + File.separator + "config.yml");
|
||||
static Configuration config = null;
|
||||
public LoadProperties(mcMMO plugin)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
dataFolder = plugin.getDataFolder();
|
||||
configFile = new File(dataFolder, "config.yml");
|
||||
}
|
||||
|
||||
public void configCheck()
|
||||
{
|
||||
new File(directory).mkdir();
|
||||
config = load();
|
||||
if(!file.exists())
|
||||
load();
|
||||
if(!configFile.exists())
|
||||
{
|
||||
try
|
||||
{
|
||||
file.createNewFile();
|
||||
configFile.getParentFile().mkdir();
|
||||
configFile.createNewFile();
|
||||
addDefaults();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -84,27 +93,26 @@ public class LoadProperties
|
||||
private void write(String root, Object x)
|
||||
{
|
||||
//Configuration config = load();
|
||||
config.setProperty(root, x);
|
||||
config.save();
|
||||
config.set(root, x);
|
||||
}
|
||||
private Boolean readBoolean(String root, Boolean def)
|
||||
{
|
||||
//Configuration config = load();
|
||||
Boolean result = config.getBoolean(root, def);
|
||||
config.save();
|
||||
saveConfig();
|
||||
return result;
|
||||
}
|
||||
private Double readDouble(String root, Double def)
|
||||
{
|
||||
Double result = config.getDouble(root, def);
|
||||
config.save();
|
||||
saveConfig();
|
||||
return result;
|
||||
}
|
||||
private Integer readInteger(String root, Integer def)
|
||||
{
|
||||
//Configuration config = load();
|
||||
Integer result = config.getInt(root, def);
|
||||
config.save();
|
||||
saveConfig();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -112,22 +120,31 @@ public class LoadProperties
|
||||
{
|
||||
//Configuration config = load();
|
||||
String result = config.getString(root, def);
|
||||
config.save();
|
||||
saveConfig();
|
||||
return result;
|
||||
}
|
||||
|
||||
private Configuration load()
|
||||
private FileConfiguration load()
|
||||
{
|
||||
try {
|
||||
Configuration configx = new Configuration(file);
|
||||
configx.load();
|
||||
return configx;
|
||||
config.load(configFile);
|
||||
return config;
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void saveConfig()
|
||||
{
|
||||
try {
|
||||
config.save(configFile);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void addDefaults()
|
||||
{
|
||||
System.out.println("Generating Config File...");
|
||||
@ -403,6 +420,7 @@ public class LoadProperties
|
||||
write("Fishing.Drops.Glowstone_Dust", true);
|
||||
write("Fishing.Drops.Diamonds", true);
|
||||
|
||||
saveConfig();
|
||||
loadkeys();
|
||||
}
|
||||
private void loadkeys()
|
||||
@ -410,6 +428,7 @@ public class LoadProperties
|
||||
System.out.println("Loading Config File...");
|
||||
|
||||
//Setup default HUD
|
||||
load();
|
||||
String temp = readString("Spout.HUD.Default", "STANDARD");
|
||||
for(HUDType x : HUDType.values())
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ public class mcMMO extends JavaPlugin
|
||||
public Misc misc = new Misc(this);
|
||||
|
||||
//Config file stuff
|
||||
LoadProperties config = new LoadProperties();
|
||||
LoadProperties config = new LoadProperties(this);
|
||||
//Jar stuff
|
||||
public static File mcmmo;
|
||||
|
||||
|
@ -71,7 +71,6 @@ public class Fishing {
|
||||
{
|
||||
int randomNum = (int)(Math.random() * 15);
|
||||
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
|
||||
if(Math.random() * 100 < LoadProperties.fishingDropChanceTier1)
|
||||
{
|
||||
@ -80,72 +79,101 @@ public class Fishing {
|
||||
case 1:
|
||||
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 2:
|
||||
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 3:
|
||||
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 4:
|
||||
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 5:
|
||||
if(LoadProperties.woodenTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.WOOD_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 6:
|
||||
if(LoadProperties.woodenTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.WOOD_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 7:
|
||||
if(LoadProperties.woodenTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.WOOD_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 8:
|
||||
if(LoadProperties.woodenTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.WOOD_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 9:
|
||||
if(LoadProperties.woodenTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.WOOD_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 10:
|
||||
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 11:
|
||||
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 12:
|
||||
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 13:
|
||||
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 14:
|
||||
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.STONE_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
}
|
||||
} else
|
||||
{
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
}
|
||||
if(theCatch.getItemStack().getType() != Material.RAW_FISH) {
|
||||
//Change durability to random value
|
||||
theCatch.getItemStack().setDurability((short) (Math.random() * theCatch.getItemStack().getType().getMaxDurability())); //Change the damage value
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void getFishingResultsTier2(Player player, PlayerFishEvent event)
|
||||
{
|
||||
int randomNum = (int)(Math.random() * 20);
|
||||
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
|
||||
if(Math.random() * 100 < LoadProperties.fishingDropChanceTier2)
|
||||
{
|
||||
@ -154,92 +182,131 @@ public class Fishing {
|
||||
case 1:
|
||||
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 2:
|
||||
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 3:
|
||||
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 4:
|
||||
if(LoadProperties.leatherArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.LEATHER_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 5:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 6:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 7:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 8:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 9:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 10:
|
||||
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.STONE_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 11:
|
||||
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.STONE_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 12:
|
||||
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.STONE_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 13:
|
||||
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.STONE_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 14:
|
||||
if(LoadProperties.stoneTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.STONE_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 15:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 16:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 17:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 18:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 19:
|
||||
if(LoadProperties.enderPearl && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
}
|
||||
} else
|
||||
{
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH, 1));
|
||||
}
|
||||
if(theCatch.getItemStack().getType() != Material.RAW_FISH) {
|
||||
|
||||
//Change durability to random value
|
||||
theCatch.getItemStack().setDurability((short) (Math.random() * theCatch.getItemStack().getType().getMaxDurability())); //Change the damage value
|
||||
}
|
||||
}
|
||||
|
||||
private static void getFishingResultsTier3(Player player, PlayerFishEvent event)
|
||||
{
|
||||
int randomNum = (int)(Math.random() * 24);
|
||||
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
|
||||
if(Math.random() * 100 < LoadProperties.fishingDropChanceTier3)
|
||||
{
|
||||
@ -248,108 +315,155 @@ public class Fishing {
|
||||
case 1:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 2:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 3:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 4:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 5:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 6:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 7:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 8:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 9:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 10:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 11:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 12:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 13:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 14:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 15:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 16:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 17:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 18:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 19:
|
||||
if(LoadProperties.enderPearl && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 20:
|
||||
if(LoadProperties.blazeRod && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 21:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 22:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 23:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_5, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(theCatch.getItemStack().getType() != Material.RAW_FISH) {
|
||||
else
|
||||
{
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH, 1));
|
||||
}
|
||||
//Change durability to random value
|
||||
theCatch.getItemStack().setDurability((short) (Math.random() * theCatch.getItemStack().getType().getMaxDurability())); //Change the damage value
|
||||
}
|
||||
}
|
||||
|
||||
private static void getFishingResultsTier4(Player player, PlayerFishEvent event)
|
||||
{
|
||||
int randomNum = (int)(Math.random() * 41);
|
||||
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
|
||||
if(Math.random() * 100 < LoadProperties.fishingDropChanceTier4)
|
||||
{
|
||||
@ -358,176 +472,256 @@ public class Fishing {
|
||||
case 1:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 2:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 3:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 4:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 5:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 6:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 7:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 8:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 9:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 10:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 11:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 12:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 13:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 14:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 15:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 16:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 17:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 18:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 19:
|
||||
if(LoadProperties.enderPearl && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 20:
|
||||
if(LoadProperties.blazeRod && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 21:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 22:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 23:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_5, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 24:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 25:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 26:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 27:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 28:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 29:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 30:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 31:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 32:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 33:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_6, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 34:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_7, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 35:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_8, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 36:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_9, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 37:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_10, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 38:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_11, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 39:
|
||||
if(LoadProperties.glowstoneDust && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GLOWSTONE_DUST, 16));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 40:
|
||||
if(LoadProperties.fishingDiamonds && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND, (int)(Math.random() * 10)));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
}
|
||||
} else
|
||||
{
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH, 1));
|
||||
}
|
||||
if(theCatch.getItemStack().getType() != Material.RAW_FISH) {
|
||||
//Change durability to random value
|
||||
theCatch.getItemStack().setDurability((short) (Math.random() * theCatch.getItemStack().getType().getMaxDurability())); //Change the damage value
|
||||
}
|
||||
}
|
||||
|
||||
private static void getFishingResultsTier5(Player player, PlayerFishEvent event)
|
||||
{
|
||||
int randomNum = (int)(Math.random() * 50);
|
||||
CraftItem theCatch = (CraftItem)event.getCaught();
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
|
||||
if(Math.random() * 100 < LoadProperties.fishingDropChanceTier5)
|
||||
{
|
||||
@ -536,90 +730,134 @@ public class Fishing {
|
||||
case 1:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 2:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 3:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 4:
|
||||
if(LoadProperties.goldArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 5:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 6:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 7:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 8:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 9:
|
||||
if(LoadProperties.ironTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 10:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 11:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 12:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 13:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 14:
|
||||
if(LoadProperties.goldTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GOLD_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 15:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 16:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 17:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 18:
|
||||
if(LoadProperties.ironArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.IRON_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 19:
|
||||
if(LoadProperties.enderPearl && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.ENDER_PEARL, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 20:
|
||||
if(LoadProperties.blazeRod && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.BLAZE_ROD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 21:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_3, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 22:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_4, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 23:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
@ -629,114 +867,166 @@ public class Fishing {
|
||||
case 24:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 25:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 26:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 27:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 28:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 29:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 30:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 31:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 32:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 33:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_6, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 34:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_7, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 35:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_8, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 36:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_9, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 37:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_10, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 38:
|
||||
if(LoadProperties.records && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.RECORD_11, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 39:
|
||||
if(LoadProperties.glowstoneDust && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.GLOWSTONE_DUST, 16));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 40:
|
||||
if(LoadProperties.fishingDiamonds && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND, (int)(Math.random() * 20)));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 41:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_BOOTS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 42:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HELMET, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 43:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_LEGGINGS, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 44:
|
||||
if(LoadProperties.diamondArmor && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_CHESTPLATE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 45:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_AXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 46:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_PICKAXE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 47:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SWORD, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 48:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_HOE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
case 49:
|
||||
if(LoadProperties.diamondTools && LoadProperties.fishingDrops)
|
||||
theCatch.setItemStack(new ItemStack(Material.DIAMOND_SPADE, 1));
|
||||
else
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
theCatch.setItemStack(new ItemStack(Material.RAW_FISH, 1));
|
||||
}
|
||||
if(theCatch.getItemStack().getType() != Material.RAW_FISH) {
|
||||
//Change durability to random value
|
||||
theCatch.getItemStack().setDurability((short) (Math.random() * theCatch.getItemStack().getType().getMaxDurability())); //Change the damage value
|
||||
}
|
||||
}
|
||||
public static void processResults(PlayerFishEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
0
src/main/resources/mcMMO/FlatFileStuff/mcmmo.users
Normal file
0
src/main/resources/mcMMO/FlatFileStuff/mcmmo.users
Normal file
1
src/main/resources/mcMMO/VERSION
Normal file
1
src/main/resources/mcMMO/VERSION
Normal file
@ -0,0 +1 @@
|
||||
1.2.08
|
305
src/main/resources/mcMMO/config.yml
Normal file
305
src/main/resources/mcMMO/config.yml
Normal file
@ -0,0 +1,305 @@
|
||||
Items:
|
||||
Chimaera_Wing:
|
||||
Enabled: true
|
||||
Feather_Cost: 10
|
||||
Item_ID: 288
|
||||
Spout:
|
||||
Menu:
|
||||
Key: KEY_M
|
||||
XP:
|
||||
Bar:
|
||||
Enabled: true
|
||||
X_POS: 95
|
||||
Y_POS: 6
|
||||
Icon:
|
||||
Enabled: true
|
||||
X_POS: 78
|
||||
Y_POS: 2
|
||||
Party:
|
||||
HUD:
|
||||
Show_Faces: true
|
||||
Enabled: true
|
||||
Show_Display_Name: false
|
||||
Images:
|
||||
URL_DIR: http://mcmmo.rycochet.net/mcmmo/
|
||||
HUD:
|
||||
Default: STANDARD
|
||||
Retro:
|
||||
Colors:
|
||||
Swords:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Taming:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Acrobatics:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Border:
|
||||
BLUE: 0.0
|
||||
GREEN: 0.0
|
||||
RED: 0.0
|
||||
Background:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.75
|
||||
RED: 0.75
|
||||
Woodcutting:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Archery:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Axes:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Repair:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Fishing:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Excavation:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Herbalism:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Unarmed:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Mining:
|
||||
BLUE: 0.75
|
||||
GREEN: 0.3
|
||||
RED: 0.3
|
||||
Skills:
|
||||
Taming:
|
||||
Call_Of_The_Wild:
|
||||
Bones_Required: 10
|
||||
Excavation:
|
||||
Requires_Shovel: true
|
||||
Woodcutting:
|
||||
Requires_Axe: true
|
||||
Herbalism:
|
||||
Green_Thumb:
|
||||
Cobble_To_Mossy: true
|
||||
Mining:
|
||||
Requires_Pickaxe: true
|
||||
Repair:
|
||||
Leather:
|
||||
ID: 334
|
||||
String:
|
||||
Name: Leather
|
||||
ID: 287
|
||||
Stone:
|
||||
Name: Cobblestone
|
||||
ID: 4
|
||||
Wood:
|
||||
Name: Wood Planks
|
||||
ID: 5
|
||||
Gold:
|
||||
Name: Gold Bars
|
||||
ID: 266
|
||||
Anvil_Messages: true
|
||||
Diamond:
|
||||
Name: Diamond
|
||||
Level_Required: 50
|
||||
ID: 264
|
||||
Iron:
|
||||
Name: Iron Bars
|
||||
ID: 265
|
||||
Experience:
|
||||
Fishing:
|
||||
Base: 800
|
||||
Formula:
|
||||
Multiplier:
|
||||
Swords: 1.0
|
||||
Taming: 1.0
|
||||
Acrobatics: 1.0
|
||||
Sorcery: 1.0
|
||||
Excavation: 1.0
|
||||
Herbalism: 1.0
|
||||
Unarmed: 1.0
|
||||
Woodcutting: 1.0
|
||||
Mining: 1.0
|
||||
Archery: 1.0
|
||||
Axes: 1.0
|
||||
Repair: 1.0
|
||||
Gains:
|
||||
Mobspawners:
|
||||
Enabled: false
|
||||
Multiplier:
|
||||
PVP: 1
|
||||
Global: 1.0
|
||||
PVP:
|
||||
Rewards: true
|
||||
Excavation:
|
||||
Base: 40
|
||||
Cake: 3000
|
||||
Sulphur: 30
|
||||
Bones: 30
|
||||
Map: 200
|
||||
Slimeballs: 100
|
||||
Bucket: 100
|
||||
Apple: 100
|
||||
Mushroom: 80
|
||||
Eggs: 100
|
||||
Slowsand: 80
|
||||
Watch: 200
|
||||
Web: 150
|
||||
String: 200
|
||||
Glowstone: 80
|
||||
Music: 3000
|
||||
Diamond: 1000
|
||||
Cocoa_Beans: 100
|
||||
Woodcutting:
|
||||
Birch: 70
|
||||
Spruce: 80
|
||||
Pine: 90
|
||||
Herbalism:
|
||||
Sugar_Cane: 30
|
||||
Cactus: 30
|
||||
Flowers: 100
|
||||
Pumpkin: 550
|
||||
Mushrooms: 150
|
||||
Wheat: 50
|
||||
Melon: 40
|
||||
Mining:
|
||||
Sandstone: 30
|
||||
Glowstone: 30
|
||||
Obsidian: 150
|
||||
Stone: 30
|
||||
Netherrack: 30
|
||||
Gold: 350
|
||||
Redstone: 150
|
||||
Coal: 100
|
||||
Diamond: 750
|
||||
lapis: 400
|
||||
Iron: 250
|
||||
MySQL:
|
||||
Enabled: false
|
||||
Database:
|
||||
User:
|
||||
Name: UserName
|
||||
Password: UserPassword
|
||||
Name: DataBaseName
|
||||
TablePrefix: mcmmo_
|
||||
Server:
|
||||
Port: 3306
|
||||
Address: localhost
|
||||
XP:
|
||||
Gains:
|
||||
Mobspawners:
|
||||
Enabled: false
|
||||
PVP:
|
||||
Rewards: true
|
||||
General:
|
||||
HP_Regeneration:
|
||||
Enabled: true
|
||||
Locale: en_us
|
||||
MySpawn:
|
||||
Enabled: true
|
||||
MOTD:
|
||||
Enabled: true
|
||||
Excavation:
|
||||
Drops:
|
||||
Cake: true
|
||||
Sulphur: true
|
||||
Bones: true
|
||||
Apples: true
|
||||
Map: true
|
||||
Slimeballs: true
|
||||
Bucket: true
|
||||
Netherrack: true
|
||||
Mushrooms: true
|
||||
Eggs: true
|
||||
Slowsand: true
|
||||
Watch: true
|
||||
Web: true
|
||||
String: true
|
||||
Glowstone: true
|
||||
Music: true
|
||||
Diamond: true
|
||||
Cocoa_Beans: true
|
||||
Abilities:
|
||||
Activation:
|
||||
Only_Activate_When_Sneaking: false
|
||||
Enabled: true
|
||||
Messages: true
|
||||
Cooldowns:
|
||||
Giga_Drill_Breaker: 240
|
||||
Berserk: 240
|
||||
Green_Terra: 240
|
||||
Skull_Splitter: 240
|
||||
Serrated_Strikes: 240
|
||||
Tree_Feller: 240
|
||||
Super_Breaker: 240
|
||||
Tools:
|
||||
Durability_Loss: 2
|
||||
Durability_Loss_Enabled: true
|
||||
Commands:
|
||||
invite:
|
||||
Name: invite
|
||||
Enabled: true
|
||||
mctop:
|
||||
Name: mctop
|
||||
Enabled: true
|
||||
xplock:
|
||||
Name: xplock
|
||||
Enabled: true
|
||||
whois:
|
||||
Name: whois
|
||||
Enabled: true
|
||||
mcc:
|
||||
Name: mcc
|
||||
Enabled: true
|
||||
mmoedit:
|
||||
Name: mmoedit
|
||||
Enabled: true
|
||||
accept:
|
||||
Name: accept
|
||||
Enabled: true
|
||||
stats:
|
||||
Name: stats
|
||||
Enabled: true
|
||||
mcability:
|
||||
Name: mcability
|
||||
Enabled: true
|
||||
party:
|
||||
Name: party
|
||||
Enabled: true
|
||||
xprate:
|
||||
Name: xprate
|
||||
Enabled: true
|
||||
mcgod:
|
||||
Name: mcgod
|
||||
Enabled: true
|
||||
mcmmo:
|
||||
Name: mcmmo
|
||||
Enabled: true
|
||||
Donate_Message: true
|
||||
mcrefresh:
|
||||
Name: mcrefresh
|
||||
Enabled: true
|
||||
myspawn:
|
||||
Name: myspawn
|
||||
Enabled: true
|
||||
addxp:
|
||||
Name: addxp
|
||||
Enabled: true
|
||||
clearmyspawn:
|
||||
Name: clearmyspawn
|
||||
Enabled: true
|
||||
ptp:
|
||||
Name: ptp
|
||||
Enabled: true
|
Loading…
Reference in New Issue
Block a user