Finished removing all traces of Herobrine AI branding. Improved plug-in output so that it is more useful and easier to understand.

This commit is contained in:
David Berdik 2015-02-08 20:27:17 -05:00
parent 36240343f9
commit f3693d54d6
21 changed files with 262 additions and 217 deletions

View File

@ -28,33 +28,33 @@ public class BuildStuff extends Core {
public CoreResult BuildCave(final Location loc) {
if (!HerobrineAI.getPluginCore().getConfigDB().buildStuff) {
return new CoreResult(false, "Player is in secure location.");
return new CoreResult(false, "A cave cannot be created here because it is a protected area.");
}
if (!HerobrineAI.getPluginCore().getSupport().checkBuild(loc)) {
return new CoreResult(false, "Cannot build stuff.");
}
if (loc.getBlockY() >= 60) {
return new CoreResult(false, "Location must be under 60 of Y.");
return new CoreResult(false, "Caves can only be generated in locations where the Y coordinate is less than or equal to 60.");
}
final int chance = new Random().nextInt(100);
if (chance > (100 - HerobrineAI.getPluginCore().getConfigDB().caveChance)) {
AICore.log.info("Creating cave...");
GenerateCave(loc);
return new CoreResult(false, "Cave created!");
return new CoreResult(false, "Cave created.");
}
return new CoreResult(false, "Roll failed!");
return new CoreResult(false, "Cave generation failed.");
}
public CoreResult BuildCave(final Location loc, final boolean cmd) {
if (!HerobrineAI.getPluginCore().getSupport().checkBuild(loc)) {
return new CoreResult(false, "Player is in secure location.");
return new CoreResult(false, "A cave cannot be created here because it is a protected area.");
}
if (loc.getBlockY() < 60) {
AICore.log.info("Creating cave...");
GenerateCave(loc);
return new CoreResult(false, "Cave created!");
return new CoreResult(false, "Cave created.");
}
return new CoreResult(false, "Location must be under 60 of Y.");
return new CoreResult(false, "Caves can only be generated in locations where the Y coordinate is less than or equal to 60.");
}
public void GenerateCave(final Location loc) {
@ -101,7 +101,7 @@ public class BuildStuff extends Core {
for (final Location _loc : redstoneTorchList) {
PlaceRedstoneTorch(_loc.getWorld(), _loc.getBlockX(), _loc.getBlockY(), _loc.getBlockZ());
}
AICore.log.info("Cave created!");
AICore.log.info("Cave created.");
}
}

View File

@ -14,7 +14,7 @@ public class Burn extends Core {
public CoreResult callCore(final Object[] data) {
final Player player = (Player) data[0];
player.setFireTicks(800);
return new CoreResult(true, "Player burned!");
return new CoreResult(true, player.getDisplayName() + " was burned by Herobrine.");
}
}

View File

@ -40,10 +40,10 @@ public class BuryPlayer extends Core {
&& HerobrineAI.isSolidBlock(loc.getWorld().getBlockAt(loc.getBlockX(), loc.getBlockY() - 1, loc.getBlockZ() - 2).getType())
&& !HerobrineAI.isAllowedBlock(loc.getWorld().getBlockAt(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ() - 2).getType())) {
Bury(loc.getWorld(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), player);
return new CoreResult(true, "Player buried!");
return new CoreResult(true, player.getDisplayName() + " was buried by Herobrine.");
}
}
return new CoreResult(false, "Cannot find a good location!");
return new CoreResult(false, player.getDisplayName() + " could not be buried because a good burial location could not be found.");
}
public void Bury(final World world, final int X, final int Y, final int Z, final Player player) {

View File

@ -35,7 +35,7 @@ public class Curse extends Core {
}
}, i * 150L);
}
return new CoreResult(true, "Player cursed!");
return new CoreResult(true, player.getDisplayName() + " has been cursed by Herobrine.");
}
}

View File

@ -32,13 +32,13 @@ public class DestroyTorches extends Core {
for (iii = -HerobrineAI.getPluginCore().getConfigDB().destroyTorchesRadius; iii <= HerobrineAI.getPluginCore().getConfigDB().destroyTorchesRadius; ++iii) {
if (world.getBlockAt(x + ii, y + i, z + iii).getType() == Material.TORCH) {
world.getBlockAt(x + ii, y + i, z + iii).breakNaturally();
return new CoreResult(true, "Torches destroyed!");
return new CoreResult(true, "Torches successfully destroyed by Herobrine.");
}
}
}
}
}
return new CoreResult(false, "Cannot destroy torches.");
return new CoreResult(false, "Herobrine could not destroy the torches.");
}
}

View File

@ -40,15 +40,15 @@ public class Graveyard extends Core {
public CoreResult Teleport(final Player player) {
if (!HerobrineAI.getPluginCore().getConfigDB().useGraveyardWorld) {
return new CoreResult(false, "Graveyard world is not allowed!");
return new CoreResult(false, "Herobrine's Graveyard is disabled on this server.");
}
LivingEntities = Bukkit.getServer().getWorld("world_herobrineai_graveyard").getLivingEntities();
LivingEntities = Bukkit.getServer().getWorld("world_herobrine_graveyard").getLivingEntities();
for (int i = 0; i <= (LivingEntities.size() - 1); ++i) {
if (!(LivingEntities.get(i) instanceof Player) && (LivingEntities.get(i).getEntityId() != HerobrineAI.herobrineEntityID)) {
LivingEntities.get(i).remove();
}
}
Bukkit.getServer().getWorld("world_herobrineai_graveyard").setTime(15000L);
Bukkit.getServer().getWorld("world_herobrine_graveyard").setTime(15000L);
HerobrineAI.getPluginCore().getAICore();
AICore.PlayerTarget = player;
final Location loc = player.getLocation();
@ -57,7 +57,7 @@ public class Graveyard extends Core {
savedZ = loc.getZ();
savedWorld = loc.getWorld();
savedPlayer = player;
loc.setWorld(Bukkit.getServer().getWorld("world_herobrineai_graveyard"));
loc.setWorld(Bukkit.getServer().getWorld("world_herobrine_graveyard"));
loc.setX(-2.49);
loc.setY(4.0);
loc.setZ(10.69);
@ -67,13 +67,13 @@ public class Graveyard extends Core {
Start();
HerobrineAI.getPluginCore().getAICore();
AICore.isTarget = true;
Bukkit.getServer().getWorld("world_herobrineai_graveyard").setStorm(false);
return new CoreResult(true, "Player successfully teleported!");
Bukkit.getServer().getWorld("world_herobrine_graveyard").setStorm(false);
return new CoreResult(true, player.getDisplayName() + " has been teleported to Herobrine's Graveyard.");
}
public void Start() {
ticks = 0;
HerobrineAI.herobrineNPC.moveTo(new Location(Bukkit.getServer().getWorld("world_herobrineai_graveyard"), -2.49, 4.0, -4.12));
HerobrineAI.herobrineNPC.moveTo(new Location(Bukkit.getServer().getWorld("world_herobrine_graveyard"), -2.49, 4.0, -4.12));
HandlerInterval();
}
@ -87,31 +87,31 @@ public class Graveyard extends Core {
}
public void Handler() {
LivingEntities = Bukkit.getServer().getWorld("world_herobrineai_graveyard").getLivingEntities();
LivingEntities = Bukkit.getServer().getWorld("world_herobrine_graveyard").getLivingEntities();
for (int i = 0; i <= (LivingEntities.size() - 1); ++i) {
if (!(LivingEntities.get(i) instanceof Player) && (LivingEntities.get(i).getEntityId() != HerobrineAI.herobrineEntityID)) {
LivingEntities.get(i).remove();
}
}
if (!savedPlayer.isDead() && savedPlayer.isOnline() && (savedPlayer.getLocation().getWorld() == Bukkit.getServer().getWorld("world_herobrineai_graveyard")) && (ticks != 90)) {
if (!savedPlayer.isDead() && savedPlayer.isOnline() && (savedPlayer.getLocation().getWorld() == Bukkit.getServer().getWorld("world_herobrine_graveyard")) && (ticks != 90)) {
HerobrineAI.getPluginCore().getAICore();
if (AICore.isTarget) {
final Location ploc = savedPlayer.getLocation();
ploc.setY(ploc.getY() + 1.5);
HerobrineAI.herobrineNPC.lookAtPoint(ploc);
if (ticks == 1) {
HerobrineAI.herobrineNPC.moveTo(new Location(Bukkit.getServer().getWorld("world_herobrineai_graveyard"), -2.49, 4.0, -4.12));
HerobrineAI.herobrineNPC.moveTo(new Location(Bukkit.getServer().getWorld("world_herobrine_graveyard"), -2.49, 4.0, -4.12));
} else if (ticks == 40) {
HerobrineAI.herobrineNPC.moveTo(new Location(Bukkit.getServer().getWorld("world_herobrineai_graveyard"), -2.49, 4.0, -0.5));
HerobrineAI.herobrineNPC.moveTo(new Location(Bukkit.getServer().getWorld("world_herobrine_graveyard"), -2.49, 4.0, -0.5));
} else if (ticks == 60) {
HerobrineAI.herobrineNPC.moveTo(new Location(Bukkit.getServer().getWorld("world_herobrineai_graveyard"), -2.49, 4.0, 5.1));
HerobrineAI.herobrineNPC.moveTo(new Location(Bukkit.getServer().getWorld("world_herobrine_graveyard"), -2.49, 4.0, 5.1));
} else if (ticks == 84) {
HerobrineAI.herobrineNPC.moveTo(new Location(Bukkit.getServer().getWorld("world_herobrineai_graveyard"), -2.49, 4.0, 7.5));
HerobrineAI.herobrineNPC.moveTo(new Location(Bukkit.getServer().getWorld("world_herobrine_graveyard"), -2.49, 4.0, 7.5));
}
if (new Random().nextInt(4) == 1) {
final Location newloc = new Location(Bukkit.getServer().getWorld("world_herobrineai_graveyard"), new Random().nextInt(400), new Random().nextInt(20) + 20.0,
final Location newloc = new Location(Bukkit.getServer().getWorld("world_herobrine_graveyard"), new Random().nextInt(400), new Random().nextInt(20) + 20.0,
new Random().nextInt(400));
Bukkit.getServer().getWorld("world_herobrineai_graveyard").strikeLightning(newloc);
Bukkit.getServer().getWorld("world_herobrine_graveyard").strikeLightning(newloc);
}
++ticks;
HandlerInterval();

View File

@ -41,10 +41,10 @@ public class Haunt extends Core {
public CoreResult setHauntTarget(final Player player) {
if (!HerobrineAI.getPluginCore().getSupport().checkHaunt(player.getLocation())) {
return new CoreResult(false, "Player is in secure area!");
return new CoreResult(false, player.getDisplayName() + " cannot be haunted because they are in a protected area.");
}
if (!HerobrineAI.getPluginCore().canAttackPlayerNoMSG(player)) {
return new CoreResult(false, "This player is protected.");
return new CoreResult(false, player.getDisplayName() + " is protected from being haunted by Herobrine.");
}
spawnedWolves = 0;
spawnedBats = 0;
@ -52,12 +52,12 @@ public class Haunt extends Core {
isFirst = true;
AICore.isTarget = true;
AICore.PlayerTarget = player;
AICore.log.info("[HerobrineAI] Hauntig player!");
AICore.log.info("[HerobrineAI] Herobrine is now haunting " + player.getDisplayName() + ".");
final Location loc = HerobrineAI.herobrineNPC.getBukkitEntity().getLocation();
loc.setY(-20.0);
HerobrineAI.herobrineNPC.moveTo(loc);
StartHandler();
return new CoreResult(true, "Herobrine haunts " + player.getName() + "!");
return new CoreResult(true, "Herobrine is now haunting " + player.getDisplayName() + ".");
}
public void PlaySounds() {

View File

@ -29,14 +29,14 @@ public class Heads extends Core {
@Override
public CoreResult callCore(final Object[] data) {
if (isCalled) {
return new CoreResult(false, "There are already heads! Wait until they disappear.");
return new CoreResult(false, "This player is already being haunted by heads. Please wait until they disappear.");
}
if (!Bukkit.getPlayer((String) data[0]).isOnline()) {
return new CoreResult(false, "Player is offline.");
return new CoreResult(false, "This player cannot be haunted by heads because they are not online.");
}
final Player player = Bukkit.getServer().getPlayer((String) data[0]);
if (!HerobrineAI.getPluginCore().getSupport().checkBuild(player.getLocation())) {
return new CoreResult(false, "Player is in secure area!");
return new CoreResult(false, player.getDisplayName() + " cannot be haunted by heads because they are in a protected area.");
}
if (HerobrineAI.getPluginCore().getConfigDB().useHeads) {
final Location loc = player.getLocation();
@ -66,9 +66,9 @@ public class Heads extends Core {
Heads.this.RemoveHeads();
}
}, 100L);
return new CoreResult(true, "Spawned some heads near " + player.getName() + "!");
return new CoreResult(true, player.getName() + " is now being haunted by heads.");
}
return new CoreResult(false, "Heads are disabled!");
return new CoreResult(false, "Head haunting is disabled on this server.");
}
public void RemoveHeads() {

View File

@ -57,11 +57,11 @@ public class Pyramid extends Core {
}
if (canBuild) {
BuildPyramid(loc.getWorld(), i2 + loc.getBlockX(), i1 + loc.getBlockY(), i3 + loc.getBlockZ());
return new CoreResult(true, "Creating a pyramid!");
return new CoreResult(true, "Creating pyramid...");
}
}
}
return new CoreResult(false, "Cannot create a pyramid!");
return new CoreResult(false, "Pyramid generation failed.");
}
public CoreResult FindPlace(final Player player) {
@ -99,13 +99,13 @@ public class Pyramid extends Core {
}
if (canBuild) {
BuildPyramid(loc.getWorld(), i2 + loc.getBlockX(), i1 + loc.getBlockY(), i3 + loc.getBlockZ());
return new CoreResult(true, "Creating a pyramid!");
return new CoreResult(true, "Creating a pyramid...");
}
}
}
}
}
return new CoreResult(false, "Cannot create a pyramid!");
return new CoreResult(false, "Pyramid generation failed.");
}
public void BuildPyramid(final World world, final int X, final int Y, final int Z) {

View File

@ -18,7 +18,7 @@ public class RandomExplosion extends Core {
public CoreResult callCore(final Object[] data) {
final Player player = (Player) data[0];
if (!HerobrineAI.getPluginCore().getConfigDB().explosions) {
return new CoreResult(true, "Explosions are not allowed!");
return new CoreResult(true, "Herobrine-caused explosions are disabled on this server.");
}
if (HerobrineAI.getPluginCore().getSupport().checkBuild(player.getLocation())) {
final Location loc = player.getLocation();
@ -26,9 +26,10 @@ public class RandomExplosion extends Core {
final int y = loc.getBlockY();
final int z = loc.getBlockZ() + (new Random().nextInt(16) - 8);
loc.getWorld().createExplosion(new Location(loc.getWorld(), x, y, z), 1.0f);
return new CoreResult(true, "Explosion near the player!");
return new CoreResult(true, "A Herobrine-caused explosion was set off near " + player.getDisplayName());
}
return new CoreResult(true, "Player is in secure area!");
return new CoreResult(true, "A Herobrine-caused explosion cannot be set off near " + player.getDisplayName() + " because " +
"they are in a protected area.");
}
}

View File

@ -21,7 +21,7 @@ public class RandomSound extends Core {
}
}, multip * 30L);
}
return new CoreResult(true, "Starting sound play to target!");
return new CoreResult(true, "Herobrine haunted the target with sound.");
}
}

View File

@ -25,7 +25,7 @@ public class Signs extends Core {
public CoreResult placeSign(final Location loc, final Location ploc) {
boolean status = false;
AICore.log.info("Generating sign location...");
AICore.log.info("Generating sign...");
if ((loc.getWorld().getBlockAt(loc.getBlockX() + 2, loc.getBlockY(), loc.getBlockZ()).getType() == Material.AIR)
&& (loc.getWorld().getBlockAt(loc.getBlockX() + 2, loc.getBlockY() - 1, loc.getBlockZ()).getType() != Material.AIR)) {
loc.setX(loc.getBlockX() + 2);
@ -48,9 +48,9 @@ public class Signs extends Core {
status = true;
}
if (status) {
return new CoreResult(true, "Sign placed!");
return new CoreResult(true, "Sign generated successfully.");
}
return new CoreResult(false, "Cannot place a sign!");
return new CoreResult(false, "Sign generation failed.");
}
@SuppressWarnings("deprecation")

View File

@ -21,7 +21,7 @@ public class SoundF extends Core {
public CoreResult playRandom(final Player player) {
if (!HerobrineAI.getPluginCore().getConfigDB().useSound) {
return new CoreResult(false, "Sound is disabled!");
return new CoreResult(false, "Herobrine-caused sound is disabled on this server.");
}
final Sound[] sounds = { Sound.STEP_STONE, Sound.STEP_WOOD, Sound.STEP_GRASS, Sound.STEP_SAND, Sound.STEP_GRAVEL, Sound.WITHER_HURT, Sound.WITHER_HURT, Sound.WITHER_HURT, Sound.WITHER_HURT,
Sound.DOOR_OPEN, Sound.DOOR_CLOSE, Sound.GHAST_SCREAM, Sound.GHAST_SCREAM2, Sound.WITHER_DEATH, Sound.WITHER_HURT };
@ -37,7 +37,7 @@ public class SoundF extends Core {
randz = -randz;
}
player.playSound(player.getLocation(), sounds[chance], 0.75f, 0.75f);
return new CoreResult(true, "SoundF is starting!");
return new CoreResult(true, "SoundF is starting.");
}
}

View File

@ -109,7 +109,7 @@ public class Totem extends Core {
}
}
}
return new CoreResult(false, "Totem called!");
return new CoreResult(false, "Totem called.");
}
}

View File

@ -9,7 +9,7 @@ import org.jakub1221.herobrineai.misc.StructureLoader;
public class GraveyardWorld {
public static void create() {
final Location loc = new Location(Bukkit.getServer().getWorld("world_herobrineai_graveyard"), 0.0, 3.0, 0.0);
final Location loc = new Location(Bukkit.getServer().getWorld("world_herobrine_graveyard"), 0.0, 3.0, 0.0);
for (int x = -50; x <= 50; ++x) {
for (int z = -50; z <= 50; ++z) {
loc.getWorld().getBlockAt(x, 3, z).setType(Material.MYCEL);

View File

@ -63,7 +63,7 @@ public class HerobrineAI extends JavaPlugin implements Listener {
entMng = new EntityManager();
NPCCore = new NPCCore();
configdb.reload();
getCommand("hb-ai").setExecutor(new CmdExecutor(this));
getCommand("herobrine").setExecutor(new CmdExecutor(this));
getServer().getPluginManager().registerEvents(new EntityListener(), this);
getServer().getPluginManager().registerEvents(new BlockListener(), this);
getServer().getPluginManager().registerEvents(new InventoryListener(), this);

View File

@ -33,250 +33,284 @@ public class CmdExecutor implements CommandExecutor {
if (args.length > 0) {
if (args[0].equalsIgnoreCase("attack")) {
if (args.length > 1) {
if (player.hasPermission("hb-ai.attack")) {
if (player.hasPermission("herobrine.attack")) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
if (Bukkit.getServer().getPlayer(args[1]).isOnline()) {
if (P_Core.getSupport().checkAttack(Bukkit.getServer().getPlayer(args[1]).getLocation())) {
if (P_Core.canAttackPlayer(Bukkit.getServer().getPlayer(args[1]), player)) {
if (!AICore.isTarget) {
P_Core.getAICore().setAttackTarget(Bukkit.getServer().getPlayer(args[1]));
player.sendMessage(ChatColor.RED + "[HerobrineAI] Herobrine is now attacking the " + args[1] + "!");
player.sendMessage(ChatColor.RED + "[Herobrine] Herobrine is now attacking " + args[1] + ".");
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Herobrine already has target! Use " + ChatColor.GREEN + "/hb-ai cancel" + ChatColor.RED
+ " to cancel actual target");
player.sendMessage(ChatColor.RED + "[Herobrine] Herobrine is already attacking " +
args[1] + ". Use " + ChatColor.GREEN + "/herobrine cancel" + ChatColor.RED
+ " to stop the attack.");
}
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is in secure area.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " cannot be attacked because " +
"they are in a secure area.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " cannot be attacked because they " +
"are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " cannot be attacked because they " +
"are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to initiate Herobrine " +
"attacks against other players.");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/hb-ai attack <player name>");
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/herobrine attack <player name>");
}
} else if (args[0].equalsIgnoreCase("pyramid")) {
if (args.length > 1) {
if (player.hasPermission("hb-ai.pyramid")) {
if (player.hasPermission("herobrine.pyramid")) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
if (Bukkit.getServer().getPlayer(args[1]).isOnline()) {
if (P_Core.getSupport().checkBuild(Bukkit.getServer().getPlayer(args[1]).getLocation())) {
final Object[] data = { Bukkit.getServer().getPlayer(args[1]) };
if (P_Core.getAICore().getCore(Core.CoreType.PYRAMID).runCore(data).getResult()) {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Creating pyramind near " + args[1] + "!");
player.sendMessage(ChatColor.RED + "[Herobrine] Generating a pyramind near " + args[1] +
".");
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Cannot find good place for pyramid!");
player.sendMessage(ChatColor.RED + "[Herobrine] A pyramid could not be generated near " +
args[1] + " because there is no good place for it near them.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is in secure area.");
player.sendMessage(ChatColor.RED + "[Herobrine] A pyramid could not be generated near " +
args[1] + " because they are in a protected area.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] A pyramid could not be generated near " + args[1] +
" because they are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] A pyramid could not be generated near " + args[1] +
" because they are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to create Herobrine-" +
"built pyramids near players.");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/hb-ai pyramid <player name>");
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/herobrine pyramid <player name>");
}
} else if (args[0].equalsIgnoreCase("bury")) {
if (args.length > 1) {
if (player.hasPermission("hb-ai.bury")) {
if (player.hasPermission("herobrine.bury")) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
if (Bukkit.getServer().getPlayer(args[1]).isOnline()) {
if (P_Core.getSupport().checkBuild(Bukkit.getServer().getPlayer(args[1]).getLocation())) {
final Object[] data = { Bukkit.getServer().getPlayer(args[1]) };
if (P_Core.getAICore().getCore(Core.CoreType.BURY_PLAYER).runCore(data).getResult()) {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Buried " + args[1] + "!");
player.sendMessage(ChatColor.RED + "[Herobrine] Herobrine has buried " + args[1] + ".");
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Cannot find good place!");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " could not be buried " +
"because there is no good place to bury them.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is in secure area.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " could not be buried " +
"because they are are in a protected area.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " could not be buried because " +
"they are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " could not be buried because " +
"they are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to bury players.");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/hb-ai bury <player name>");
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/herobrine bury <player name>");
}
} else if (args[0].equalsIgnoreCase("cave")) {
if (args.length > 1) {
if (player.hasPermission("hb-ai.cave")) {
if (player.hasPermission("herobrine.cave")) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
final Object[] data = { Bukkit.getServer().getPlayer(args[1]).getLocation(), true };
player.sendMessage(ChatColor.RED + "[HerobrineAI] " + P_Core.getAICore().getCore(Core.CoreType.BUILD_STUFF).runCore(data).getResultString());
player.sendMessage(ChatColor.RED + "[Herobrine] " + P_Core.getAICore().getCore(Core.CoreType.BUILD_STUFF).runCore(data).getResultString());
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] A cave could not be created near " + args[1] +
" because they are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to create caves near " +
"players.");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/hb-ai cave <player name>");
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/herobrine cave <player name>");
}
} else if (args[0].equalsIgnoreCase("burn")) {
if (args.length > 1) {
if (player.hasPermission("hb-ai.burn")) {
if (player.hasPermission("herobrine.burn")) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
final Object[] data = { Bukkit.getServer().getPlayer(args[1]) };
player.sendMessage(ChatColor.RED + "[HerobrineAI] " + P_Core.getAICore().getCore(Core.CoreType.BURN).runCore(data).getResultString());
player.sendMessage(ChatColor.RED + "[Herobrine] " + P_Core.getAICore().getCore(Core.CoreType.BURN).runCore(data).getResultString());
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " could not be burned because they " +
"not online.");
}
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to tell Herobrine " +
"to burn players.");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/hb-ai burn <player name>");
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/herobrine burn <player name>");
}
} else if (args[0].equalsIgnoreCase("curse")) {
if (args.length > 1) {
if (player.hasPermission("hb-ai.curse")) {
if (player.hasPermission("herobrine.curse")) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
final Object[] data = { Bukkit.getServer().getPlayer(args[1]) };
player.sendMessage(ChatColor.RED + "[HerobrineAI] " + P_Core.getAICore().getCore(Core.CoreType.CURSE).runCore(data).getResultString());
player.sendMessage(ChatColor.RED + "[Herobrine] " + P_Core.getAICore().getCore(Core.CoreType.CURSE).runCore(data).getResultString());
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " cannot be cursed because they " +
"are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to tell Herobrine " +
"to curse players.");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/hb-ai curse <player name>");
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/herobrine curse <player name>");
}
} else if (args[0].equalsIgnoreCase("heads")) {
if (args.length > 1) {
if (player.hasPermission("hb-ai.heads")) {
if (player.hasPermission("herobrine.heads")) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
final Object[] data = { args[1] };
player.sendMessage(ChatColor.RED + "[HerobrineAI] " + P_Core.getAICore().getCore(Core.CoreType.HEADS).runCore(data).getResultString());
player.sendMessage(ChatColor.RED + "[Herobrine] " + P_Core.getAICore().getCore(Core.CoreType.HEADS).runCore(data).getResultString());
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " cannot be haunted by heads because " +
"they are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to haunt players " +
"with heads.");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/hb-ai heads <player name>");
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/herobrine heads <player name>");
}
} else if (args[0].equalsIgnoreCase("graveyard")) {
if (args.length > 1) {
if (player.hasPermission("hb-ai.graveyard")) {
if (player.hasPermission("herobrine.graveyard")) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
if (Bukkit.getServer().getPlayer(args[1]).isOnline()) {
if (!AICore.isTarget) {
P_Core.getAICore().graveyardTeleport(Bukkit.getServer().getPlayer(args[1]));
player.sendMessage(ChatColor.RED + "[HerobrineAI] " + args[1] + " is now in the Graveyard world!");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " has been teleported to " +
"Herobrine's Graveyard.");
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Herobrine already has target! Use " + ChatColor.GREEN + "/hb-ai cancel" + ChatColor.RED
+ " to cancel actual target");
player.sendMessage(ChatColor.RED + "[Herobrine] Another player is already in Herobrine's " +
"Graveyard. Use " + ChatColor.GREEN + "/herobrine cancel" + ChatColor.RED
+ " to teleport the current player out of the graveyard.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " cannot be teleported to " +
"Herobrine's Graveyard because they are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " cannot be teleported to " +
"Herobrine's Graveyard because they are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the permissions necessary to teleport players " +
"to Herobrine's Graveyard.");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/hb-ai graveyard <player name>");
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/herobrine graveyard <player name>");
}
} else if (args[0].equalsIgnoreCase("haunt")) {
if (args.length > 1) {
if (player.hasPermission("hb-ai.haunt")) {
if (player.hasPermission("herobrine.haunt")) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
if (Bukkit.getServer().getPlayer(args[1]).isOnline()) {
if (P_Core.getSupport().checkHaunt(Bukkit.getServer().getPlayer(args[1]).getLocation())) {
if (P_Core.canAttackPlayer(Bukkit.getServer().getPlayer(args[1]), player)) {
if (!AICore.isTarget) {
P_Core.getAICore().setHauntTarget(Bukkit.getServer().getPlayer(args[1]));
player.sendMessage(ChatColor.RED + "[HerobrineAI] Herobrine now haunts the " + args[1] + "!");
player.sendMessage(ChatColor.RED + "[Herobrine] Herobrine is now haunting " + args[1] + ".");
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Herobrine already has target! Use " + ChatColor.GREEN + "/hb-ai cancel" + ChatColor.RED
+ " to cancel actual target.");
player.sendMessage(ChatColor.RED + "[Herobrine] Herobrine is already haunting another player. Use " +
ChatColor.GREEN + "/herobrine cancel" + ChatColor.RED + " to cancel the current haunting.");
}
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is in secure area.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " cannot be haunted because they" +
" are currently in a protected area.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " cannot be haunted because they " +
"are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Player is offline.");
player.sendMessage(ChatColor.RED + "[Herobrine] " + args[1] + " cannot be haunted because they " +
"are not online.");
}
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to initiate Herobrine " +
"hauntings.");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/hb-ai haunt <player name>");
player.sendMessage(ChatColor.RED + "Usage: " + ChatColor.GREEN + "/herobrine haunt <player name>");
}
} else if (args[0].equalsIgnoreCase("cancel")) {
if (player.hasPermission("hb-ai.cancel")) {
if (player.hasPermission("herobrine.cancel")) {
P_Core.getAICore().cancelTarget(Core.CoreType.ANY);
player.sendMessage(ChatColor.RED + "[HerobrineAI] Target cancelled!");
player.sendMessage(ChatColor.RED + "[Herobrine] The current Herobrine victim has been saved.");
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to cancel Herobrine's " +
"actions.");
}
} else if (args[0].equalsIgnoreCase("reload")) {
if (player.hasPermission("hb-ai.reload")) {
if (player.hasPermission("herobrine.reload")) {
P_Core.getConfigDB().reload();
player.sendMessage(ChatColor.RED + "[HerobrineAI] Config reloaded!");
player.sendMessage(ChatColor.RED + "[Herobrine] Herobrine configuration file reloaded.");
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to reload Herobrine's " +
"configuration file.");
}
} else if (args[0].equalsIgnoreCase("help")) {
if (player.hasPermission("hb-ai.help")) {
player.sendMessage(ChatColor.RED + "[HerobrineAI] Command list");
player.sendMessage(ChatColor.GREEN + "/hb-ai help - shows all commands");
player.sendMessage(ChatColor.GREEN + "/hb-ai attack <player name> - herobrine attacks the player");
player.sendMessage(ChatColor.GREEN + "/hb-ai haunt <player name> - herobrine haunts the player");
player.sendMessage(ChatColor.GREEN + "/hb-ai cancel - cancel herobrine?s actual target");
player.sendMessage(ChatColor.GREEN + "/hb-ai reload - reload config");
player.sendMessage(ChatColor.GREEN + "/hb-ai position - gets actual position of Herobrine");
player.sendMessage(ChatColor.GREEN + "/hb-ai pyramid <player name> - build pyramid near the player");
player.sendMessage(ChatColor.GREEN + "/hb-ai bury <player name> - bury player");
player.sendMessage(ChatColor.GREEN + "/hb-ai graveyard <player name> - teleport player to the Graveyard world");
player.sendMessage(ChatColor.GREEN + "/hb-ai temple <player name> - build temple near the player");
player.sendMessage(ChatColor.GREEN + "/hb-ai heads <player name> - place heads near the player");
player.sendMessage(ChatColor.GREEN + "/hb-ai cave <player name> - create cave near the player");
player.sendMessage(ChatColor.GREEN + "/hb-ai burn <player name> - burn player");
player.sendMessage(ChatColor.GREEN + "/hb-ai curse <player name> - curse player");
player.sendMessage(ChatColor.GREEN + "/hb-ai allworlds - add all worlds to config");
if (player.hasPermission("herobrine.help")) {
player.sendMessage(ChatColor.RED + "[Herobrine] Command List");
player.sendMessage(ChatColor.GREEN + "/herobrine help - Shows this list of Herobrine commands");
player.sendMessage(ChatColor.GREEN + "/herobrine attack <player name> - Sends Herobrine to attack the specified player");
player.sendMessage(ChatColor.GREEN + "/herobrine haunt <player name> - Sends Herobrine to haunt the specified player");
player.sendMessage(ChatColor.GREEN + "/herobrine cancel - Cancel's Herobrine's current actions against his current target");
player.sendMessage(ChatColor.GREEN + "/herobrine reload - Reloads the Herobrine configuration file");
player.sendMessage(ChatColor.GREEN + "/herobrine position - Displays the coordinates of Herobrine's current location");
player.sendMessage(ChatColor.GREEN + "/herobrine pyramid <player name> - Builds a pyramid near the specified player");
player.sendMessage(ChatColor.GREEN + "/herobrine bury <player name> - Buries the specified player");
player.sendMessage(ChatColor.GREEN + "/herobrine graveyard <player name> - Teleports the specified player to Herobrine's Graveyard");
player.sendMessage(ChatColor.GREEN + "/herobrine temple <player name> - Builds a temple near the specified player");
player.sendMessage(ChatColor.GREEN + "/herobrine heads <player name> - Spawns heads near the specified player");
player.sendMessage(ChatColor.GREEN + "/herobrine cave <player name> - Creates a cave near the specified player");
player.sendMessage(ChatColor.GREEN + "/herobrine burn <player name> - Burns the specified player");
player.sendMessage(ChatColor.GREEN + "/herobrine curse <player name> - Places Herobine's curse on the specified player");
player.sendMessage(ChatColor.GREEN + "/herobrine allworlds - Adds all server worlds to the list of worlds Herobrine is allowed in");
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do not have the necessary permissions to view the Herobrine command documentation.");
}
} else if (args[0].equalsIgnoreCase("allworlds")) {
if (player.hasPermission("hb-ai.allworlds")) {
if (player.hasPermission("herobrine.allworlds")) {
HerobrineAI.getPluginCore().getConfigDB().addAllWorlds();
player.sendMessage(ChatColor.GREEN + "[HerobrineAI] All worlds have been added to config.");
player.sendMessage(ChatColor.YELLOW + "[HerobrineAI] Note: Worlds with blank spaces can cause problems!");
player.sendMessage(ChatColor.GREEN + "[Herobrine] All server worlds have been added to the configuration file. Herobrine can now access all of the server's worlds.");
player.sendMessage(ChatColor.YELLOW + "[Herobrine] WARNING! - One or more server worlds was determined to have a space in its name. Please be aware that worlds with spaces in their name may cause problems.");
} else {
player.sendMessage(ChatColor.RED + "You don?t have permissions to do that.");
player.sendMessage(ChatColor.RED + "You do no have the necessary permissions to add all server worlds to the configuration file.");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: /hb-ai help");
player.sendMessage(ChatColor.RED + "Usage: /herobrine help");
}
} else {
player.sendMessage(ChatColor.RED + "Usage: /hb-ai help");
player.sendMessage(ChatColor.RED + "Usage: /herobrine help");
}
return true;
}
@ -289,22 +323,22 @@ public class CmdExecutor implements CommandExecutor {
if (P_Core.canAttackPlayerConsole(Bukkit.getServer().getPlayer(args[1]))) {
if (!AICore.isTarget) {
P_Core.getAICore().setAttackTarget(Bukkit.getServer().getPlayer(args[1]));
log.info("[HerobrineAI] Herobrine is now attacking the " + args[1] + "!");
log.info("[Herobrine] Herobrine is now attacking " + args[1] + ".");
} else {
log.info("[HerobrineAI] Herobrine already has target! Use /hb-ai cancel to cancel actual target");
log.info("[Herobrine] Herobrine is already attacking " + args[1] + ". Use /herobrine cancel to stop the attack.");
}
}
} else {
log.info("[HerobrineAI] Player is in secured area.");
log.info("[Herobrine] " + args[1] + " cannot be attacked because they are in a secure area.");
}
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " cannot be attacked because they are not online.");
}
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " cannot be attacked because they are not online.");
}
} else {
log.info("Usage: /hb-ai attack <player name>");
log.info("Usage: /herobrine attack <player name>");
}
} else if (args[0].equalsIgnoreCase("pyramid")) {
if (args.length > 1) {
@ -313,21 +347,23 @@ public class CmdExecutor implements CommandExecutor {
if (P_Core.getSupport().checkBuild(Bukkit.getServer().getPlayer(args[1]).getLocation())) {
final Object[] data2 = { Bukkit.getServer().getPlayer(args[1]) };
if (P_Core.getAICore().getCore(Core.CoreType.PYRAMID).runCore(data2).getResult()) {
log.info("[HerobrineAI] Creating pyramind near " + args[1] + "!");
log.info("[Herobrine] Generating a pyramind near " + args[1] + ".");
} else {
log.info("[HerobrineAI] Cannot find good place for pyramid!");
log.info("[Herobrine] A pyramid could not be generated near " + args[1] +
" because there is no good place for it near them.");
}
} else {
log.info("[HerobrineAI] Player is in secure area.");
log.info("[Herobrine] A pyramid could not be generated near " + args[1] + " because they are in" +
" a protected area.");
}
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] A pyramid could not be generated near " + args[1] + " because they are not online.");
}
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] A pyramid could not be generated near " + args[1] + " because they are not online.");
}
} else {
log.info("Usage: " + ChatColor.GREEN + "/hb-ai pyramid <player name>");
log.info("Usage: " + ChatColor.GREEN + "/herobrine pyramid <player name>");
}
} else if (args[0].equalsIgnoreCase("bury")) {
if (args.length > 1) {
@ -336,65 +372,67 @@ public class CmdExecutor implements CommandExecutor {
if (P_Core.getSupport().checkBuild(Bukkit.getServer().getPlayer(args[1]).getLocation())) {
final Object[] data2 = { Bukkit.getServer().getPlayer(args[1]) };
if (P_Core.getAICore().getCore(Core.CoreType.BURY_PLAYER).runCore(data2).getResult()) {
log.info("[HerobrineAI] Buried " + args[1] + "!");
log.info("[Herobrine] Herobrine has buried " + args[1] + ".");
} else {
log.info("[HerobrineAI] Cannot find good place!");
log.info("[Herobrine] " + args[1] + " could not be buried " + "because there is no good place to " +
"bury them.");
}
} else {
log.info("[HerobrineAI] Player is in secure area.");
log.info("[Herobrine] " + args[1] + " could not be buried " + "because they are are in a protected area.");
}
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " could not be buried because " + "they are not online.");
}
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " could not be buried because " + "they are not online.");
}
} else {
log.info("Usage: /hb-ai bury <player name>");
log.info("Usage: /herobrine bury <player name>");
}
} else if (args[0].equalsIgnoreCase("cave")) {
if (args.length > 1) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
final Object[] data2 = { Bukkit.getServer().getPlayer(args[1]).getLocation(), true };
log.info(ChatColor.RED + "[HerobrineAI] " + P_Core.getAICore().getCore(Core.CoreType.BUILD_STUFF).runCore(data2).getResultString());
log.info(ChatColor.RED + "[Herobrine] " + P_Core.getAICore().getCore(Core.CoreType.BUILD_STUFF).runCore(data2).getResultString());
} else {
log.info(ChatColor.RED + "[HerobrineAI] Player is offline.");
log.info(ChatColor.RED + "[Herobrine] A cave could not be created near " + args[1] +
" because they are not online.");
}
} else {
log.info("Usage: /hb-ai cave <player name>");
log.info("Usage: /herobrine cave <player name>");
}
} else if (args[0].equalsIgnoreCase("burn")) {
if (args.length > 1) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
final Object[] data2 = { Bukkit.getServer().getPlayer(args[1]) };
log.info("[HerobrineAI] " + P_Core.getAICore().getCore(Core.CoreType.BURN).runCore(data2).getResultString());
log.info("[Herobrine] " + P_Core.getAICore().getCore(Core.CoreType.BURN).runCore(data2).getResultString());
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " could not be burned because they " + "not online.");
}
} else {
log.info("Usage: /hb-ai burn <player name>");
log.info("Usage: /herobrine burn <player name>");
}
} else if (args[0].equalsIgnoreCase("curse")) {
if (args.length > 1) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
final Object[] data2 = { Bukkit.getServer().getPlayer(args[1]) };
log.info("[HerobrineAI] " + P_Core.getAICore().getCore(Core.CoreType.CURSE).runCore(data2).getResultString());
log.info("[Herobrine] " + P_Core.getAICore().getCore(Core.CoreType.CURSE).runCore(data2).getResultString());
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " cannot be cursed because they " + "are not online.");
}
} else {
log.info("Usage: /hb-ai curse <player name>");
log.info("Usage: /herobrine curse <player name>");
}
} else if (args[0].equalsIgnoreCase("heads")) {
if (args.length > 1) {
if (Bukkit.getServer().getPlayer(args[1]) != null) {
final Object[] data2 = { args[1] };
log.info("[HerobrineAI] " + P_Core.getAICore().getCore(Core.CoreType.HEADS).runCore(data2).getResultString());
log.info("[Herobrine] " + P_Core.getAICore().getCore(Core.CoreType.HEADS).runCore(data2).getResultString());
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " cannot be haunted by heads because they are not online.");
}
} else {
log.info("Usage: " + ChatColor.GREEN + "/hb-ai heads <player name>");
log.info("Usage: " + ChatColor.GREEN + "/herobrine heads <player name>");
}
} else if (args[0].equalsIgnoreCase("graveyard")) {
if (args.length > 1) {
@ -402,18 +440,22 @@ public class CmdExecutor implements CommandExecutor {
if (Bukkit.getServer().getPlayer(args[1]).isOnline()) {
if (!AICore.isTarget) {
P_Core.getAICore().graveyardTeleport(Bukkit.getServer().getPlayer(args[1]));
log.info("[HerobrineAI] " + args[1] + " is now in the Graveyard world!");
log.info("[Herobrine] " + args[1] + " is now in the Graveyard world!");
} else {
log.info("[HerobrineAI] Herobrine already has target! Use " + ChatColor.GREEN + "/hb-ai cancel" + ChatColor.RED + " to cancel actual target");
log.info(ChatColor.RED + "[Herobrine] Another player is already in Herobrine's " +
"Graveyard. Use " + ChatColor.GREEN + "/herobrine cancel" + ChatColor.RED
+ " to teleport the current player out of the graveyard.");
}
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " cannot be teleported to Herobrine's Graveyard because they are " +
"not online.");
}
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " cannot be teleported to Herobrine's Graveyard because they are " +
"not online.");
}
} else {
log.info("Usage: /hb-ai graveyard <player name>");
log.info("Usage: /herobrine graveyard <player name>");
}
} else if (args[0].equalsIgnoreCase("haunt")) {
if (args.length > 1) {
@ -423,54 +465,56 @@ public class CmdExecutor implements CommandExecutor {
if (P_Core.canAttackPlayerConsole(Bukkit.getServer().getPlayer(args[1]))) {
if (!AICore.isTarget) {
P_Core.getAICore().setHauntTarget(Bukkit.getServer().getPlayer(args[1]));
log.info("[HerobrineAI] Herobrine now haunts the " + args[1] + "!");
log.info("[Herobrine] Herobrine is now haunting " + args[1] + ".");
} else {
log.info("[HerobrineAI] Herobrine already has target! Use /hb-ai cancel to cancel actual target.");
log.info("[Herobrine] Herobrine is already haunting another player. Use /herobrine cancel to" +
" cancel the current haunting.");
}
}
} else {
log.info("[HerobrineAI] Player is in secure area.");
log.info("[Herobrine] " + args[1] + " cannot be haunted because they are currently in a protected area.");
}
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " cannot be haunted because they are not online.");
}
} else {
log.info("[HerobrineAI] Player is offline.");
log.info("[Herobrine] " + args[1] + " cannot be haunted because they are not online.");
}
} else {
log.info("Usage: /hb-ai haunt <player name>");
log.info("Usage: /herobrine haunt <player name>");
}
} else if (args[0].equalsIgnoreCase("cancel")) {
P_Core.getAICore().cancelTarget(Core.CoreType.ANY);
log.info(ChatColor.RED + "[HerobrineAI] Target cancelled!");
log.info(ChatColor.RED + "[Herobrine] The current Herobrine victim has been saved.");
} else if (args[0].equalsIgnoreCase("reload")) {
P_Core.getConfigDB().reload();
log.info("[HerobrineAI] Config reloaded!");
log.info("[Herobrine] Herobrine configuration file reloaded.");
} else if (args[0].equalsIgnoreCase("help")) {
log.info("[HerobrineAI] Command list");
log.info("/hb-ai help - shows all commands");
log.info("/hb-ai attack <player name> - herobrine attacks the player");
log.info("/hb-ai haunt <player name> - herobrine haunts the player");
log.info("/hb-ai cancel - cancel herobrine?s actual target");
log.info("/hb-ai reload - reload config");
log.info("/hb-ai position - gets actual position of Herobrine");
log.info("/hb-ai pyramid <player name> - build pyramid near the player");
log.info("/hb-ai bury <player name> - bury player");
log.info("/hb-ai graveyard <player name> - teleport player to the Graveyard world");
log.info("/hb-ai heads <player name> - place heads near the player");
log.info("/hb-ai cave <player name> - create cave near the player");
log.info("/hb-ai burn <player name> - burn player");
log.info("/hb-ai curse <player name> - curse player");
log.info("/hb-ai allworlds - add all worlds to config");
log.info("[Herobrine] Command List");
log.info("/herobrine help - Shows this list of Herobrine commands");
log.info("/herobrine attack <player name> - Sends Herobrine to attack the specified player");
log.info("/herobrine haunt <player name> - Sends Herobrine to haunt the specified player");
log.info("/herobrine cancel - Cancel's Herobrine's current actions against his current target");
log.info("/herobrine reload - Reloads the Herobrine configuration file");
log.info("/herobrine position - Displays the coordinates of Herobrine's current location");
log.info("/herobrine pyramid <player name> - Builds a pyramid near the specified player");
log.info("/herobrine bury <player name> - Buries the specified player");
log.info("/herobrine graveyard <player name> - Teleports the specified player to Herobrine's Graveyard");
log.info("/herobrine temple <player name> - Builds a temple near the specified player");
log.info("/herobrine heads <player name> - Spawns heads near the specified player");
log.info("/herobrine cave <player name> - Creates a cave near the specified player");
log.info("/herobrine burn <player name> - Burns the specified player");
log.info("/herobrine curse <player name> - Places Herobine's curse on the specified player");
log.info("/herobrine allworlds - Adds all server worlds to the list of worlds Herobrine is allowed in");
} if (args[0].equalsIgnoreCase("allworlds")) {
HerobrineAI.getPluginCore().getConfigDB().addAllWorlds();
log.info("[HerobrineAI] All worlds have been added to config.");
log.info("[HerobrineAI] Note: Worlds with blank spaces can cause problems!");
log.info("[Herobrine] All server worlds have been added to the configuration file. Herobrine can now access all of the server's worlds.");
log.info("[Herobrine] WARNING! - One or more server worlds was determined to have a space in its name. Please be aware that worlds with spaces in their name may cause problems.");
} else {
log.info("Usage: /hb-ai help");
log.info("Usage: /herobrine help");
}
} else {
log.info("Usage: /hb-ai help");
log.info("Usage: /herobrine help");
}
return true;
}

View File

@ -44,14 +44,14 @@ public class BlockListener implements Listener {
}
}
}
if (event.getBlock().getWorld() == Bukkit.getServer().getWorld("world_herobrineai_graveyard")) {
if (event.getBlock().getWorld() == Bukkit.getServer().getWorld("world_herobrine_graveyard")) {
event.setCancelled(true);
}
}
@EventHandler
public void onBlockBreak(final BlockBreakEvent event) {
if (event.getBlock().getWorld() == Bukkit.getServer().getWorld("world_herobrineai_graveyard")) {
if (event.getBlock().getWorld() == Bukkit.getServer().getWorld("world_herobrine_graveyard")) {
event.setCancelled(true);
return;
}
@ -64,7 +64,7 @@ public class BlockListener implements Listener {
@EventHandler
public void onBlockPlace(final BlockPlaceEvent event) {
if (event.getBlock().getWorld() == Bukkit.getServer().getWorld("world_herobrineai_graveyard")) {
if (event.getBlock().getWorld() == Bukkit.getServer().getWorld("world_herobrine_graveyard")) {
event.setCancelled(true);
}
}

View File

@ -67,7 +67,7 @@ public class PlayerListener implements Listener {
public void onPlayerQuit(final PlayerQuitEvent event) {
if (event.getPlayer().getEntityId() != HerobrineAI.herobrineEntityID) {
HerobrineAI.getPluginCore().getAICore();
if ((AICore.PlayerTarget == event.getPlayer()) && (HerobrineAI.getPluginCore().getAICore().getCoreTypeNow() == Core.CoreType.GRAVEYARD) && (event.getPlayer().getLocation().getWorld() == Bukkit.getServer().getWorld("world_herobrineai_graveyard"))) {
if ((AICore.PlayerTarget == event.getPlayer()) && (HerobrineAI.getPluginCore().getAICore().getCoreTypeNow() == Core.CoreType.GRAVEYARD) && (event.getPlayer().getLocation().getWorld() == Bukkit.getServer().getWorld("world_herobrine_graveyard"))) {
HerobrineAI.getPluginCore().getAICore();
if (AICore.isTarget) {
event.getPlayer().teleport(HerobrineAI.getPluginCore().getAICore().getGraveyard().getSavedLocation());
@ -97,7 +97,7 @@ public class PlayerListener implements Listener {
@EventHandler
public void onPlayerCommand(final PlayerCommandPreprocessEvent event) {
if (event.getPlayer().getWorld() == Bukkit.getServer().getWorld("world_herobrineai_graveyard") && !event.getPlayer().hasPermission("hb-ai.cmdblockbypass")) {
if (event.getPlayer().getWorld() == Bukkit.getServer().getWorld("world_herobrine_graveyard") && !event.getPlayer().hasPermission("hb-ai.cmdblockbypass")) {
event.setCancelled(true);
}
}
@ -116,9 +116,9 @@ public class PlayerListener implements Listener {
@EventHandler
public void onPlayerMoveEvent(final PlayerMoveEvent event) {
if ((event.getPlayer().getEntityId() != HerobrineAI.herobrineEntityID) && (event.getPlayer().getWorld() == Bukkit.getServer().getWorld("world_herobrineai_graveyard"))) {
if ((event.getPlayer().getEntityId() != HerobrineAI.herobrineEntityID) && (event.getPlayer().getWorld() == Bukkit.getServer().getWorld("world_herobrine_graveyard"))) {
final Player player = event.getPlayer();
player.teleport(new Location(Bukkit.getServer().getWorld("world_herobrineai_graveyard"), -2.49, 4.0, 10.69, -179.85f, 0.44999f));
player.teleport(new Location(Bukkit.getServer().getWorld("world_herobrine_graveyard"), -2.49, 4.0, 10.69, -179.85f, 0.44999f));
}
}

View File

@ -30,7 +30,7 @@ public class EntityInjector {
} catch (Throwable t) {
t.printStackTrace();
HerobrineAI.isNPCDisabled = true;
HerobrineAI.log.warning("[HerobrineAI] Custom NPCs have been disabled. (Incompatibility error!)");
HerobrineAI.log.warning("[Herobrine] Custom NPCs have been disabled due to a compatibility issue.");
}
}

View File

@ -1,4 +1,4 @@
name: HerobrineAI
name: Herobrine for Bukkit or Spigot
main: org.jakub1221.herobrineai.HerobrineAI
version: 1.0.0
commands: