Renamed "HerobrineAI.java" to "Herobrine.java" and replaced "HerobrineAI" branding with "Herobrine"
This commit is contained in:
parent
686cfc75e4
commit
e4a8ca3b81
@ -1,5 +1,5 @@
|
||||
name: Herobrine
|
||||
main: net.theprogrammersworld.herobrine.HerobrineAI
|
||||
main: net.theprogrammersworld.herobrine.Herobrine
|
||||
version: 2.0.0
|
||||
description: "Bring Herobrine to your Spigot-based Minecraft server!"
|
||||
website: https://www.theprogrammersworld.net
|
||||
|
@ -16,7 +16,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import net.minecraft.server.v1_15_R1.EntityPlayer;
|
||||
import net.minecraft.server.v1_15_R1.PacketPlayOutPlayerInfo;
|
||||
import net.minecraft.server.v1_15_R1.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
import net.theprogrammersworld.herobrine.AI.cores.Attack;
|
||||
@ -46,7 +46,7 @@ public class AICore {
|
||||
|
||||
private ArrayList<Core> AllCores = new ArrayList<Core>();
|
||||
private CoreType CoreNow = CoreType.ANY;
|
||||
public static HerobrineAI plugin;
|
||||
public static Herobrine plugin;
|
||||
public static Player PlayerTarget;
|
||||
public static boolean isTarget = false;
|
||||
public static int ticksToEnd = 0;
|
||||
@ -103,8 +103,8 @@ public class AICore {
|
||||
|
||||
resetLimits = new ResetLimits();
|
||||
|
||||
plugin = HerobrineAI.getPluginCore();
|
||||
log.info("[HerobrineAI] Debug mode enabled!");
|
||||
plugin = Herobrine.getPluginCore();
|
||||
log.info("[Herobrine] Debug mode enabled!");
|
||||
FindPlayer();
|
||||
StartIntervals();
|
||||
|
||||
@ -140,7 +140,7 @@ public class AICore {
|
||||
|
||||
String result = "";
|
||||
|
||||
if (HerobrineAI.getPluginCore().getAICore().getCoreTypeNow() == CoreType.RANDOM_POSITION) {
|
||||
if (Herobrine.getPluginCore().getAICore().getCoreTypeNow() == CoreType.RANDOM_POSITION) {
|
||||
result = "Yes";
|
||||
} else {
|
||||
result = "No";
|
||||
@ -157,41 +157,41 @@ public class AICore {
|
||||
} else if (chance < 50) {
|
||||
setHauntTarget(player);
|
||||
} else {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().UseNPC_Demon && !HerobrineAI.isNPCDisabled) {
|
||||
HerobrineAI.getPluginCore().getEntityManager().spawnCustomSkeleton(player.getLocation(), MobType.DEMON);
|
||||
if (Herobrine.getPluginCore().getConfigDB().UseNPC_Demon && !Herobrine.isNPCDisabled) {
|
||||
Herobrine.getPluginCore().getEntityManager().spawnCustomSkeleton(player.getLocation(), MobType.DEMON);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void FindPlayer() {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().OnlyWalkingMode == false) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().OnlyWalkingMode == false) {
|
||||
|
||||
if (isTarget == false) {
|
||||
|
||||
int att_chance = Utils.getRandomGen().nextInt(100);
|
||||
log.info("[HerobrineAI] Generating find chance...");
|
||||
log.info("[Herobrine] Generating find chance...");
|
||||
|
||||
if (att_chance - (HerobrineAI.getPluginCore().getConfigDB().ShowRate * 4) < 55) {
|
||||
if (att_chance - (Herobrine.getPluginCore().getConfigDB().ShowRate * 4) < 55) {
|
||||
|
||||
if (Bukkit.getServer().getOnlinePlayers().size() > 0) {
|
||||
|
||||
log.info("[HerobrineAI] Finding target...");
|
||||
log.info("[Herobrine] Finding target...");
|
||||
Player targetPlayer = Utils.getRandomPlayer();
|
||||
|
||||
if (targetPlayer.getEntityId() != HerobrineAI.getPluginCore().HerobrineEntityID) {
|
||||
if (targetPlayer.getEntityId() != Herobrine.getPluginCore().HerobrineEntityID) {
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().useWorlds
|
||||
if (Herobrine.getPluginCore().getConfigDB().useWorlds
|
||||
.contains(targetPlayer.getLocation().getWorld().getName())
|
||||
&& HerobrineAI.getPluginCore().canAttackPlayerNoMSG(targetPlayer)) {
|
||||
&& Herobrine.getPluginCore().canAttackPlayerNoMSG(targetPlayer)) {
|
||||
|
||||
CancelTarget(CoreType.ANY);
|
||||
isTarget = true;
|
||||
log.info("[HerobrineAI] Target founded, starting AI now! (" + targetPlayer.getName()+ ")");
|
||||
log.info("[Herobrine] Target founded, starting AI now! (" + targetPlayer.getName()+ ")");
|
||||
setCoreTypeNow(CoreType.START);
|
||||
StartAI();
|
||||
|
||||
} else {
|
||||
log.info("[HerobrineAI] Target is in the safe world! ("+ targetPlayer.getLocation().getWorld().getName() + ")");
|
||||
log.info("[Herobrine] Target is in the safe world! ("+ targetPlayer.getLocation().getWorld().getName() + ")");
|
||||
FindPlayer();
|
||||
}
|
||||
|
||||
@ -218,9 +218,9 @@ public class AICore {
|
||||
nowloc.setYaw(1.f);
|
||||
nowloc.setPitch(1.f);
|
||||
|
||||
HerobrineAI.getPluginCore().HerobrineNPC.moveTo(nowloc);
|
||||
Herobrine.getPluginCore().HerobrineNPC.moveTo(nowloc);
|
||||
CoreNow = CoreType.ANY;
|
||||
HerobrineAI.getPluginCore().getPathManager().setPath(null);
|
||||
Herobrine.getPluginCore().getPathManager().setPath(null);
|
||||
}
|
||||
|
||||
if (isTarget == true) {
|
||||
@ -233,21 +233,21 @@ public class AICore {
|
||||
|
||||
_ticks = 0;
|
||||
isTarget = false;
|
||||
HerobrineAI.HerobrineHP = HerobrineAI.HerobrineMaxHP;
|
||||
Herobrine.HerobrineHP = Herobrine.HerobrineMaxHP;
|
||||
|
||||
log.info("[HerobrineAI] Target cancelled.");
|
||||
log.info("[Herobrine] Target cancelled.");
|
||||
Location nowloc = new Location((World) Bukkit.getServer().getWorlds().get(0), 0, -20.f, 0);
|
||||
|
||||
nowloc.setYaw(1.f);
|
||||
nowloc.setPitch(1.f);
|
||||
|
||||
HerobrineAI.getPluginCore().HerobrineNPC.moveTo(nowloc);
|
||||
Herobrine.getPluginCore().HerobrineNPC.moveTo(nowloc);
|
||||
CoreNow = CoreType.ANY;
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(AICore.plugin, new Runnable() {
|
||||
public void run() {
|
||||
FindPlayer();
|
||||
}
|
||||
}, (6 / HerobrineAI.getPluginCore().getConfigDB().ShowRate) * (HerobrineAI.getPluginCore().getConfigDB().ShowInterval * 1L));
|
||||
}, (6 / Herobrine.getPluginCore().getConfigDB().ShowRate) * (Herobrine.getPluginCore().getConfigDB().ShowInterval * 1L));
|
||||
|
||||
}
|
||||
}
|
||||
@ -259,8 +259,8 @@ public class AICore {
|
||||
Object[] data = { PlayerTarget };
|
||||
int chance = Utils.getRandomGen().nextInt(100);
|
||||
if (chance <= 10) {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().UseGraveyardWorld == true) {
|
||||
log.info("[HerobrineAI] Teleporting target to Graveyard world.");
|
||||
if (Herobrine.getPluginCore().getConfigDB().UseGraveyardWorld == true) {
|
||||
log.info("[Herobrine] Teleporting target to Graveyard world.");
|
||||
|
||||
getCore(CoreType.GRAVEYARD).RunCore(data);
|
||||
|
||||
@ -322,10 +322,10 @@ public class AICore {
|
||||
private void RandomPositionInterval() {
|
||||
if (CoreNow == CoreType.ANY) {
|
||||
((RandomPosition) getCore(CoreType.RANDOM_POSITION)).setRandomTicks(0);
|
||||
int count = HerobrineAI.getPluginCore().getConfigDB().useWorlds.size();
|
||||
int count = Herobrine.getPluginCore().getConfigDB().useWorlds.size();
|
||||
int chance = Utils.getRandomGen().nextInt(count);
|
||||
Object[] data = {
|
||||
Bukkit.getServer().getWorld(HerobrineAI.getPluginCore().getConfigDB().useWorlds.get(chance)) };
|
||||
Bukkit.getServer().getWorld(Herobrine.getPluginCore().getConfigDB().useWorlds.get(chance)) };
|
||||
getCore(CoreType.RANDOM_POSITION).RunCore(data);
|
||||
|
||||
}
|
||||
@ -354,24 +354,24 @@ public class AICore {
|
||||
|
||||
if (Utils.getRandomGen().nextBoolean()) {
|
||||
if (Bukkit.getServer().getOnlinePlayers().size() > 0) {
|
||||
log.info("[HerobrineAI] Finding pyramid target...");
|
||||
log.info("[Herobrine] Finding pyramid target...");
|
||||
|
||||
Player player = Utils.getRandomPlayer();
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().useWorlds.contains(player.getLocation().getWorld().getName())) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().useWorlds.contains(player.getLocation().getWorld().getName())) {
|
||||
|
||||
int chance2 = Utils.getRandomGen().nextInt(100);
|
||||
if (chance2 < 30) {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().BuildPyramids == true) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().BuildPyramids == true) {
|
||||
Object[] data = { player };
|
||||
getCore(CoreType.PYRAMID).RunCore(data);
|
||||
}
|
||||
} else if (chance2 < 70) {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().BuryPlayers) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().BuryPlayers) {
|
||||
Object[] data = { player };
|
||||
getCore(CoreType.BURY_PLAYER).RunCore(data);
|
||||
}
|
||||
} else {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().UseHeads) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().UseHeads) {
|
||||
Object[] data = { player.getName() };
|
||||
getCore(CoreType.HEADS).RunCore(data);
|
||||
}
|
||||
@ -384,14 +384,14 @@ public class AICore {
|
||||
}
|
||||
|
||||
private void TempleInterval() {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().BuildTemples == true) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().BuildTemples == true) {
|
||||
if (Utils.getRandomGen().nextBoolean()) {
|
||||
if (Bukkit.getServer().getOnlinePlayers().size() > 0) {
|
||||
log.info("[HerobrineAI] Finding temple target...");
|
||||
log.info("[Herobrine] Finding temple target...");
|
||||
|
||||
Player player = Utils.getRandomPlayer();
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().useWorlds.contains(player.getLocation().getWorld().getName())) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().useWorlds.contains(player.getLocation().getWorld().getName())) {
|
||||
if (Utils.getRandomGen().nextBoolean()) {
|
||||
Object[] data = { player };
|
||||
getCore(CoreType.TEMPLE).RunCore(data);
|
||||
@ -405,13 +405,13 @@ public class AICore {
|
||||
}
|
||||
|
||||
private void BuildCave() {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().BuildStuff == true) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().BuildStuff == true) {
|
||||
if (Utils.getRandomGen().nextBoolean()) {
|
||||
if (Bukkit.getServer().getOnlinePlayers().size() > 0) {
|
||||
|
||||
Player player = Utils.getRandomPlayer();
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().useWorlds
|
||||
if (Herobrine.getPluginCore().getConfigDB().useWorlds
|
||||
.contains(player.getLocation().getWorld().getName())) {
|
||||
|
||||
if (Utils.getRandomGen().nextBoolean()) {
|
||||
@ -440,20 +440,20 @@ public class AICore {
|
||||
|
||||
Player player = Utils.getRandomPlayer();
|
||||
|
||||
if (player.getEntityId() != HerobrineAI.getPluginCore().HerobrineEntityID) {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().useWorlds
|
||||
if (player.getEntityId() != Herobrine.getPluginCore().HerobrineEntityID) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().useWorlds
|
||||
.contains(player.getLocation().getWorld().getName())) {
|
||||
Object[] data = { player };
|
||||
if (HerobrineAI.getPluginCore().canAttackPlayerNoMSG(player)) {
|
||||
if (Herobrine.getPluginCore().canAttackPlayerNoMSG(player)) {
|
||||
if (Utils.getRandomGen().nextInt(100) < 30) {
|
||||
|
||||
getCore(CoreType.RANDOM_SOUND).RunCore(data);
|
||||
} else if (Utils.getRandomGen().nextInt(100) < 60) {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().Burn) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().Burn) {
|
||||
getCore(CoreType.BURN).RunCore(data);
|
||||
}
|
||||
} else if (Utils.getRandomGen().nextInt(100) < 80) {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().Curse) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().Curse) {
|
||||
getCore(CoreType.CURSE).RunCore(data);
|
||||
}
|
||||
} else {
|
||||
@ -473,14 +473,14 @@ public class AICore {
|
||||
|
||||
for(int i=0; i < 5; i++){
|
||||
for(float j=0; j < 2; j+= 0.5f){
|
||||
Location hbloc = (Location) HerobrineAI.getPluginCore().HerobrineNPC.getBukkitEntity().getLocation();
|
||||
Location hbloc = (Location) Herobrine.getPluginCore().HerobrineNPC.getBukkitEntity().getLocation();
|
||||
hbloc.setY(hbloc.getY() + j);
|
||||
hbloc.getWorld().playEffect(hbloc, Effect.SMOKE, 80);
|
||||
}
|
||||
}
|
||||
|
||||
ploc.setY(-20);
|
||||
HerobrineAI.getPluginCore().HerobrineNPC.moveTo(ploc);
|
||||
Herobrine.getPluginCore().HerobrineNPC.moveTo(ploc);
|
||||
|
||||
}
|
||||
|
||||
@ -523,8 +523,8 @@ public class AICore {
|
||||
public void run() {
|
||||
BuildInterval();
|
||||
}
|
||||
}, 1 * 1L * HerobrineAI.getPluginCore().getConfigDB().BuildInterval,
|
||||
1 * 1L * HerobrineAI.getPluginCore().getConfigDB().BuildInterval);
|
||||
}, 1 * 1L * Herobrine.getPluginCore().getConfigDB().BuildInterval,
|
||||
1 * 1L * Herobrine.getPluginCore().getConfigDB().BuildInterval);
|
||||
}
|
||||
|
||||
public void Start_MAIN() {
|
||||
@ -534,10 +534,10 @@ public class AICore {
|
||||
FindPlayer();
|
||||
|
||||
}
|
||||
}, (6 / HerobrineAI.getPluginCore().getConfigDB().ShowRate)
|
||||
* (HerobrineAI.getPluginCore().getConfigDB().ShowInterval * 1L),
|
||||
(6 / HerobrineAI.getPluginCore().getConfigDB().ShowRate)
|
||||
* (HerobrineAI.getPluginCore().getConfigDB().ShowInterval * 1L));
|
||||
}, (6 / Herobrine.getPluginCore().getConfigDB().ShowRate)
|
||||
* (Herobrine.getPluginCore().getConfigDB().ShowInterval * 1L),
|
||||
(6 / Herobrine.getPluginCore().getConfigDB().ShowRate)
|
||||
* (Herobrine.getPluginCore().getConfigDB().ShowInterval * 1L));
|
||||
}
|
||||
|
||||
public void Start_RM() {
|
||||
@ -566,8 +566,8 @@ public class AICore {
|
||||
public void run() {
|
||||
RandomCoreINT();
|
||||
}
|
||||
}, (long) (HerobrineAI.getPluginCore().getConfigDB().ShowInterval / 1.5),
|
||||
(long) (HerobrineAI.getPluginCore().getConfigDB().ShowInterval / 1.5));
|
||||
}, (long) (Herobrine.getPluginCore().getConfigDB().ShowInterval / 1.5),
|
||||
(long) (Herobrine.getPluginCore().getConfigDB().ShowInterval / 1.5));
|
||||
}
|
||||
|
||||
public void Start_CG() {
|
||||
@ -676,18 +676,18 @@ public class AICore {
|
||||
public boolean toggleHerobrinePlayerVisibilityNoTeleport(Player p) {
|
||||
// Toggles the visibility of Herobrine for the given player. This function does not perform the "visibility activation teleport".
|
||||
// If an activiation teleport should be performed, returns true, otherwise, false.
|
||||
boolean playerCanSeeHerobrine = p.hasLineOfSight(HerobrineAI.getPluginCore().HerobrineNPC.getBukkitEntity());
|
||||
boolean playerCanSeeHerobrine = p.hasLineOfSight(Herobrine.getPluginCore().HerobrineNPC.getBukkitEntity());
|
||||
if(playerCanSeeHerobrine && !visibilityList.contains(p)) {
|
||||
// If player p can see Herobrine but visibilty is not already enabled, then enable it.
|
||||
EntityPlayer pcon = ((CraftPlayer) p).getHandle();
|
||||
pcon.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.ADD_PLAYER, HerobrineAI.getPluginCore().HerobrineNPC.getEntity()));
|
||||
pcon.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.ADD_PLAYER, Herobrine.getPluginCore().HerobrineNPC.getEntity()));
|
||||
visibilityList.add(p);
|
||||
return true;
|
||||
}
|
||||
else if(!playerCanSeeHerobrine && visibilityList.contains(p)) {
|
||||
// If player p cannot see Herobrine but visibility is still enabled, then disable it.
|
||||
EntityPlayer pcon = ((CraftPlayer) p).getHandle();
|
||||
pcon.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.REMOVE_PLAYER, HerobrineAI.getPluginCore().HerobrineNPC.getEntity()));
|
||||
pcon.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.REMOVE_PLAYER, Herobrine.getPluginCore().HerobrineNPC.getEntity()));
|
||||
visibilityList.remove(p);
|
||||
}
|
||||
return false;
|
||||
@ -695,9 +695,9 @@ public class AICore {
|
||||
|
||||
public void visibilityActivationTeleport() {
|
||||
// Makes Herobrine visible to players that should be able to see him by quickly teleporting him out of the map and back to where he previously was.
|
||||
Location original = HerobrineAI.getPluginCore().HerobrineNPC.getBukkitEntity().getLocation();
|
||||
HerobrineAI.getPluginCore().HerobrineNPC.getBukkitEntity().teleport(new Location(Bukkit.getServer().getWorlds().get(0), 0, -20, 0));
|
||||
HerobrineAI.getPluginCore().HerobrineNPC.getBukkitEntity().teleport(original);
|
||||
Location original = Herobrine.getPluginCore().HerobrineNPC.getBukkitEntity().getLocation();
|
||||
Herobrine.getPluginCore().HerobrineNPC.getBukkitEntity().teleport(new Location(Bukkit.getServer().getWorlds().get(0), 0, -20, 0));
|
||||
Herobrine.getPluginCore().HerobrineNPC.getBukkitEntity().teleport(original);
|
||||
}
|
||||
|
||||
public void toggleHerobrinePlayerVisibility(Player p) {
|
||||
|
@ -2,14 +2,14 @@ package net.theprogrammersworld.herobrine.AI;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
|
||||
public class ConsoleLogger {
|
||||
|
||||
static Logger log = Logger.getLogger("Minecraft");
|
||||
|
||||
public void info(String text){
|
||||
if (HerobrineAI.isDebugging){
|
||||
if (Herobrine.isDebugging){
|
||||
log.info(text);
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
package net.theprogrammersworld.herobrine.AI;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
|
||||
public abstract class Core {
|
||||
|
||||
private final AppearType Appear;
|
||||
private final CoreType coreType;
|
||||
private CoreResult nowData = null;
|
||||
protected HerobrineAI PluginCore = null;
|
||||
protected Herobrine PluginCore = null;
|
||||
|
||||
public Core(CoreType cp,AppearType ap, HerobrineAI hb){
|
||||
public Core(CoreType cp,AppearType ap, Herobrine hb){
|
||||
this.coreType=cp;
|
||||
this.Appear=ap;
|
||||
this.PluginCore = hb;
|
||||
@ -29,7 +29,7 @@ public abstract class Core {
|
||||
|
||||
nowData=this.CallCore(data);
|
||||
if (nowData.getResult() && Appear == AppearType.APPEAR){
|
||||
HerobrineAI.getPluginCore().getAICore().setCoreTypeNow(this.coreType);
|
||||
Herobrine.getPluginCore().getAICore().setCoreTypeNow(this.coreType);
|
||||
|
||||
}
|
||||
return nowData;
|
||||
|
@ -4,19 +4,19 @@ import java.util.Random;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
|
||||
public class Message {
|
||||
|
||||
public static void SendMessage(Player player) {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().SendMessages == true) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().SendMessages == true) {
|
||||
|
||||
int count = HerobrineAI.getPluginCore().getConfigDB().useMessages.size();
|
||||
int count = Herobrine.getPluginCore().getConfigDB().useMessages.size();
|
||||
|
||||
Random randgen = new Random();
|
||||
int randmsg = randgen.nextInt(count);
|
||||
|
||||
player.sendMessage("<Herobrine> " + HerobrineAI.getPluginCore().getConfigDB().useMessages.get(randmsg));
|
||||
player.sendMessage("<Herobrine> " + Herobrine.getPluginCore().getConfigDB().useMessages.get(randmsg));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package net.theprogrammersworld.herobrine.AI;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
|
||||
public class ResetLimits {
|
||||
|
||||
@ -16,7 +16,7 @@ public class ResetLimits {
|
||||
|
||||
public ResetLimits() {
|
||||
|
||||
taskID = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(HerobrineAI.getPluginCore(),
|
||||
taskID = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(Herobrine.getPluginCore(),
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
resetAll();
|
||||
@ -65,9 +65,9 @@ public class ResetLimits {
|
||||
}
|
||||
|
||||
public void updateFromConfig() {
|
||||
maxBooks = HerobrineAI.getPluginCore().getConfigDB().maxBooks;
|
||||
maxSigns = HerobrineAI.getPluginCore().getConfigDB().maxSigns;
|
||||
maxHeads = HerobrineAI.getPluginCore().getConfigDB().maxHeads;
|
||||
maxBooks = Herobrine.getPluginCore().getConfigDB().maxBooks;
|
||||
maxSigns = Herobrine.getPluginCore().getConfigDB().maxSigns;
|
||||
maxHeads = Herobrine.getPluginCore().getConfigDB().maxHeads;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
@ -24,7 +24,7 @@ public class Attack extends Core {
|
||||
private boolean isHandler = false;
|
||||
|
||||
public Attack() {
|
||||
super(CoreType.ATTACK, AppearType.APPEAR, HerobrineAI.getPluginCore());
|
||||
super(CoreType.ATTACK, AppearType.APPEAR, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
@ -38,11 +38,11 @@ public class Attack extends Core {
|
||||
return new CoreResult(false, "This player is protected.");
|
||||
}
|
||||
|
||||
HerobrineAI.HerobrineHP = HerobrineAI.HerobrineMaxHP;
|
||||
Herobrine.HerobrineHP = Herobrine.HerobrineMaxHP;
|
||||
ticksToEnd = 0;
|
||||
AICore.PlayerTarget = player;
|
||||
AICore.isTarget = true;
|
||||
AICore.log.info("[HerobrineAI] Teleporting to target. (" + AICore.PlayerTarget.getName() + ")");
|
||||
AICore.log.info("[Herobrine] Teleporting to target. (" + AICore.PlayerTarget.getName() + ")");
|
||||
Location ploc = (Location) AICore.PlayerTarget.getLocation();
|
||||
Object[] data = { ploc };
|
||||
PluginCore.getAICore().getCore(CoreType.DESTROY_TORCHES).RunCore(data);
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.BookMeta;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
@ -16,22 +16,22 @@ import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
public class Book extends Core {
|
||||
|
||||
public Book() {
|
||||
super(CoreType.BOOK, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.BOOK, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
Player player = (Player) data[0];
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().useWorlds.contains(player.getLocation().getWorld().getName())) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().useWorlds.contains(player.getLocation().getWorld().getName())) {
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().WriteBooks == true
|
||||
&& HerobrineAI.getPluginCore().getSupport().checkBooks(player.getLocation())) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().WriteBooks == true
|
||||
&& Herobrine.getPluginCore().getSupport().checkBooks(player.getLocation())) {
|
||||
|
||||
int chance = Utils.getRandomGen().nextInt(100);
|
||||
if (chance > (100 - HerobrineAI.getPluginCore().getConfigDB().BookChance)) {
|
||||
if (chance > (100 - Herobrine.getPluginCore().getConfigDB().BookChance)) {
|
||||
Inventory chest = (Inventory) data[1];
|
||||
if (chest.firstEmpty() != -1) {
|
||||
if (HerobrineAI.getPluginCore().getAICore().getResetLimits().isBook()) {
|
||||
if (Herobrine.getPluginCore().getAICore().getResetLimits().isBook()) {
|
||||
chest.setItem(chest.firstEmpty(), newBook());
|
||||
return new CoreResult(true, "Book created!");
|
||||
}
|
||||
@ -50,7 +50,7 @@ public class Book extends Core {
|
||||
|
||||
public ItemStack newBook() {
|
||||
|
||||
int count = HerobrineAI.getPluginCore().getConfigDB().useBookMessages.size();
|
||||
int count = Herobrine.getPluginCore().getConfigDB().useBookMessages.size();
|
||||
|
||||
int chance = Utils.getRandomGen().nextInt(count);
|
||||
|
||||
@ -62,7 +62,7 @@ public class Book extends Core {
|
||||
meta.setTitle("");
|
||||
meta.setAuthor("");
|
||||
|
||||
list.add(0, (String) HerobrineAI.getPluginCore().getConfigDB().useBookMessages.get(chance));
|
||||
list.add(0, (String) Herobrine.getPluginCore().getConfigDB().useBookMessages.get(chance));
|
||||
|
||||
meta.setPages(list);
|
||||
|
||||
|
@ -7,14 +7,14 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.*;
|
||||
|
||||
public class BuildCave extends Core {
|
||||
|
||||
public BuildCave() {
|
||||
super(CoreType.BUILD_CAVE, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.BUILD_CAVE, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
@ -26,12 +26,12 @@ public class BuildCave extends Core {
|
||||
|
||||
public CoreResult buildCave(Location loc) {
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().BuildStuff == true) {
|
||||
if (HerobrineAI.getPluginCore().getSupport().checkBuild(loc)) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().BuildStuff == true) {
|
||||
if (Herobrine.getPluginCore().getSupport().checkBuild(loc)) {
|
||||
if (loc.getBlockY() < 60) {
|
||||
|
||||
int chance = Utils.getRandomGen().nextInt(100);
|
||||
if (chance > (100 - HerobrineAI.getPluginCore().getConfigDB().CaveChance)) {
|
||||
if (chance > (100 - Herobrine.getPluginCore().getConfigDB().CaveChance)) {
|
||||
AICore.log.info("Creating cave...");
|
||||
|
||||
GenerateCave(loc);
|
||||
@ -55,7 +55,7 @@ public class BuildCave extends Core {
|
||||
|
||||
public CoreResult buildCave(Location loc, boolean cmd) {
|
||||
|
||||
if (HerobrineAI.getPluginCore().getSupport().checkBuild(loc)) {
|
||||
if (Herobrine.getPluginCore().getSupport().checkBuild(loc)) {
|
||||
if (loc.getBlockY() < 60) {
|
||||
|
||||
AICore.log.info("Creating cave...");
|
||||
@ -75,7 +75,7 @@ public class BuildCave extends Core {
|
||||
|
||||
public void GenerateCave(Location loc) {
|
||||
|
||||
if (HerobrineAI.getPluginCore().getSupport().checkBuild(loc)) {
|
||||
if (Herobrine.getPluginCore().getSupport().checkBuild(loc)) {
|
||||
|
||||
ArrayList<Location> redstoneTorchList = new ArrayList<Location>();
|
||||
|
||||
|
@ -2,14 +2,14 @@ package net.theprogrammersworld.herobrine.AI.cores;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
|
||||
public class Burn extends Core {
|
||||
|
||||
public Burn() {
|
||||
super(CoreType.BURN, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.BURN, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
|
||||
@ -17,7 +17,7 @@ public class BuryPlayer extends Core {
|
||||
public Block savedBlock2 = null;
|
||||
|
||||
public BuryPlayer() {
|
||||
super(CoreType.BURY_PLAYER, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.BURY_PLAYER, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
@ -25,7 +25,7 @@ public class BuryPlayer extends Core {
|
||||
}
|
||||
|
||||
public CoreResult FindPlace(Player player){
|
||||
if(HerobrineAI.getPluginCore().getSupport().checkBuild(player.getLocation())){
|
||||
if(Herobrine.getPluginCore().getSupport().checkBuild(player.getLocation())){
|
||||
Location loc = (Location) player.getLocation();
|
||||
|
||||
int[][] blocks = {
|
||||
|
@ -6,14 +6,14 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
|
||||
public class Curse extends Core {
|
||||
|
||||
public Curse() {
|
||||
super(CoreType.CURSE, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.CURSE, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -28,7 +28,7 @@ public class Curse extends Core {
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.WEAKNESS, 1000, 1));
|
||||
|
||||
for (int i=0; i< 3 ; i++) {
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(HerobrineAI.getPluginCore(), new Runnable() {
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Herobrine.getPluginCore(), new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -4,14 +4,14 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
|
||||
public class DestroyTorches extends Core {
|
||||
|
||||
public DestroyTorches() {
|
||||
super(CoreType.DESTROY_TORCHES, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.DESTROY_TORCHES, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
@ -19,22 +19,22 @@ public class DestroyTorches extends Core {
|
||||
}
|
||||
|
||||
public CoreResult destroyTorches(Location loc) {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().DestroyTorches == true) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().DestroyTorches == true) {
|
||||
|
||||
int x = loc.getBlockX();
|
||||
int y = loc.getBlockY();
|
||||
int z = loc.getBlockZ();
|
||||
World world = loc.getWorld();
|
||||
|
||||
int i = -(HerobrineAI.getPluginCore().getConfigDB().DestroyTorchesRadius); // Y
|
||||
int ii = -(HerobrineAI.getPluginCore().getConfigDB().DestroyTorchesRadius); // X
|
||||
int iii = -(HerobrineAI.getPluginCore().getConfigDB().DestroyTorchesRadius); // Z
|
||||
int i = -(Herobrine.getPluginCore().getConfigDB().DestroyTorchesRadius); // Y
|
||||
int ii = -(Herobrine.getPluginCore().getConfigDB().DestroyTorchesRadius); // X
|
||||
int iii = -(Herobrine.getPluginCore().getConfigDB().DestroyTorchesRadius); // Z
|
||||
|
||||
for (i = -(HerobrineAI.getPluginCore().getConfigDB().DestroyTorchesRadius); i <= HerobrineAI.getPluginCore()
|
||||
for (i = -(Herobrine.getPluginCore().getConfigDB().DestroyTorchesRadius); i <= Herobrine.getPluginCore()
|
||||
.getConfigDB().DestroyTorchesRadius; i++) {
|
||||
for (ii = -(HerobrineAI.getPluginCore().getConfigDB().DestroyTorchesRadius); ii <= HerobrineAI
|
||||
for (ii = -(Herobrine.getPluginCore().getConfigDB().DestroyTorchesRadius); ii <= Herobrine
|
||||
.getPluginCore().getConfigDB().DestroyTorchesRadius; ii++) {
|
||||
for (iii = -(HerobrineAI.getPluginCore().getConfigDB().DestroyTorchesRadius); iii <= HerobrineAI
|
||||
for (iii = -(Herobrine.getPluginCore().getConfigDB().DestroyTorchesRadius); iii <= Herobrine
|
||||
.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();
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.World;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
@ -26,7 +26,7 @@ public class Graveyard extends Core {
|
||||
private Player savedPlayer = null;
|
||||
|
||||
public Graveyard() {
|
||||
super(CoreType.GRAVEYARD, AppearType.APPEAR, HerobrineAI.getPluginCore());
|
||||
super(CoreType.GRAVEYARD, AppearType.APPEAR, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
@ -34,8 +34,8 @@ public class Graveyard extends Core {
|
||||
}
|
||||
|
||||
public CoreResult Teleport(Player player) {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().UseGraveyardWorld == true) {
|
||||
if (!HerobrineAI.getPluginCore().getAICore().checkAncientSword(player.getInventory())) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().UseGraveyardWorld == true) {
|
||||
if (!Herobrine.getPluginCore().getAICore().checkAncientSword(player.getInventory())) {
|
||||
LivingEntities = Bukkit.getServer().getWorld("world_herobrineai_graveyard").getLivingEntities();
|
||||
for (int i = 0; i <= LivingEntities.size() - 1; i++) {
|
||||
|
||||
@ -115,7 +115,7 @@ public class Graveyard extends Core {
|
||||
|| this.ticks == 90 || AICore.isTarget == false) {
|
||||
|
||||
if (AICore.PlayerTarget == savedPlayer) {
|
||||
HerobrineAI.getPluginCore().getAICore().CancelTarget(CoreType.GRAVEYARD);
|
||||
Herobrine.getPluginCore().getAICore().CancelTarget(CoreType.GRAVEYARD);
|
||||
}
|
||||
|
||||
savedPlayer.teleport(new Location(savedWorld, savedX, savedY, savedZ));
|
||||
|
@ -10,7 +10,7 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Wolf;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
@ -27,7 +27,7 @@ public class Haunt extends Core {
|
||||
private boolean isFirst = true;
|
||||
|
||||
public Haunt() {
|
||||
super(CoreType.HAUNT, AppearType.APPEAR, HerobrineAI.getPluginCore());
|
||||
super(CoreType.HAUNT, AppearType.APPEAR, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
@ -45,7 +45,7 @@ public class Haunt extends Core {
|
||||
isFirst = true;
|
||||
AICore.isTarget = true;
|
||||
AICore.PlayerTarget = player;
|
||||
AICore.log.info("[HerobrineAI] Hauntig player!");
|
||||
AICore.log.info("[Herobrine] Hauntig player!");
|
||||
Location loc = (Location) PluginCore.HerobrineNPC.getBukkitEntity().getLocation();
|
||||
loc.setY(-20);
|
||||
PluginCore.HerobrineNPC.moveTo(loc);
|
||||
@ -182,7 +182,7 @@ public class Haunt extends Core {
|
||||
|
||||
}
|
||||
|
||||
HerobrineAI.HerobrineHP = HerobrineAI.HerobrineMaxHP;
|
||||
Herobrine.HerobrineHP = Herobrine.HerobrineMaxHP;
|
||||
loc = AICore.PlayerTarget.getLocation();
|
||||
loc.setY(loc.getY() + 1.5);
|
||||
PluginCore.HerobrineNPC.lookAtPoint(loc);
|
||||
|
@ -11,7 +11,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
@ -24,7 +24,7 @@ public class Heads extends Core {
|
||||
private List<Block> headList = new ArrayList<Block>();
|
||||
|
||||
public Heads() {
|
||||
super(CoreType.HEADS, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.HEADS, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
|
@ -6,7 +6,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
@ -15,7 +15,7 @@ import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
public class Pyramid extends Core {
|
||||
|
||||
public Pyramid() {
|
||||
super(CoreType.PYRAMID, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.PYRAMID, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
@ -165,7 +165,7 @@ public class Pyramid extends Core {
|
||||
|
||||
public void BuildPyramid(World world, int X, int Y, int Z) {
|
||||
|
||||
if (HerobrineAI.getPluginCore().getSupport().checkBuild(new Location(world, X, Y, Z))) {
|
||||
if (Herobrine.getPluginCore().getSupport().checkBuild(new Location(world, X, Y, Z))) {
|
||||
|
||||
AICore.log.info("Creating pyramid at " + X + "," + Y + "," + Z);
|
||||
|
||||
|
@ -3,7 +3,7 @@ package net.theprogrammersworld.herobrine.AI.cores;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
@ -11,7 +11,7 @@ import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
public class RandomExplosion extends Core {
|
||||
|
||||
public RandomExplosion() {
|
||||
super(CoreType.RANDOM_EXPLOSION, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.RANDOM_EXPLOSION, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.ConfigDB;
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
@ -23,7 +23,7 @@ public class RandomPosition extends Core {
|
||||
private boolean RandomMoveIsPlayer = false;
|
||||
|
||||
public RandomPosition() {
|
||||
super(CoreType.RANDOM_POSITION, AppearType.APPEAR, HerobrineAI.getPluginCore());
|
||||
super(CoreType.RANDOM_POSITION, AppearType.APPEAR, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public int getRandomTicks() {
|
||||
@ -59,14 +59,14 @@ public class RandomPosition extends Core {
|
||||
newloc.setY(newloc.getY() + 1.5);
|
||||
PluginCore.HerobrineNPC.lookAtPoint(newloc);
|
||||
randomTicks = 0;
|
||||
AICore.log.info("[HerobrineAI] Herobrine is now in RandomLocation mode.");
|
||||
AICore.log.info("[Herobrine] Herobrine is now in RandomLocation mode.");
|
||||
PluginCore.getAICore().Start_RM();
|
||||
PluginCore.getAICore().Start_RS();
|
||||
PluginCore.getAICore().Start_CG();
|
||||
RandomMoveIsPlayer = false;
|
||||
return new CoreResult(true, "Herobrine is now in WalkingMode.");
|
||||
} else {
|
||||
AICore.log.info("[HerobrineAI] RandomPosition Failed!");
|
||||
AICore.log.info("[Herobrine] RandomPosition Failed!");
|
||||
return setRandomPosition(world);
|
||||
}
|
||||
}
|
||||
@ -138,7 +138,7 @@ public class RandomPosition extends Core {
|
||||
&& world.getBlockAt(randx, randy - 1, randz).getType() != Material.REDSTONE_TORCH
|
||||
&& world.getBlockAt(randx, randy - 1, randz).getType() != Material.REDSTONE) {
|
||||
|
||||
AICore.log.info("[HerobrineAI] RandomLocation "
|
||||
AICore.log.info("[Herobrine] RandomLocation "
|
||||
+ world.getBlockAt(randx, randy - 1, randz).getType().toString() + " is X:" + randx + " Y:"
|
||||
+ randy + " Z:" + randz);
|
||||
return new Location(world, (float) randx + 0.5, (float) randy, (float) randz);
|
||||
@ -154,7 +154,7 @@ public class RandomPosition extends Core {
|
||||
public void RandomMove() {
|
||||
if (PluginCore.getAICore().getCoreTypeNow() == CoreType.RANDOM_POSITION && AICore.isTarget == false
|
||||
&& RandomMoveIsPlayer == false) {
|
||||
HerobrineAI.HerobrineHP = HerobrineAI.HerobrineMaxHP;
|
||||
Herobrine.HerobrineHP = Herobrine.HerobrineMaxHP;
|
||||
|
||||
if (Utils.getRandomGen().nextInt(5) == 3) {
|
||||
Location loc = PluginCore.HerobrineNPC.getBukkitEntity().getLocation();
|
||||
|
@ -2,14 +2,14 @@ package net.theprogrammersworld.herobrine.AI.cores;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
|
||||
public class RandomSound extends Core {
|
||||
|
||||
public RandomSound() {
|
||||
super(CoreType.RANDOM_SOUND, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.RANDOM_SOUND, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -18,12 +18,12 @@ public class RandomSound extends Core {
|
||||
int multip = 1;
|
||||
|
||||
while (multip != 7) {
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(HerobrineAI.getPluginCore(), new Runnable() {
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Herobrine.getPluginCore(), new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
HerobrineAI.getPluginCore().getAICore().getCore(CoreType.SOUNDF).RunCore(data);
|
||||
Herobrine.getPluginCore().getAICore().getCore(CoreType.SOUNDF).RunCore(data);
|
||||
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.block.Sign;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.Directional;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.ConsoleLogger;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
@ -19,7 +19,7 @@ import net.theprogrammersworld.herobrine.misc.BlockChanger;
|
||||
public class Signs extends Core {
|
||||
|
||||
public Signs() {
|
||||
super(CoreType.SIGNS, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.SIGNS, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
@ -72,9 +72,9 @@ public class Signs extends Core {
|
||||
|
||||
Random randcgen = Utils.getRandomGen();
|
||||
int chance = randcgen.nextInt(100);
|
||||
if (chance > (100 - HerobrineAI.getPluginCore().getConfigDB().SignChance)) {
|
||||
if (chance > (100 - Herobrine.getPluginCore().getConfigDB().SignChance)) {
|
||||
Random randgen = Utils.getRandomGen();
|
||||
int count = HerobrineAI.getPluginCore().getConfigDB().useSignMessages.size();
|
||||
int count = Herobrine.getPluginCore().getConfigDB().useSignMessages.size();
|
||||
int randmsg = randgen.nextInt(count);
|
||||
|
||||
Block signblock = loc.add(0, 0D, 0).getBlock();
|
||||
@ -88,7 +88,7 @@ public class Signs extends Core {
|
||||
((Directional) blockData).setFacing(BlockChanger.getPlayerBlockFace(ploc));
|
||||
sign.setBlockData(blockData);
|
||||
|
||||
sign.setLine(1, HerobrineAI.getPluginCore().getConfigDB().useSignMessages.get(randmsg));
|
||||
sign.setLine(1, Herobrine.getPluginCore().getConfigDB().useSignMessages.get(randmsg));
|
||||
sign.update();
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package net.theprogrammersworld.herobrine.AI.cores;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
@ -11,7 +11,7 @@ import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
public class SoundF extends Core{
|
||||
|
||||
public SoundF(){
|
||||
super(CoreType.SOUNDF,AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.SOUNDF,AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data){
|
||||
|
@ -12,7 +12,7 @@ import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
@ -23,7 +23,7 @@ import net.theprogrammersworld.herobrine.misc.StructureLoader;
|
||||
public class Temple extends Core {
|
||||
|
||||
public Temple() {
|
||||
super(CoreType.TEMPLE, AppearType.NORMAL, HerobrineAI.getPluginCore());
|
||||
super(CoreType.TEMPLE, AppearType.NORMAL, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
@ -168,7 +168,7 @@ public class Temple extends Core {
|
||||
|
||||
Location loc = new Location(world, X, Y, Z);
|
||||
|
||||
if (HerobrineAI.getPluginCore().getSupport().checkBuild(new Location(world, X, Y, Z))) {
|
||||
if (Herobrine.getPluginCore().getSupport().checkBuild(new Location(world, X, Y, Z))) {
|
||||
|
||||
int MainX = loc.getBlockX();
|
||||
int MainY = loc.getBlockY();
|
||||
@ -176,15 +176,15 @@ public class Temple extends Core {
|
||||
|
||||
// Main blocks
|
||||
|
||||
new StructureLoader(HerobrineAI.getPluginCore().getInputStreamData("/res/temple.yml")).Build(loc.getWorld(),
|
||||
new StructureLoader(Herobrine.getPluginCore().getInputStreamData("/res/temple.yml")).Build(loc.getWorld(),
|
||||
MainX, MainY, MainZ);
|
||||
loc.getWorld().getBlockAt(MainX + 6, MainY + 0, MainZ + 2).setType(Material.CHEST);
|
||||
// Mob spawn
|
||||
if (!HerobrineAI.isNPCDisabled) {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().UseNPC_Guardian) {
|
||||
if (!Herobrine.isNPCDisabled) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().UseNPC_Guardian) {
|
||||
Location mobloc = new Location(loc.getWorld(), MainX + 6, MainY + 0, MainZ + 4);
|
||||
for (int i = 1; i <= HerobrineAI.getPluginCore().getConfigDB().npc.getInt("npc.Guardian.SpawnCount"); i++) {
|
||||
HerobrineAI.getPluginCore().getEntityManager().spawnCustomZombie(mobloc, MobType.ARTIFACT_GUARDIAN);
|
||||
for (int i = 1; i <= Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Guardian.SpawnCount"); i++) {
|
||||
Herobrine.getPluginCore().getEntityManager().spawnCustomZombie(mobloc, MobType.ARTIFACT_GUARDIAN);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -194,7 +194,7 @@ public class Temple extends Core {
|
||||
ItemStack item = null;
|
||||
ArrayList<String> newLore = new ArrayList<String>();
|
||||
|
||||
if (chance < 4 && HerobrineAI.getPluginCore().getConfigDB().UseArtifactBow) {
|
||||
if (chance < 4 && Herobrine.getPluginCore().getConfigDB().UseArtifactBow) {
|
||||
|
||||
item = new ItemStack(Material.BOW);
|
||||
newLore.add("Herobrine<EFBFBD>s artifact");
|
||||
@ -203,7 +203,7 @@ public class Temple extends Core {
|
||||
item.addEnchantment(Enchantment.ARROW_FIRE, 1);
|
||||
item.addEnchantment(Enchantment.ARROW_KNOCKBACK, 1);
|
||||
|
||||
} else if (chance < 8 && HerobrineAI.getPluginCore().getConfigDB().UseArtifactSword) {
|
||||
} else if (chance < 8 && Herobrine.getPluginCore().getConfigDB().UseArtifactSword) {
|
||||
|
||||
item = new ItemStack(Material.DIAMOND_SWORD);
|
||||
newLore.add("Herobrine<EFBFBD>s artifact");
|
||||
@ -213,7 +213,7 @@ public class Temple extends Core {
|
||||
item.addEnchantment(Enchantment.DAMAGE_ALL, 2);
|
||||
item.addEnchantment(Enchantment.DURABILITY, 3);
|
||||
|
||||
} else if (chance < 12 && HerobrineAI.getPluginCore().getConfigDB().UseArtifactApple) {
|
||||
} else if (chance < 12 && Herobrine.getPluginCore().getConfigDB().UseArtifactApple) {
|
||||
|
||||
item = new ItemStack(Material.GOLDEN_APPLE);
|
||||
newLore.add("Herobrine<EFBFBD>s artifact");
|
||||
@ -221,8 +221,8 @@ public class Temple extends Core {
|
||||
item = ItemName.setNameAndLore(item, "Apple of Death", newLore);
|
||||
|
||||
} else {
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().UseAncientSword) {
|
||||
item = HerobrineAI.getPluginCore().getAICore().createAncientSword();
|
||||
if (Herobrine.getPluginCore().getConfigDB().UseAncientSword) {
|
||||
item = Herobrine.getPluginCore().getAICore().createAncientSword();
|
||||
item.addEnchantment(Enchantment.KNOCKBACK, 2);
|
||||
item.addEnchantment(Enchantment.DAMAGE_ALL, 2);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
import net.theprogrammersworld.herobrine.AI.Core;
|
||||
import net.theprogrammersworld.herobrine.AI.CoreResult;
|
||||
@ -17,7 +17,7 @@ import net.theprogrammersworld.herobrine.AI.Message;
|
||||
public class Totem extends Core {
|
||||
|
||||
public Totem() {
|
||||
super(CoreType.TOTEM, AppearType.APPEAR, HerobrineAI.getPluginCore());
|
||||
super(CoreType.TOTEM, AppearType.APPEAR, Herobrine.getPluginCore());
|
||||
}
|
||||
|
||||
public CoreResult CallCore(Object[] data) {
|
||||
|
@ -4,7 +4,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.misc.StructureLoader;
|
||||
|
||||
public class GraveyardWorld {
|
||||
@ -25,7 +25,7 @@ public class GraveyardWorld {
|
||||
int MainY = 3;
|
||||
int MainZ = -10;
|
||||
|
||||
StructureLoader structLoader = new StructureLoader(HerobrineAI.getPluginCore().getInputStreamData("/res/graveyard_world.yml"));
|
||||
StructureLoader structLoader = new StructureLoader(Herobrine.getPluginCore().getInputStreamData("/res/graveyard_world.yml"));
|
||||
structLoader.Build(loc.getWorld(), MainX, MainY, MainZ);
|
||||
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ public class ConfigDB {
|
||||
useBookMessages.add("... before i was dead.");
|
||||
UseCustomItemsList.add("ItemExample");
|
||||
|
||||
log.info("[HerobrineAI] Creating new Config ...");
|
||||
log.info("[Herobrine] Creating new Config ...");
|
||||
config.set("config.ShowInterval", 144000);
|
||||
config.set("config.ShowRate", 2);
|
||||
config.set("config.HitPlayer", true);
|
||||
@ -334,37 +334,37 @@ public class ConfigDB {
|
||||
HerobrineUUID = config.getString("config.HerobrineUUID");
|
||||
HerobrineName = config.getString("config.HerobrineName");
|
||||
|
||||
HerobrineAI.HerobrineMaxHP = HerobrineHP;
|
||||
HerobrineAI.getPluginCore().getAICore().Stop_MAIN();
|
||||
HerobrineAI.getPluginCore().getAICore().Start_MAIN();
|
||||
HerobrineAI.getPluginCore().getAICore().Stop_BD();
|
||||
HerobrineAI.getPluginCore().getAICore().Start_BD();
|
||||
HerobrineAI.getPluginCore().getAICore().Stop_RC();
|
||||
HerobrineAI.getPluginCore().getAICore().Start_RC();
|
||||
HerobrineAI.AvailableWorld = false;
|
||||
HerobrineAI.getPluginCore().getAICore().getResetLimits().updateFromConfig();
|
||||
Herobrine.HerobrineMaxHP = HerobrineHP;
|
||||
Herobrine.getPluginCore().getAICore().Stop_MAIN();
|
||||
Herobrine.getPluginCore().getAICore().Start_MAIN();
|
||||
Herobrine.getPluginCore().getAICore().Stop_BD();
|
||||
Herobrine.getPluginCore().getAICore().Start_BD();
|
||||
Herobrine.getPluginCore().getAICore().Stop_RC();
|
||||
Herobrine.getPluginCore().getAICore().Start_RC();
|
||||
Herobrine.AvailableWorld = false;
|
||||
Herobrine.getPluginCore().getAICore().getResetLimits().updateFromConfig();
|
||||
|
||||
if (HerobrineAI.getPluginCore().HerobrineNPC != null) {
|
||||
HerobrineAI.getPluginCore().HerobrineNPC.setItemInHand(ItemInHand.getItemStack());
|
||||
if (Herobrine.getPluginCore().HerobrineNPC != null) {
|
||||
Herobrine.getPluginCore().HerobrineNPC.setItemInHand(ItemInHand.getItemStack());
|
||||
}
|
||||
|
||||
if (isStartupDone) {
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(HerobrineAI.getPluginCore(), new Runnable() {
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Herobrine.getPluginCore(), new Runnable() {
|
||||
public void run() {
|
||||
for (int i = 0; i <= useWorlds.size() - 1; i++) {
|
||||
if (Bukkit.getServer().getWorlds().contains(Bukkit.getServer().getWorld(useWorlds.get(i)))) {
|
||||
HerobrineAI.AvailableWorld = true;
|
||||
Herobrine.AvailableWorld = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (HerobrineAI.AvailableWorld == false) {
|
||||
if (Herobrine.AvailableWorld == false) {
|
||||
log.warning("**********************************************************");
|
||||
log.warning("[HerobrineAI] There are no available worlds for Herobrine!");
|
||||
log.warning("[Herobrine] There are no available worlds for Herobrine!");
|
||||
log.warning("**********************************************************");
|
||||
} else {
|
||||
log.info("**********************************************************");
|
||||
log.info("[HerobrineAI] No problems detected.");
|
||||
log.info("[Herobrine] No problems detected.");
|
||||
log.info("**********************************************************");
|
||||
}
|
||||
}
|
||||
|
@ -43,9 +43,9 @@ import net.theprogrammersworld.herobrine.listeners.InventoryListener;
|
||||
import net.theprogrammersworld.herobrine.listeners.PlayerListener;
|
||||
import net.theprogrammersworld.herobrine.listeners.WorldListener;
|
||||
|
||||
public class HerobrineAI extends JavaPlugin implements Listener {
|
||||
public class Herobrine extends JavaPlugin implements Listener {
|
||||
|
||||
private static HerobrineAI pluginCore;
|
||||
private static Herobrine pluginCore;
|
||||
private AICore aicore;
|
||||
private ConfigDB configdb;
|
||||
private Support support;
|
||||
@ -82,7 +82,7 @@ public class HerobrineAI extends JavaPlugin implements Listener {
|
||||
this.setEnabled(false);
|
||||
}
|
||||
} else {
|
||||
log.warning("[HerobrineAI] Custom NPCs have been disabled. (Incompatibility error!)");
|
||||
log.warning("[Herobrine] Custom NPCs have been disabled. (Incompatibility error!)");
|
||||
}
|
||||
|
||||
getServer().getPluginManager().registerEvents(this, this);
|
||||
@ -95,7 +95,7 @@ public class HerobrineAI extends JavaPlugin implements Listener {
|
||||
|
||||
isInitDone = true;
|
||||
|
||||
HerobrineAI.pluginCore = this;
|
||||
Herobrine.pluginCore = this;
|
||||
|
||||
this.configdb = new ConfigDB(log);
|
||||
|
||||
@ -137,7 +137,7 @@ public class HerobrineAI extends JavaPlugin implements Listener {
|
||||
// Graveyard World
|
||||
|
||||
if (this.configdb.UseGraveyardWorld == true && Bukkit.getServer().getWorld("world_herobrineai_graveyard") == null) {
|
||||
log.info("[HerobrineAI] Creating Graveyard world...");
|
||||
log.info("[Herobrine] Creating Graveyard world...");
|
||||
|
||||
WorldCreator wc = new WorldCreator("world_herobrineai_graveyard");
|
||||
wc.generateStructures(false);
|
||||
@ -147,7 +147,7 @@ public class HerobrineAI extends JavaPlugin implements Listener {
|
||||
|
||||
GraveyardWorld.Create();
|
||||
}
|
||||
log.info("[HerobrineAI] Plugin loaded! Version: ");
|
||||
log.info("[Herobrine] Plugin loaded! Version: ");
|
||||
|
||||
// Init Block Types
|
||||
|
||||
@ -179,9 +179,9 @@ public class HerobrineAI extends JavaPlugin implements Listener {
|
||||
|
||||
pathUpdateINT = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
|
||||
public void run() {
|
||||
if (Utils.getRandomGen().nextInt(4) == 2 && HerobrineAI.getPluginCore().getAICore().getCoreTypeNow()
|
||||
if (Utils.getRandomGen().nextInt(4) == 2 && Herobrine.getPluginCore().getAICore().getCoreTypeNow()
|
||||
.equals(CoreType.RANDOM_POSITION)) {
|
||||
pathMng.setPath(new Path(Utils.getRandomGen().nextInt(15) - 7f, Utils.getRandomGen().nextInt(15) - 7f, HerobrineAI.getPluginCore()));
|
||||
pathMng.setPath(new Path(Utils.getRandomGen().nextInt(15) - 7f, Utils.getRandomGen().nextInt(15) - 7f, Herobrine.getPluginCore()));
|
||||
}
|
||||
}
|
||||
}, 1 * 200L, 1 * 200L);
|
||||
@ -216,13 +216,13 @@ public class HerobrineAI extends JavaPlugin implements Listener {
|
||||
aicore.Stop_RP();
|
||||
aicore.Stop_RS();
|
||||
aicore.disableAll();
|
||||
log.info("[HerobrineAI] Plugin disabled!");
|
||||
log.info("[Herobrine] Plugin disabled!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public java.io.InputStream getInputStreamData(String src) {
|
||||
return HerobrineAI.class.getResourceAsStream(src);
|
||||
return Herobrine.class.getResourceAsStream(src);
|
||||
}
|
||||
|
||||
public AICore getAICore() {
|
||||
@ -235,9 +235,9 @@ public class HerobrineAI extends JavaPlugin implements Listener {
|
||||
return this.entMng;
|
||||
}
|
||||
|
||||
public static HerobrineAI getPluginCore() {
|
||||
public static Herobrine getPluginCore() {
|
||||
|
||||
return HerobrineAI.pluginCore;
|
||||
return Herobrine.pluginCore;
|
||||
|
||||
}
|
||||
|
||||
@ -297,18 +297,18 @@ public class HerobrineAI extends JavaPlugin implements Listener {
|
||||
|
||||
if(sender == null){
|
||||
if (!opCheck)
|
||||
log.info("[HerobrineAI] Player is an OP.");
|
||||
log.info("[Herobrine] Player is an OP.");
|
||||
else if (!creativeCheck)
|
||||
log.info("[HerobrineAI] Player is in creative mode.");
|
||||
log.info("[Herobrine] Player is in creative mode.");
|
||||
else if (!ignoreCheck)
|
||||
log.info("[HerobrineAI] Player has ignore permission.");
|
||||
log.info("[Herobrine] Player has ignore permission.");
|
||||
}else{
|
||||
if (!opCheck)
|
||||
sender.sendMessage(ChatColor.RED + "[HerobrineAI] Player is an OP.");
|
||||
sender.sendMessage(ChatColor.RED + "[Herobrine] Player is an OP.");
|
||||
else if (!creativeCheck)
|
||||
sender.sendMessage(ChatColor.RED + "[HerobrineAI] Player is in creative mode.");
|
||||
sender.sendMessage(ChatColor.RED + "[Herobrine] Player is in creative mode.");
|
||||
else if (!ignoreCheck)
|
||||
sender.sendMessage(ChatColor.RED + "[HerobrineAI] Player has ignore permission.");
|
||||
sender.sendMessage(ChatColor.RED + "[Herobrine] Player has ignore permission.");
|
||||
}
|
||||
|
||||
return false;
|
@ -5,7 +5,7 @@ import java.util.Random;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
|
||||
public class Path {
|
||||
@ -19,9 +19,9 @@ public class Path {
|
||||
private int stepNow = 0;
|
||||
private int maxSteps = Utils.getRandomGen().nextInt(3) + 3;
|
||||
|
||||
protected HerobrineAI PluginCore;
|
||||
protected Herobrine PluginCore;
|
||||
|
||||
public Path(float _x, float _z, HerobrineAI plugin) {
|
||||
public Path(float _x, float _z, Herobrine plugin) {
|
||||
|
||||
PluginCore = plugin;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package net.theprogrammersworld.herobrine.NPC.AI;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
|
||||
public class PathManager {
|
||||
@ -12,7 +12,7 @@ public class PathManager {
|
||||
}
|
||||
|
||||
public void update() {
|
||||
if (pathNow != null && HerobrineAI.getPluginCore().getAICore().getCoreTypeNow().equals(CoreType.RANDOM_POSITION)) {
|
||||
if (pathNow != null && Herobrine.getPluginCore().getAICore().getCoreTypeNow().equals(CoreType.RANDOM_POSITION)) {
|
||||
pathNow.update();
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import net.minecraft.server.v1_15_R1.EnumHand;
|
||||
import net.minecraft.server.v1_15_R1.PacketPlayInArmAnimation;
|
||||
import net.minecraft.server.v1_15_R1.PlayerChunkMap;
|
||||
import net.minecraft.server.v1_15_R1.WorldServer;
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@ -74,9 +74,9 @@ public class HumanNPC {
|
||||
// After Herobrine moves, check if any players are in Herobrine's line of sight.
|
||||
boolean doActivationTeleport = false;
|
||||
for(Player p : Bukkit.getOnlinePlayers())
|
||||
doActivationTeleport = doActivationTeleport || HerobrineAI.getPluginCore().getAICore().toggleHerobrinePlayerVisibilityNoTeleport(p);
|
||||
doActivationTeleport = doActivationTeleport || Herobrine.getPluginCore().getAICore().toggleHerobrinePlayerVisibilityNoTeleport(p);
|
||||
if(doActivationTeleport)
|
||||
HerobrineAI.getPluginCore().getAICore().visibilityActivationTeleport();
|
||||
Herobrine.getPluginCore().getAICore().visibilityActivationTeleport();
|
||||
}
|
||||
|
||||
public PlayerInventory getInventory() {
|
||||
|
@ -7,7 +7,7 @@ import java.util.UUID;
|
||||
|
||||
import net.minecraft.server.v1_15_R1.Entity;
|
||||
import net.minecraft.server.v1_15_R1.PlayerInteractManager;
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.NPC.Entity.HumanEntity;
|
||||
import net.theprogrammersworld.herobrine.NPC.Entity.HumanNPC;
|
||||
import net.theprogrammersworld.herobrine.NPC.NMS.BServer;
|
||||
@ -37,8 +37,8 @@ public class NPCCore {
|
||||
|
||||
private GameProfile getHerobrineGameProfile() {
|
||||
GameProfile profile = new GameProfile(
|
||||
UUID.fromString(HerobrineAI.getPluginCore().getConfigDB().HerobrineUUID),
|
||||
HerobrineAI.getPluginCore().getConfigDB().HerobrineName
|
||||
UUID.fromString(Herobrine.getPluginCore().getConfigDB().HerobrineUUID),
|
||||
Herobrine.getPluginCore().getConfigDB().HerobrineName
|
||||
);
|
||||
|
||||
Property textures = new Property("textures",
|
||||
@ -57,7 +57,7 @@ public class NPCCore {
|
||||
networkCore = new NetworkCore();
|
||||
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(HerobrineAI.getPluginCore(), new Runnable() {
|
||||
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(Herobrine.getPluginCore(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final ArrayList<HumanNPC> toRemove = new ArrayList<HumanNPC>();
|
||||
|
@ -33,7 +33,7 @@ public class Support {
|
||||
PreciousStones = new PreciousStonesHook();
|
||||
Factions = new FactionsHook();
|
||||
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(HerobrineAI.getPluginCore(), new Runnable() {
|
||||
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(Herobrine.getPluginCore(), new Runnable() {
|
||||
public void run() {
|
||||
CheckForPlugins();
|
||||
}
|
||||
@ -67,27 +67,27 @@ public class Support {
|
||||
public void CheckForPlugins() {
|
||||
if (ResidenceCore.Check()) {
|
||||
B_Residence = true;
|
||||
HerobrineAI.log.info("[HerobrineAI] Residence plugin detected!");
|
||||
Herobrine.log.info("[Herobrine] Residence plugin detected!");
|
||||
}
|
||||
if (GriefPreventionCore.Check()) {
|
||||
B_GriefPrevention = true;
|
||||
HerobrineAI.log.info("[HerobrineAI] GriefPrevention plugin detected!");
|
||||
Herobrine.log.info("[Herobrine] GriefPrevention plugin detected!");
|
||||
}
|
||||
if (TownyCore.Check()) {
|
||||
B_Towny = true;
|
||||
HerobrineAI.log.info("[HerobrineAI] Towny plugin detected!");
|
||||
Herobrine.log.info("[Herobrine] Towny plugin detected!");
|
||||
}
|
||||
if (WorldGuard.Check()) {
|
||||
B_WorldGuard = true;
|
||||
HerobrineAI.log.info("[HerobrineAI] WorldGuard plugin detected!");
|
||||
Herobrine.log.info("[Herobrine] WorldGuard plugin detected!");
|
||||
}
|
||||
if (PreciousStones.Check()) {
|
||||
B_PreciousStones = true;
|
||||
HerobrineAI.log.info("[HerobrineAI] PreciousStones plugin detected!");
|
||||
Herobrine.log.info("[Herobrine] PreciousStones plugin detected!");
|
||||
}
|
||||
if (Factions.Check()) {
|
||||
B_Factions = true;
|
||||
HerobrineAI.log.info("[HerobrineAI] Factions plugin detected!");
|
||||
Herobrine.log.info("[Herobrine] Factions plugin detected!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,23 +109,23 @@ public class Support {
|
||||
}
|
||||
|
||||
public boolean checkBuild(final Location loc) {
|
||||
return HerobrineAI.getPluginCore().getConfigDB().SecuredArea_Build || !isSecuredArea(loc);
|
||||
return Herobrine.getPluginCore().getConfigDB().SecuredArea_Build || !isSecuredArea(loc);
|
||||
}
|
||||
|
||||
public boolean checkAttack(final Location loc) {
|
||||
return HerobrineAI.getPluginCore().getConfigDB().SecuredArea_Attack || !isSecuredArea(loc);
|
||||
return Herobrine.getPluginCore().getConfigDB().SecuredArea_Attack || !isSecuredArea(loc);
|
||||
}
|
||||
|
||||
public boolean checkHaunt(final Location loc) {
|
||||
return HerobrineAI.getPluginCore().getConfigDB().SecuredArea_Haunt || !isSecuredArea(loc);
|
||||
return Herobrine.getPluginCore().getConfigDB().SecuredArea_Haunt || !isSecuredArea(loc);
|
||||
}
|
||||
|
||||
public boolean checkSigns(final Location loc) {
|
||||
return HerobrineAI.getPluginCore().getConfigDB().SecuredArea_Signs || !isSecuredArea(loc);
|
||||
return Herobrine.getPluginCore().getConfigDB().SecuredArea_Signs || !isSecuredArea(loc);
|
||||
}
|
||||
|
||||
public boolean checkBooks(final Location loc) {
|
||||
return HerobrineAI.getPluginCore().getConfigDB().SecuredArea_Books || !isSecuredArea(loc);
|
||||
return Herobrine.getPluginCore().getConfigDB().SecuredArea_Books || !isSecuredArea(loc);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,14 +17,14 @@ public class Utils {
|
||||
public static Player getRandomPlayer() {
|
||||
Collection<? extends Player> playersOnline = Bukkit.getServer().getOnlinePlayers();
|
||||
|
||||
if(playersOnline.size() == 1 && ((Player)playersOnline.toArray()[0]).getEntityId() == HerobrineAI.getPluginCore().HerobrineEntityID)
|
||||
if(playersOnline.size() == 1 && ((Player)playersOnline.toArray()[0]).getEntityId() == Herobrine.getPluginCore().HerobrineEntityID)
|
||||
return null;
|
||||
|
||||
int player_rolled = new Random().nextInt(playersOnline.size());
|
||||
|
||||
Player p = (Player) playersOnline.toArray()[player_rolled];
|
||||
|
||||
if (p.getEntityId() == HerobrineAI.getPluginCore().HerobrineEntityID)
|
||||
if (p.getEntityId() == Herobrine.getPluginCore().HerobrineEntityID)
|
||||
return getRandomPlayer();
|
||||
|
||||
return p;
|
||||
|
@ -5,11 +5,11 @@ import java.util.logging.Logger;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
|
||||
public class CmdAllWorlds extends SubCommand {
|
||||
|
||||
public CmdAllWorlds(HerobrineAI plugin, Logger log) {
|
||||
public CmdAllWorlds(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -17,8 +17,8 @@ public class CmdAllWorlds extends SubCommand {
|
||||
public boolean execute(Player player, String[] args) {
|
||||
|
||||
plugin.getConfigDB().addAllWorlds();
|
||||
sendMessage(player, ChatColor.GREEN + "[HerobrineAI] All worlds have been added to config.");
|
||||
sendMessage(player, ChatColor.YELLOW + "[HerobrineAI] Note: Worlds with blank spaces can cause problems!");
|
||||
sendMessage(player, ChatColor.GREEN + "[Herobrine] All worlds have been added to config.");
|
||||
sendMessage(player, ChatColor.YELLOW + "[Herobrine] Note: Worlds with blank spaces can cause problems!");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -6,12 +6,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
|
||||
public class CmdAttack extends SubCommand {
|
||||
|
||||
public CmdAttack(HerobrineAI plugin, Logger log) {
|
||||
public CmdAttack(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -23,12 +23,12 @@ public class CmdAttack extends SubCommand {
|
||||
Player target = Bukkit.getServer().getPlayer(args[1]);
|
||||
|
||||
if (target == null) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target.isOnline()) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -37,18 +37,18 @@ public class CmdAttack extends SubCommand {
|
||||
}
|
||||
|
||||
if (!plugin.getSupport().checkAttack(target.getLocation())) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is in secure area.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is in secure area.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (AICore.isTarget == false) {
|
||||
|
||||
plugin.getAICore().setAttackTarget(target);
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Herobrine is now attacking the " + args[1] + "!");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Herobrine is now attacking the " + args[1] + "!");
|
||||
|
||||
} else {
|
||||
sendMessage(player,ChatColor.RED
|
||||
+ "[HerobrineAI] Herobrine already has target! Use "
|
||||
+ "[Herobrine] Herobrine already has target! Use "
|
||||
+ ChatColor.GREEN + "/hb-ai cancel" + ChatColor.RED
|
||||
+ " to cancel current target");
|
||||
}
|
||||
|
@ -6,12 +6,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
|
||||
public class CmdBurn extends SubCommand {
|
||||
|
||||
public CmdBurn(HerobrineAI plugin, Logger log) {
|
||||
public CmdBurn(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -24,17 +24,17 @@ public class CmdBurn extends SubCommand {
|
||||
Player target = Bukkit.getServer().getPlayer(args[1]);
|
||||
|
||||
if (target == null) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target.isOnline()) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Object[] data = { target };
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] " + plugin.getAICore().getCore(CoreType.BURN).RunCore(data).getResultString());
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] " + plugin.getAICore().getCore(CoreType.BURN).RunCore(data).getResultString());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -6,12 +6,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
|
||||
public class CmdBury extends SubCommand {
|
||||
|
||||
public CmdBury(HerobrineAI plugin, Logger log) {
|
||||
public CmdBury(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -23,17 +23,17 @@ public class CmdBury extends SubCommand {
|
||||
Player target = Bukkit.getServer().getPlayer(args[1]);
|
||||
|
||||
if (target == null) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target.isOnline()) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.getSupport().checkHaunt(target.getLocation())) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is in secure area.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is in secure area.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -41,9 +41,9 @@ public class CmdBury extends SubCommand {
|
||||
Object[] data = { target };
|
||||
|
||||
if (plugin.getAICore().getCore(CoreType.BURY_PLAYER).RunCore(data).getResult())
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Buried " + args[1] + "!");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Buried " + args[1] + "!");
|
||||
else
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Cannot find good place!");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Cannot find good place!");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -5,12 +5,12 @@ import java.util.logging.Logger;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
|
||||
public class CmdCancel extends SubCommand {
|
||||
|
||||
public CmdCancel(HerobrineAI plugin, Logger log) {
|
||||
public CmdCancel(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ public class CmdCancel extends SubCommand {
|
||||
public boolean execute(Player player, String[] args) {
|
||||
|
||||
plugin.getAICore().CancelTarget(CoreType.ANY);
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Target cancelled!");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Target cancelled!");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -6,12 +6,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
|
||||
public class CmdCave extends SubCommand {
|
||||
|
||||
public CmdCave(HerobrineAI plugin, Logger log) {
|
||||
public CmdCave(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -23,22 +23,22 @@ public class CmdCave extends SubCommand {
|
||||
Player target = Bukkit.getServer().getPlayer(args[1]);
|
||||
|
||||
if (target == null) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target.isOnline()) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.getSupport().checkBuild(target.getLocation())) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is in secure area.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is in secure area.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Object[] data = { target.getLocation(), true };
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] " + plugin.getAICore().getCore(CoreType.BUILD_CAVE).RunCore(data).getResultString());
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] " + plugin.getAICore().getCore(CoreType.BUILD_CAVE).RunCore(data).getResultString());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -6,12 +6,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
|
||||
public class CmdCurse extends SubCommand {
|
||||
|
||||
public CmdCurse(HerobrineAI plugin, Logger log) {
|
||||
public CmdCurse(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -24,17 +24,17 @@ public class CmdCurse extends SubCommand {
|
||||
Player target = Bukkit.getServer().getPlayer(args[1]);
|
||||
|
||||
if (target == null) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target.isOnline()) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Object[] data = { target };
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] " + plugin.getAICore().getCore(CoreType.CURSE).RunCore(data).getResultString());
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] " + plugin.getAICore().getCore(CoreType.CURSE).RunCore(data).getResultString());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
|
||||
public class CmdExecutor implements CommandExecutor {
|
||||
|
||||
@ -20,8 +20,8 @@ public class CmdExecutor implements CommandExecutor {
|
||||
"reload", "cancel", "allworlds", "position", "attack", "haunt", "heads",
|
||||
"bury", "curse", "burn", "pyramid", "cave", "temple", "graveyard" };
|
||||
|
||||
public CmdExecutor(HerobrineAI p) {
|
||||
log = HerobrineAI.log;
|
||||
public CmdExecutor(Herobrine p) {
|
||||
log = Herobrine.log;
|
||||
|
||||
subCommands.put("reload", new CmdReload(p, log));
|
||||
subCommands.put("cancel", new CmdCancel(p, log));
|
||||
@ -43,7 +43,7 @@ public class CmdExecutor implements CommandExecutor {
|
||||
|
||||
ArrayList<String> helpMessage = new ArrayList<String>();
|
||||
|
||||
helpMessage.add(ChatColor.GREEN + "[HerobrineAI] Command list");
|
||||
helpMessage.add(ChatColor.GREEN + "[Herobrine] Command list");
|
||||
helpMessage.add(ChatColor.GREEN + "/hb-ai help - shows all commands");
|
||||
|
||||
for (String v : helpCommandOrder)
|
||||
|
@ -6,12 +6,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
|
||||
public class CmdGraveyard extends SubCommand {
|
||||
|
||||
public CmdGraveyard(HerobrineAI plugin, Logger log) {
|
||||
public CmdGraveyard(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -23,21 +23,21 @@ public class CmdGraveyard extends SubCommand {
|
||||
Player target = Bukkit.getServer().getPlayer(args[1]);
|
||||
|
||||
if (target == null) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target.isOnline()) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (AICore.isTarget == false) {
|
||||
plugin.getAICore().GraveyardTeleport(Bukkit.getServer().getPlayer(args[1]));
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] " + args[1] + " is now in the Graveyard world!");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] " + args[1] + " is now in the Graveyard world!");
|
||||
} else {
|
||||
sendMessage(player,ChatColor.RED
|
||||
+ "[HerobrineAI] Herobrine already has target! Use "
|
||||
+ "[Herobrine] Herobrine already has target! Use "
|
||||
+ ChatColor.GREEN + "/hb-ai cancel" + ChatColor.RED
|
||||
+ " to cancel current target");
|
||||
}
|
||||
|
@ -6,12 +6,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
|
||||
public class CmdHaunt extends SubCommand {
|
||||
|
||||
public CmdHaunt(HerobrineAI plugin, Logger log) {
|
||||
public CmdHaunt(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -23,26 +23,26 @@ public class CmdHaunt extends SubCommand {
|
||||
Player target = Bukkit.getServer().getPlayer(args[1]);
|
||||
|
||||
if (target == null) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target.isOnline()) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.getSupport().checkHaunt(target.getLocation())) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is in secure area.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is in secure area.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (AICore.isTarget == false) {
|
||||
plugin.getAICore().setHauntTarget(target);
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Herobrine is now haunting " + args[1] + "!");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Herobrine is now haunting " + args[1] + "!");
|
||||
|
||||
} else {
|
||||
sendMessage(player,ChatColor.RED + "[HerobrineAI] Herobrine already has target! Use "
|
||||
sendMessage(player,ChatColor.RED + "[Herobrine] Herobrine already has target! Use "
|
||||
+ ChatColor.GREEN + "/hb-ai cancel" + ChatColor.RED
|
||||
+ " to cancel current target.");
|
||||
}
|
||||
|
@ -6,12 +6,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
|
||||
public class CmdHeads extends SubCommand {
|
||||
|
||||
public CmdHeads(HerobrineAI plugin, Logger log) {
|
||||
public CmdHeads(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -23,22 +23,22 @@ public class CmdHeads extends SubCommand {
|
||||
Player target = Bukkit.getServer().getPlayer(args[1]);
|
||||
|
||||
if (target == null) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target.isOnline()) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.getSupport().checkBuild(target.getLocation())) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is in secure area.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is in secure area.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Object[] data = { args[1] };
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] " + plugin.getAICore().getCore(CoreType.HEADS).RunCore(data).getResultString());
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] " + plugin.getAICore().getCore(CoreType.HEADS).RunCore(data).getResultString());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -6,19 +6,19 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
|
||||
public class CmdPosition extends SubCommand {
|
||||
|
||||
public CmdPosition(HerobrineAI plugin, Logger log) {
|
||||
public CmdPosition(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(Player player, String[] args) {
|
||||
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Position");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Position");
|
||||
|
||||
Location loc = plugin.HerobrineNPC.getBukkitEntity().getLocation();
|
||||
|
||||
|
@ -6,12 +6,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
|
||||
public class CmdPyramid extends SubCommand {
|
||||
|
||||
public CmdPyramid(HerobrineAI plugin, Logger log) {
|
||||
public CmdPyramid(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -23,26 +23,26 @@ public class CmdPyramid extends SubCommand {
|
||||
Player target = Bukkit.getServer().getPlayer(args[1]);
|
||||
|
||||
if (target == null) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target.isOnline()) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.getSupport().checkBuild(target.getLocation())) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is in secure area.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is in secure area.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Object[] data = { target };
|
||||
|
||||
if (plugin.getAICore().getCore(CoreType.PYRAMID).RunCore(data).getResult())
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Creating pyramind near "+ args[1] + "!");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Creating pyramind near "+ args[1] + "!");
|
||||
else
|
||||
sendMessage(player, ChatColor.RED+ "[HerobrineAI] Cannot find good place for a pyramid!");
|
||||
sendMessage(player, ChatColor.RED+ "[Herobrine] Cannot find good place for a pyramid!");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -5,11 +5,11 @@ import java.util.logging.Logger;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
|
||||
public class CmdReload extends SubCommand {
|
||||
|
||||
public CmdReload(HerobrineAI plugin, Logger log) {
|
||||
public CmdReload(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ public class CmdReload extends SubCommand {
|
||||
public boolean execute(Player player, String[] args) {
|
||||
|
||||
plugin.getConfigDB().Reload();
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Config reloaded!");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Config reloaded!");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -6,12 +6,12 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
|
||||
public class CmdTemple extends SubCommand {
|
||||
|
||||
public CmdTemple(HerobrineAI plugin, Logger log) {
|
||||
public CmdTemple(Herobrine plugin, Logger log) {
|
||||
super(plugin, log);
|
||||
}
|
||||
|
||||
@ -23,26 +23,26 @@ public class CmdTemple extends SubCommand {
|
||||
Player target = Bukkit.getServer().getPlayer(args[1]);
|
||||
|
||||
if (target == null) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target.isOnline()) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is offline.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is offline.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.getSupport().checkBuild(target.getLocation())) {
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Player is in secure area.");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Player is in secure area.");
|
||||
return true;
|
||||
}
|
||||
|
||||
Object[] data = { target };
|
||||
|
||||
if (plugin.getAICore().getCore(CoreType.TEMPLE).RunCore(data).getResult())
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Creating temple near " + args[1] + "!");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Creating temple near " + args[1] + "!");
|
||||
else
|
||||
sendMessage(player, ChatColor.RED + "[HerobrineAI] Cannot find good place for temple!");
|
||||
sendMessage(player, ChatColor.RED + "[Herobrine] Cannot find good place for temple!");
|
||||
|
||||
|
||||
return true;
|
||||
|
@ -5,14 +5,14 @@ import java.util.logging.Logger;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
|
||||
public abstract class SubCommand {
|
||||
|
||||
protected HerobrineAI plugin;
|
||||
protected Herobrine plugin;
|
||||
protected Logger logger;
|
||||
|
||||
public SubCommand(HerobrineAI plugin, Logger log){
|
||||
public SubCommand(Herobrine plugin, Logger log){
|
||||
this.plugin = plugin;
|
||||
this.logger = log;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import net.minecraft.server.v1_15_R1.Entity;
|
||||
import net.minecraft.server.v1_15_R1.EntityTypes;
|
||||
import net.minecraft.server.v1_15_R1.GenericAttributes;
|
||||
import net.minecraft.server.v1_15_R1.World;
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.misc.ItemName;
|
||||
|
||||
public class CustomSkeleton extends net.minecraft.server.v1_15_R1.EntitySkeleton implements CustomEntity {
|
||||
@ -35,9 +35,9 @@ public class CustomSkeleton extends net.minecraft.server.v1_15_R1.EntitySkeleton
|
||||
|
||||
public void spawnDemon(Location loc) {
|
||||
|
||||
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(HerobrineAI.getPluginCore().getConfigDB().npc.getDouble("npc.Demon.Speed"));
|
||||
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(HerobrineAI.getPluginCore().getConfigDB().npc.getInt("npc.Demon.HP"));
|
||||
this.setHealth(HerobrineAI.getPluginCore().getConfigDB().npc.getInt("npc.Demon.HP"));
|
||||
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(Herobrine.getPluginCore().getConfigDB().npc.getDouble("npc.Demon.Speed"));
|
||||
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Demon.HP"));
|
||||
this.setHealth(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Demon.HP"));
|
||||
this.setCustomName(new ChatComponentText("Demon"));
|
||||
|
||||
Skeleton entityCast = (Skeleton) this.getBukkitEntity();
|
||||
@ -57,14 +57,14 @@ public class CustomSkeleton extends net.minecraft.server.v1_15_R1.EntitySkeleton
|
||||
|
||||
@Override
|
||||
public void Kill() {
|
||||
Object[] items = HerobrineAI.getPluginCore().getConfigDB().npc.getConfigurationSection("npc.Demon.Drops")
|
||||
Object[] items = Herobrine.getPluginCore().getConfigDB().npc.getConfigurationSection("npc.Demon.Drops")
|
||||
.getKeys(false).toArray();
|
||||
for (Object itemObj : items) {
|
||||
final String item = itemObj.toString();
|
||||
final int chance = new Random().nextInt(100);
|
||||
if (chance <= HerobrineAI.getPluginCore().getConfigDB().npc.getInt("npc.Demon.Drops." + item + ".Chance")) {
|
||||
if (chance <= Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Demon.Drops." + item + ".Chance")) {
|
||||
getBukkitEntity().getLocation().getWorld().dropItemNaturally(getBukkitEntity().getLocation(),
|
||||
new ItemStack(Material.matchMaterial(item), HerobrineAI.getPluginCore().getConfigDB().npc
|
||||
new ItemStack(Material.matchMaterial(item), Herobrine.getPluginCore().getConfigDB().npc
|
||||
.getInt("npc.Demon.Drops." + item + ".Count")));
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import net.minecraft.server.v1_15_R1.Entity;
|
||||
import net.minecraft.server.v1_15_R1.EntityTypes;
|
||||
import net.minecraft.server.v1_15_R1.GenericAttributes;
|
||||
import net.minecraft.server.v1_15_R1.World;
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
|
||||
public class CustomZombie extends net.minecraft.server.v1_15_R1.EntityZombie implements CustomEntity {
|
||||
|
||||
@ -34,9 +34,9 @@ public class CustomZombie extends net.minecraft.server.v1_15_R1.EntityZombie imp
|
||||
|
||||
private void spawnArtifactGuardian(Location loc) {
|
||||
|
||||
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(HerobrineAI.getPluginCore().getConfigDB().npc.getDouble("npc.Guardian.Speed"));
|
||||
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(HerobrineAI.getPluginCore().getConfigDB().npc.getInt("npc.Guardian.HP"));
|
||||
this.setHealth(HerobrineAI.getPluginCore().getConfigDB().npc.getInt("npc.Guardian.HP"));
|
||||
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(Herobrine.getPluginCore().getConfigDB().npc.getDouble("npc.Guardian.Speed"));
|
||||
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Guardian.HP"));
|
||||
this.setHealth(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Guardian.HP"));
|
||||
|
||||
this.setCustomName(new ChatComponentText("Artifact Guardian"));
|
||||
|
||||
@ -54,9 +54,9 @@ public class CustomZombie extends net.minecraft.server.v1_15_R1.EntityZombie imp
|
||||
|
||||
private void spawnHerobrineWarrior(Location loc) {
|
||||
|
||||
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(HerobrineAI.getPluginCore().getConfigDB().npc.getDouble("npc.Warrior.Speed"));
|
||||
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(HerobrineAI.getPluginCore().getConfigDB().npc.getInt("npc.Warrior.HP"));
|
||||
this.setHealth(HerobrineAI.getPluginCore().getConfigDB().npc.getInt("npc.Warrior.HP"));
|
||||
this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(Herobrine.getPluginCore().getConfigDB().npc.getDouble("npc.Warrior.Speed"));
|
||||
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Warrior.HP"));
|
||||
this.setHealth(Herobrine.getPluginCore().getConfigDB().npc.getInt("npc.Warrior.HP"));
|
||||
|
||||
this.setCustomName(new ChatComponentText("Herobrine Warrior"));
|
||||
|
||||
@ -85,14 +85,14 @@ public class CustomZombie extends net.minecraft.server.v1_15_R1.EntityZombie imp
|
||||
else
|
||||
mobS = "Warrior";
|
||||
|
||||
Object[] items = HerobrineAI.getPluginCore().getConfigDB().npc.getConfigurationSection("npc." + mobS + ".Drops")
|
||||
Object[] items = Herobrine.getPluginCore().getConfigDB().npc.getConfigurationSection("npc." + mobS + ".Drops")
|
||||
.getKeys(false).toArray();
|
||||
for (Object itemObj : items) {
|
||||
final String item = itemObj.toString();
|
||||
final int chance = new Random().nextInt(100);
|
||||
if (chance <= HerobrineAI.getPluginCore().getConfigDB().npc.getInt("npc." + mobS + ".Drops." + item + ".Chance")) {
|
||||
if (chance <= Herobrine.getPluginCore().getConfigDB().npc.getInt("npc." + mobS + ".Drops." + item + ".Chance")) {
|
||||
getBukkitEntity().getLocation().getWorld().dropItemNaturally(getBukkitEntity().getLocation(),
|
||||
new ItemStack(Material.matchMaterial(item), HerobrineAI.getPluginCore().getConfigDB().npc
|
||||
new ItemStack(Material.matchMaterial(item), Herobrine.getPluginCore().getConfigDB().npc
|
||||
.getInt("npc." + mobS + ".Drops." + item + ".Count")));
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.*;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
import net.theprogrammersworld.herobrine.AI.cores.Heads;
|
||||
@ -65,8 +65,8 @@ public class BlockListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
if (checkListCorrect && HerobrineAI.getPluginCore().getConfigDB().UseTotem && !AICore.isTotemCalled) {
|
||||
HerobrineAI.getPluginCore().getAICore().PlayerCallTotem(event.getPlayer());
|
||||
if (checkListCorrect && Herobrine.getPluginCore().getConfigDB().UseTotem && !AICore.isTotemCalled) {
|
||||
Herobrine.getPluginCore().getAICore().PlayerCallTotem(event.getPlayer());
|
||||
}
|
||||
|
||||
}
|
||||
@ -86,7 +86,7 @@ public class BlockListener implements Listener {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
} else {
|
||||
Heads h = (Heads) HerobrineAI.getPluginCore().getAICore().getCore(CoreType.HEADS);
|
||||
Heads h = (Heads) Herobrine.getPluginCore().getAICore().getCore(CoreType.HEADS);
|
||||
ArrayList<Block> list = h.getHeadList();
|
||||
if (list.contains(event.getBlock())) {
|
||||
event.setCancelled(true);
|
||||
|
@ -25,7 +25,7 @@ import org.bukkit.event.entity.EntityDeathEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.*;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
@ -40,9 +40,9 @@ public class EntityListener implements Listener {
|
||||
private ArrayList<String> equalsLore = new ArrayList<String>();
|
||||
private ArrayList<String> equalsLoreS = new ArrayList<String>();
|
||||
private ArrayList<String> getLore = new ArrayList<String>();
|
||||
private HerobrineAI PluginCore = null;
|
||||
private Herobrine PluginCore = null;
|
||||
|
||||
public EntityListener(HerobrineAI plugin) {
|
||||
public EntityListener(Herobrine plugin) {
|
||||
equalsLore.add("Herobrine artifact");
|
||||
equalsLore.add("Bow of Teleporting");
|
||||
equalsLoreS.add("Herobrine artifact");
|
||||
@ -52,7 +52,7 @@ public class EntityListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onCreatureSpawn(CreatureSpawnEvent event) {
|
||||
if (!HerobrineAI.isNPCDisabled) {
|
||||
if (!Herobrine.isNPCDisabled) {
|
||||
if (PluginCore.getConfigDB().useWorlds.contains(event.getEntity().getLocation().getWorld().getName())) {
|
||||
|
||||
Entity entity = event.getEntity();
|
||||
@ -167,17 +167,17 @@ public class EntityListener implements Listener {
|
||||
&& PluginCore.getAICore().getCoreTypeNow() != CoreType.GRAVEYARD) {
|
||||
|
||||
if (dEvent.getDamager() instanceof Player) {
|
||||
if (event.getDamage() >= HerobrineAI.HerobrineHP) {
|
||||
if (event.getDamage() >= Herobrine.HerobrineHP) {
|
||||
|
||||
HerobrineDropItems();
|
||||
|
||||
PluginCore.getAICore().CancelTarget(CoreType.ANY);
|
||||
HerobrineAI.HerobrineHP = HerobrineAI.HerobrineMaxHP;
|
||||
Herobrine.HerobrineHP = Herobrine.HerobrineMaxHP;
|
||||
Player player = (Player) dEvent.getDamager();
|
||||
player.sendMessage("<Herobrine> " + PluginCore.getConfigDB().DeathMessage);
|
||||
|
||||
} else {
|
||||
HerobrineAI.HerobrineHP -= event.getDamage();
|
||||
Herobrine.HerobrineHP -= event.getDamage();
|
||||
PluginCore.HerobrineNPC.HurtAnimation();
|
||||
AICore.log.info("HIT: " + event.getDamage());
|
||||
}
|
||||
@ -190,17 +190,17 @@ public class EntityListener implements Listener {
|
||||
PluginCore.getAICore().setAttackTarget((Player) arrow.getShooter());
|
||||
} else {
|
||||
|
||||
if (event.getDamage() >= HerobrineAI.HerobrineHP) {
|
||||
if (event.getDamage() >= Herobrine.HerobrineHP) {
|
||||
|
||||
HerobrineDropItems();
|
||||
|
||||
PluginCore.getAICore().CancelTarget(CoreType.ANY);
|
||||
HerobrineAI.HerobrineHP = HerobrineAI.HerobrineMaxHP;
|
||||
Herobrine.HerobrineHP = Herobrine.HerobrineMaxHP;
|
||||
Player player = (Player) arrow.getShooter();
|
||||
player.sendMessage("<Herobrine> " + PluginCore.getConfigDB().DeathMessage);
|
||||
|
||||
} else {
|
||||
HerobrineAI.HerobrineHP -= event.getDamage();
|
||||
Herobrine.HerobrineHP -= event.getDamage();
|
||||
PluginCore.HerobrineNPC.HurtAnimation();
|
||||
AICore.log.info("HIT: " + event.getDamage());
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||
import org.bukkit.event.inventory.InventoryOpenEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
import net.theprogrammersworld.herobrine.misc.ItemName;
|
||||
|
||||
@ -23,13 +23,13 @@ public class InventoryListener implements Listener {
|
||||
|
||||
Object[] data = { event.getPlayer(), event.getInventory() };
|
||||
|
||||
HerobrineAI.getPluginCore().getAICore().getCore(CoreType.BOOK).RunCore(data);
|
||||
Herobrine.getPluginCore().getAICore().getCore(CoreType.BOOK).RunCore(data);
|
||||
|
||||
if (new Random().nextInt(100) > 97) {
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().UseHeads) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().UseHeads) {
|
||||
if (event.getInventory().firstEmpty() != -1) {
|
||||
if (HerobrineAI.getPluginCore().getAICore().getResetLimits().isHead()) {
|
||||
if (Herobrine.getPluginCore().getAICore().getResetLimits().isHead()) {
|
||||
event.getInventory().setItem(event.getInventory().firstEmpty(),
|
||||
ItemName.CreateSkull(event.getPlayer().getUniqueId(), event.getPlayer().getName()));
|
||||
}
|
||||
@ -46,14 +46,14 @@ public class InventoryListener implements Listener {
|
||||
|| event.getInventory().getType() == InventoryType.FURNACE
|
||||
|| event.getInventory().getType() == InventoryType.WORKBENCH) {
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().useWorlds.contains(event.getPlayer().getLocation().getWorld().getName())) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().useWorlds.contains(event.getPlayer().getLocation().getWorld().getName())) {
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().PlaceSigns == true
|
||||
&& HerobrineAI.getPluginCore().getSupport().checkSigns(event.getPlayer().getLocation())) {
|
||||
if (Herobrine.getPluginCore().getConfigDB().PlaceSigns == true
|
||||
&& Herobrine.getPluginCore().getSupport().checkSigns(event.getPlayer().getLocation())) {
|
||||
|
||||
if (HerobrineAI.getPluginCore().getAICore().getResetLimits().isSign()) {
|
||||
if (Herobrine.getPluginCore().getAICore().getResetLimits().isSign()) {
|
||||
Object[] data = { event.getPlayer().getLocation(), event.getPlayer().getLocation() };
|
||||
HerobrineAI.getPluginCore().getAICore().getCore(CoreType.SIGNS).RunCore(data);
|
||||
Herobrine.getPluginCore().getAICore().getCore(CoreType.SIGNS).RunCore(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.Utils;
|
||||
import net.theprogrammersworld.herobrine.AI.AICore;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
@ -38,9 +38,9 @@ public class PlayerListener implements Listener {
|
||||
private Location p_loc = null;
|
||||
private long timestamp = 0;
|
||||
private boolean canUse = false;
|
||||
private HerobrineAI PluginCore = null;
|
||||
private Herobrine PluginCore = null;
|
||||
|
||||
public PlayerListener(HerobrineAI plugin) {
|
||||
public PlayerListener(Herobrine plugin) {
|
||||
equalsLoreS.add("Herobrine artifact");
|
||||
equalsLoreS.add("Sword of Lighting");
|
||||
equalsLoreA.add("Herobrine artifact");
|
||||
|
@ -7,7 +7,7 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.world.ChunkLoadEvent;
|
||||
|
||||
import net.theprogrammersworld.herobrine.HerobrineAI;
|
||||
import net.theprogrammersworld.herobrine.Herobrine;
|
||||
import net.theprogrammersworld.herobrine.AI.Core.CoreType;
|
||||
|
||||
public class WorldListener implements Listener{
|
||||
@ -18,23 +18,23 @@ public class WorldListener implements Listener{
|
||||
|
||||
World world = event.getWorld();
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().useWorlds.contains(world.getName())){
|
||||
if (Herobrine.getPluginCore().getConfigDB().useWorlds.contains(world.getName())){
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().BuildTemples==true){
|
||||
if (Herobrine.getPluginCore().getConfigDB().BuildTemples==true){
|
||||
|
||||
if (new Random().nextInt(2)==1){
|
||||
Object[] data = {event.getChunk()};
|
||||
|
||||
HerobrineAI.getPluginCore().getAICore().getCore(CoreType.TEMPLE).RunCore(data);
|
||||
Herobrine.getPluginCore().getAICore().getCore(CoreType.TEMPLE).RunCore(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (HerobrineAI.getPluginCore().getConfigDB().BuildPyramids==true){
|
||||
if (Herobrine.getPluginCore().getConfigDB().BuildPyramids==true){
|
||||
|
||||
if (new Random().nextInt(30)==4){
|
||||
Object[] data = {event.getChunk()};
|
||||
HerobrineAI.getPluginCore().getAICore().getCore(CoreType.PYRAMID).RunCore(data);
|
||||
Herobrine.getPluginCore().getAICore().getCore(CoreType.PYRAMID).RunCore(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user