diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main$1.class b/BankEconomyMod/bin/me/kaZep/Base/Main$1.class index 17491e4..5b5cf40 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main$1.class and b/BankEconomyMod/bin/me/kaZep/Base/Main$1.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main$2.class b/BankEconomyMod/bin/me/kaZep/Base/Main$2.class index 8720549..9e11112 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main$2.class and b/BankEconomyMod/bin/me/kaZep/Base/Main$2.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main$3.class b/BankEconomyMod/bin/me/kaZep/Base/Main$3.class index de34214..633d813 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main$3.class and b/BankEconomyMod/bin/me/kaZep/Base/Main$3.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main$4.class b/BankEconomyMod/bin/me/kaZep/Base/Main$4.class index fe5515c..cd5f816 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main$4.class and b/BankEconomyMod/bin/me/kaZep/Base/Main$4.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/Main.class b/BankEconomyMod/bin/me/kaZep/Base/Main.class index 8dcf318..c70674b 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/Main.class and b/BankEconomyMod/bin/me/kaZep/Base/Main.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$1.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$1.class index 6ae96e9..c4018f6 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$1.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$1.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$2.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$2.class index accf046..5c12766 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$2.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$2.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$3.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$3.class index 0554928..0eec2ef 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$3.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$3.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class index 4ec5b57..eff9a1a 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$4.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class index 903361b..a90c11b 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$5.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class index 5da6746..9e25f3b 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener$6.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class index 307e7e5..2f6c7d3 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class and b/BankEconomyMod/bin/me/kaZep/Base/PlayerListener.class differ diff --git a/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class b/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class index ef15564..6f923b5 100644 Binary files a/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class and b/BankEconomyMod/bin/me/kaZep/Commands/commandBankEconomy.class differ diff --git a/BankEconomyMod/plugin.yml b/BankEconomyMod/plugin.yml index f60810b..ddc0d33 100644 --- a/BankEconomyMod/plugin.yml +++ b/BankEconomyMod/plugin.yml @@ -22,4 +22,6 @@ commands: unenchant: description: Unenchant your currently held item. event: - description: Toggles or untoggles events. \ No newline at end of file + description: Toggles or untoggles events. + dungeon: + description: X \ No newline at end of file diff --git a/BankEconomyMod/src/me/kaZep/Base/Main.java b/BankEconomyMod/src/me/kaZep/Base/Main.java index 2599c2c..4eeeab8 100644 --- a/BankEconomyMod/src/me/kaZep/Base/Main.java +++ b/BankEconomyMod/src/me/kaZep/Base/Main.java @@ -190,6 +190,7 @@ public class Main extends JavaPlugin getCommand("settings").setExecutor(new commandBankEconomy(this)); getCommand("maintenance").setExecutor(new commandBankEconomy(this)); getCommand("event").setExecutor(new commandBankEconomy(this)); + getCommand("dungeon").setExecutor(new commandBankEconomy(this)); setupEconomy(); @@ -3153,9 +3154,14 @@ public void payDay(int time) p.sendMessage(ChatColor.GOLD+"Sorry, that is not a valid job!"); return; } - getAccountsConfig().set(p.getName()+".jobs.ultimate", String.valueOf(ValidJobs[matchedjob])); - saveAccountsConfig(); - p.sendMessage(ChatColor.YELLOW+"Set Declared Ultimate job to "+job); + if (PlayerinJob(p,job)) { + getAccountsConfig().set(p.getName()+".jobs.ultimate", String.valueOf(ValidJobs[matchedjob])); + saveAccountsConfig(); + p.sendMessage(ChatColor.YELLOW+"Set Declared Ultimate job to "+job); + } else { + p.sendMessage(ChatColor.GOLD+"Sorry, you are not in that job!"); + return; + } } public boolean joinJob(Player p, String job) { diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java index 884ac39..262ba83 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java @@ -1367,15 +1367,29 @@ public class PlayerListener @EventHandler public void onPortalEnter(PlayerTeleportEvent e) { - if (e.getPlayer().getLocation().distanceSquared(new Location(Bukkit.getWorld("world"),1606d,66d,-365d))<900) { - //This is a player trying to enter a portal. Verify if they have selected their ultimate. - if (this.plugin.getAccountsConfig().contains(e.getPlayer().getName()+".jobs.ultimate")) { - //Check if this job's ultimate level is high enough. - if (this.plugin.getJobLv(this.plugin.getAccountsConfig().getString(e.getPlayer().getName()+".jobs.ultimate"), e.getPlayer())>=40) { - //Allow this teleport. - e.setTo(new Location(Bukkit.getWorld("world"),-8990,68,-4)); - } else { - e.setCancelled(true); + final Player p = e.getPlayer(); + if (e.getFrom().getWorld()==Bukkit.getWorld("world")) { + if (e.getFrom().distanceSquared(new Location(Bukkit.getWorld("world"),1606d,66d,-365d))<900) { + //This is a player trying to enter a portal. Verify if they have selected their ultimate. + if (this.plugin.getAccountsConfig().contains(e.getPlayer().getName()+".jobs.ultimate")) { + //Check if this job's ultimate level is high enough. + if (this.plugin.getJobLv(this.plugin.getAccountsConfig().getString(e.getPlayer().getName()+".jobs.ultimate"), e.getPlayer())>=40) { + //Allow this teleport. + //e.setTo(new Location(Bukkit.getWorld("world"),-8990,68,-4)); + Bukkit.getScheduler().scheduleSyncDelayedTask(this.plugin, new Runnable() { + @Override + public void run() { + p.getPlayer().teleport(new Location(Bukkit.getWorld("world"),-8990,68,-4)); + } + },5); + } else { + Bukkit.getScheduler().scheduleSyncDelayedTask(this.plugin, new Runnable() { + @Override + public void run() { + p.getPlayer().teleport(new Location(Bukkit.getWorld("world"),1606d,66d,-365d)); + } + },5); + } } } } @@ -2939,10 +2953,12 @@ public class PlayerListener } if (pot.getType()==PotionType.INSTANT_HEAL) { - if (p.getHealth()+24>p.getMaxHealth()) { - p.setHealth(p.getMaxHealth()); - } else { - p.setHealth(p.getHealth()+24); + if (!p.isDead()) { + if (p.getHealth()+24>p.getMaxHealth()) { + p.setHealth(p.getMaxHealth()); + } else { + p.setHealth(p.getHealth()+24); + } } } } @@ -2998,18 +3014,20 @@ public class PlayerListener this.plugin.gainMoneyExp(shooter,"Support",0.25,12); } if (nextpotioneffect.getType().getName().compareTo("HEAL")==0) { - if (p.getHealth()/p.getMaxHealth()<=0.30) { - this.plugin.gainMoneyExp(shooter,"Support",0.60,30); - //shooter.sendMessage("This is a big heal."); - p.getScoreboard().getTeam(p.getName()).setSuffix(healthbar(p.getHealth(),p.getMaxHealth())); - } - this.plugin.gainMoneyExp(shooter,"Support",0.30,14); - if (p.getHealth()+12>p.getMaxHealth()) { - p.setHealth(p.getMaxHealth()); - } else { - p.setHealth(p.getHealth()+12); + if (!p.isDead()) { + if (p.getHealth()/p.getMaxHealth()<=0.30) { + this.plugin.gainMoneyExp(shooter,"Support",0.60,30); + //shooter.sendMessage("This is a big heal."); + p.getScoreboard().getTeam(p.getName()).setSuffix(healthbar(p.getHealth(),p.getMaxHealth())); + } + this.plugin.gainMoneyExp(shooter,"Support",0.30,14); + if (p.getHealth()+12>p.getMaxHealth()) { + p.setHealth(p.getMaxHealth()); + } else { + p.setHealth(p.getHealth()+12); + } + //shooter.sendMessage("This is a heal."); } - //shooter.sendMessage("This is a heal."); } if (nextpotioneffect.getType().getName().compareTo("REGENERATION")==0) { if (p.getHealth()/p.getMaxHealth()<=0.30) { @@ -3082,13 +3100,15 @@ public class PlayerListener } } if (nextpotioneffect.getType().getName().compareTo("HEAL")==0) { - if (p.getHealth()+12>p.getMaxHealth()) { - p.setHealth(p.getMaxHealth()); - } else { - p.setHealth(p.getHealth()+12); + if (!p.isDead()) { + if (p.getHealth()+12>p.getMaxHealth()) { + p.setHealth(p.getMaxHealth()); + } else { + p.setHealth(p.getHealth()+12); + } + //shooter.sendMessage("This is a heal."); + p.getScoreboard().getTeam(p.getName()).setSuffix(healthbar(p.getHealth(),p.getMaxHealth())); } - //shooter.sendMessage("This is a heal."); - p.getScoreboard().getTeam(p.getName()).setSuffix(healthbar(p.getHealth(),p.getMaxHealth())); } } } catch (ConcurrentModificationException ex_e) { @@ -3131,12 +3151,14 @@ public class PlayerListener } } if (nextpotioneffect.getType().getName().compareTo("HEAL")==0) { - if (p.getHealth()+12>p.getMaxHealth()) { - p.setHealth(p.getMaxHealth()); - } else { - p.setHealth(p.getHealth()+12); + if (!p.isDead()) { + if (p.getHealth()+12>p.getMaxHealth()) { + p.setHealth(p.getMaxHealth()); + } else { + p.setHealth(p.getHealth()+12); + } + //shooter.sendMessage("This is a heal."); } - //shooter.sendMessage("This is a heal."); } effects.remove(); } diff --git a/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java b/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java index 87f9444..d6fb871 100644 --- a/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java +++ b/BankEconomyMod/src/me/kaZep/Commands/commandBankEconomy.java @@ -5,11 +5,13 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import me.kaZep.Base.Dungeon; import me.kaZep.Base.Main; import net.milkbowl.vault.economy.Economy; import org.bukkit.Bukkit; import org.bukkit.ChatColor; +import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.OfflinePlayer; import org.bukkit.Server; @@ -264,6 +266,9 @@ public class commandBankEconomy } this.plugin.saveConfig(); } + } else + if (cmd.getName().equalsIgnoreCase("dungeon") && p.hasPermission("maintenance-mode-admin") && args.length==1) { + Dungeon x = new Dungeon(new Location(Bukkit.getWorld("world"),-8990,0,-4),new Location(Bukkit.getWorld("world"),50,255,50),Integer.valueOf(args[0])); } else if (cmd.getName().equalsIgnoreCase("transfer") && args.length==1) { p.sendMessage("Usage: "+ChatColor.RED+"/transfer name money"+ChatColor.WHITE+" - Transfer money to a player.");