How do I get a entity packet defined as a player to follow the player where ever the player goes! If a player hits the entity, whats the code to notify anyone with the jasper.alert permission? If a player hits more than 2 packets at the same time or within the same defined tick interval, whats the code to make it autoban This is all I have so far! Code: package Jasper.java; import java.util.logging.Logger; import net.minecraft.server.v1_7_R4.ChunkCoordinates; import net.minecraft.server.v1_7_R4.EntityHuman; import net.minecraft.server.v1_7_R4.EntityLiving; import net.minecraft.server.v1_7_R4.EntityPlayer; import net.minecraft.server.v1_7_R4.IChatBaseComponent; import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntity; import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityLiving; import net.minecraft.server.v1_7_R4.WorldServer; import net.minecraft.util.org.apache.commons.lang3.text.translate.EntityArrays; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.command.CommandSender; import org.bukkit.craftbukkit.v1_7_R4.CraftWorld; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftLivingEntity; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import com.avaje.ebeaninternal.server.cluster.Packet; @SuppressWarnings("unused") public class Jasper<packetLogger> extends JavaPlugin { Logger jasperLogger = Bukkit.getLogger(); @Override public void onEnable() { jasperLogger.info("Jasper is enabled and now logging alerts!"); } @Override public void onDisable() { jasperLogger.info("Jasper is disabled and no longer logging alerts!"); jasperLogger.severe("Something's wrong! Am I being restarted?"); } {} //this is for the 1st front packet public void spawn(Location ioc, Player p) { Location loc; WorldServer s = ((CraftWorld)loc.getWorld()).getHandle(); EntityLiving stand = new EntityLiving(loc.getPitch(), s, loc.getYaw() ); stand.setLocation(loc.getX(), loc.getY(), loc.getZ(), 0, 0); ((CraftLivingEntity) stand).setCustomName("This is PacketF1 reporting for duty!"); stand.setInvisible(true); (getType(0x05)).setGravity(true); //different packets will be expressed later PacketPlayOutSpawnEntityLiving packet = new PacketPlayOutSpawnEntityLiving(stand); ((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet); } {} public void getType(int i) { } //should tell if this entity has been damaged public void getLocation(boolean flag) { Bukkit.getLogger(); //if not then something's wrong { } Can you tell me if anything needs fixing or tweaking?
@Tyriek I don't think this can even be compiled. Your code is broken and in no way should work. Because of this, I can tell you have never officially learn Java. Knowing how to write in Java is a Requirement for making bukkit plugins. Please, select at tutorial following link, learn Java (which should only take a week), and then come back to bukkit. https://bukkit.org/threads/plugin-dev-sticky-learning-java-where-to-learn.395662/