Starting Builder job buff updates.

dev
sigonasr2 11 years ago
parent 32cde13d79
commit a59c956c81
  1. 4
      BankEconomyMod/plugin.yml
  2. 2
      BankEconomyMod/src/me/kaZep/Base/Main.java
  3. 9
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java
  4. 42
      BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java

@ -25,3 +25,7 @@ commands:
description: Toggles or untoggles events.
ticktime:
description: Displays the server tick time.
line:
description: Gives the player a line builder tool.
rectangle:
description: Gives the player a rectangle builder tool.

@ -224,6 +224,8 @@ public class Main extends JavaPlugin
getCommand("event").setExecutor(new commandBankEconomy(this));
//getCommand("dungeon").setExecutor(new commandBankEconomy(this));
getCommand("ticktime").setExecutor(new commandBankEconomy(this));
getCommand("line").setExecutor(new commandBankEconomy(this));
getCommand("rectangle").setExecutor(new commandBankEconomy(this));
setupEconomy();

@ -19,9 +19,6 @@ import net.milkbowl.vault.economy.EconomyResponse;
//import net.minecraft.server.v1_4_R1.EntityWolf;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Chunk;
@ -3183,10 +3180,10 @@ implements Listener
private void breakOreBlock(Player p, Block b, boolean silk_touch, double xp_mult) {
if (this.plugin.PlayerinJob(p, "Miner")) {
Bukkit.getLogger().info("This player is a miner.");
//Bukkit.getLogger().info("This player is a miner.");
int myData=this.plugin.getPlayerDataSlot(p);
if (this.plugin.playerdata_list.get(myData).GoodInteract()) {
Bukkit.getLogger().info("Good interact.");
//Bukkit.getLogger().info("Good interact.");
if (b.getType()==Material.STONE) {
this.plugin.gainMoneyExp(p,"Miner",0.0025,1);
} else
@ -3195,7 +3192,7 @@ implements Listener
} else
if (b.getType()==Material.COAL_ORE && !silk_touch) {
this.plugin.gainMoneyExp(p,"Miner",0.0125,3);
Bukkit.getLogger().info("Coal Ore.");
//Bukkit.getLogger().info("Coal Ore.");
} else
if (b.getType()==Material.GLOWSTONE && !silk_touch) {
this.plugin.gainMoneyExp(p,"Miner",0.015,3);

@ -8,6 +8,7 @@ import java.util.List;
import java.util.Map;
import me.kaZep.Base.Main;
import me.kaZep.Commands.JobsDataInfo.Job;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
@ -441,6 +442,47 @@ public String convertToItemName(String val) {
p.sendMessage("Enchantments and bonuses removed on this item.");
}
else
if (cmd.getName().equalsIgnoreCase("line")) {
if (this.plugin.hasJobBuff("Builder", p, Job.JOB5)) {
p.sendMessage("You have received a line builder tool.");
ItemStack i = new ItemStack(Material.getMaterial(141));
ItemMeta meta = i.getItemMeta();
meta.setDisplayName(ChatColor.GRAY+"Line Builder Tool");
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.YELLOW+"Can only be used by Lv5+ Builders.");
newlore.add(ChatColor.YELLOW+"");
newlore.add("Left-click one block and another");
newlore.add("of the same type to create a line");
newlore.add("of blocks. "+ChatColor.BLUE+"(Max Range: 500 blocks)");
meta.setLore(newlore);
i.setItemMeta(meta);
p.getInventory().addItem(i);
} else {
p.sendMessage(ChatColor.RED+"You do not have the Lv5 Builder Buff!");
}
}
else
if (cmd.getName().equalsIgnoreCase("rectangle")) {
if (this.plugin.hasJobBuff("Builder", p, Job.JOB10)) {
p.sendMessage("You have received a rectangle builder tool.");
ItemStack i = new ItemStack(Material.getMaterial(142));
ItemMeta meta = i.getItemMeta();
meta.setDisplayName(ChatColor.GRAY+"Rectangle Builder Tool");
List<String> newlore = new ArrayList<String>();
newlore.add(ChatColor.YELLOW+"Can only be used by Lv10+ Builders.");
newlore.add(ChatColor.YELLOW+"");
newlore.add("Left-click one block and another");
newlore.add("of the same type to fill a");
newlore.add("rectangle of blocks.");
newlore.add(ChatColor.BLUE+" (Max Range: 500 blocks)");
meta.setLore(newlore);
i.setItemMeta(meta);
p.getInventory().addItem(i);
} else {
p.sendMessage(ChatColor.RED+"You do not have the Lv10 Builder Buff!");
}
}
else
if (cmd.getName().equalsIgnoreCase("ticktime")) {
p.sendMessage("Current Server Time: "+ChatColor.GRAY+""+ChatColor.ITALIC+Main.SERVER_TICK_TIME);
}

Loading…
Cancel
Save