Merge branch 'master' into dev
Conflicts: BankEconomyMod/src/me/kaZep/Base/PlayerListener.java
This commit is contained in:
commit
0a4bde3866
@ -24,6 +24,7 @@ import me.kaZep.Commands.JobsDataInfo;
|
||||
import me.kaZep.Commands.JobsDataInfo.Job;
|
||||
import me.kaZep.Commands.commandBankEconomy;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Chunk;
|
||||
@ -65,6 +66,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.bukkit.map.MapRenderer;
|
||||
import org.bukkit.map.MapView;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
@ -434,6 +436,18 @@ public class Main extends JavaPlugin
|
||||
fireproof_wood_slab.setIngredient('b', Material.WOOD_STEP);
|
||||
Bukkit.addRecipe(fireproof_wood_slab);
|
||||
|
||||
// Add high efficiency recipes for wool
|
||||
// White
|
||||
ShapedRecipe woolRecipe;
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
woolRecipe = new ShapedRecipe(new ItemStack(Material.WOOL, 8, (short) i));
|
||||
woolRecipe.shape("aaa","aba", "aaa");
|
||||
woolRecipe.setIngredient('a', Material.WOOL);
|
||||
woolRecipe.setIngredient('b', new MaterialData(Material.INK_SACK, (byte) (15 - i)));
|
||||
Bukkit.addRecipe(woolRecipe);
|
||||
}
|
||||
|
||||
// Add Recipes for Item cube crafting.
|
||||
ItemStack temp = new ItemStack(Material.CHEST);
|
||||
ItemMeta tempmeta = temp.getItemMeta();
|
||||
@ -1181,6 +1195,32 @@ public void runTick() {
|
||||
}
|
||||
}
|
||||
}
|
||||
world_entities = Bukkit.getWorld("world_nether").getEntities();
|
||||
for (int i=0;i<world_entities.size();i++) {
|
||||
if (world_entities.get(i).getType()==EntityType.WITHER) {
|
||||
Wither l = (Wither)world_entities.get(i);
|
||||
if (l.getCustomName()!=null && l.getCustomName().equalsIgnoreCase(ChatColor.LIGHT_PURPLE+"Mythical Wither")) {
|
||||
if (l.getMaxHealth()>l.getHealth()+5+(0.2*(l.getMaxHealth()/l.getHealth()))) {
|
||||
DecimalFormat df = new DecimalFormat("#0.0");
|
||||
//Bukkit.broadcastMessage("Healing for "+(+5+(0.2*(l.getMaxHealth()/l.getHealth())))+" health. "+df.format(l.getHealth())+"/"+l.getMaxHealth()+" HP");
|
||||
l.setHealth(l.getHealth()+5+(0.2*(l.getMaxHealth()/l.getHealth())));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
world_entities = Bukkit.getWorld("world_the_end").getEntities();
|
||||
for (int i=0;i<world_entities.size();i++) {
|
||||
if (world_entities.get(i).getType()==EntityType.WITHER) {
|
||||
Wither l = (Wither)world_entities.get(i);
|
||||
if (l.getCustomName()!=null && l.getCustomName().equalsIgnoreCase(ChatColor.LIGHT_PURPLE+"Mythical Wither")) {
|
||||
if (l.getMaxHealth()>l.getHealth()+5+(0.2*(l.getMaxHealth()/l.getHealth()))) {
|
||||
DecimalFormat df = new DecimalFormat("#0.0");
|
||||
//Bukkit.broadcastMessage("Healing for "+(+5+(0.2*(l.getMaxHealth()/l.getHealth())))+" health. "+df.format(l.getHealth())+"/"+l.getMaxHealth()+" HP");
|
||||
l.setHealth(l.getHealth()+5+(0.2*(l.getMaxHealth()/l.getHealth())));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int zx=0;zx<Bukkit.getOnlinePlayers().length;zx++) {
|
||||
Player p = Bukkit.getOnlinePlayers()[zx];
|
||||
|
@ -3474,7 +3474,7 @@ implements Listener
|
||||
//p.sendMessage("Block broke.");
|
||||
//p.sendMessage("Has name: "+p.getItemInHand().getItemMeta().hasDisplayName());
|
||||
//p.sendMessage("Name is: "+p.getItemInHand().getItemMeta().getDisplayName());
|
||||
|
||||
int myData=this.plugin.getPlayerDataSlot(p);
|
||||
boolean has_silktouch=false;
|
||||
if (!p.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)) {
|
||||
has_silktouch=false;
|
||||
@ -3611,7 +3611,7 @@ implements Listener
|
||||
destroyNearbyOres(e.getBlock().getWorld(), p, e.getBlock().getLocation(), has_silktouch, 4);
|
||||
} else {
|
||||
if (this.plugin.PlayerinJob(p, "Miner")) {
|
||||
int myData=this.plugin.getPlayerDataSlot(p);
|
||||
myData=this.plugin.getPlayerDataSlot(p);
|
||||
if (this.plugin.playerdata_list.get(myData).GoodInteract()) {
|
||||
if (e.getBlock().getType()==Material.STONE) {
|
||||
this.plugin.gainMoneyExp(p,"Miner",0.0025,1);
|
||||
@ -3660,7 +3660,7 @@ implements Listener
|
||||
}
|
||||
//*******************************//Job Buffs end here!
|
||||
|
||||
int myData=this.plugin.getPlayerDataSlot(p);
|
||||
myData=this.plugin.getPlayerDataSlot(p);
|
||||
if (p!=null) {
|
||||
if (e.getBlock().getType()==Material.COMMAND) {
|
||||
e.setCancelled(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user