Partially done refactoring NpcManager

This commit is contained in:
CoderTim 2014-09-30 11:03:23 -04:00
parent 578b5702bc
commit a5a2c1a837
10 changed files with 699 additions and 799 deletions

View File

@ -1,132 +0,0 @@
package mineplex.core.npc;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.creature.Creature;
import mineplex.database.Tables;
import mineplex.database.tables.records.NpcsRecord;
import org.jooq.DSLContext;
import org.jooq.Query;
import org.jooq.Result;
import org.jooq.impl.DSL;
public class DatabaseNpcManager extends NpcManager
{
private final Connection _connection;
public DatabaseNpcManager(JavaPlugin plugin, Creature creature, Connection connection)
{
super(plugin, creature);
_connection = connection;
}
public Connection getConnection()
{
return _connection;
}
@Override
public void SaveNpcs()
{
String serverType = GetPlugin().getClass().getSimpleName();
DSLContext context = DSL.using(getConnection());
List<Query> queryList = new ArrayList<>();
Query query = context
.delete(Tables.npcs)
.where(Tables.npcs.server.eq(serverType));
queryList.add(query);
for (Map.Entry<String, NpcEntry> entry : _npcs.entrySet())
{
String helmet = null;
String chestplate = null;
String leggings = null;
String boots = null;
String inHand = null;
if (entry.getValue().Entity instanceof LivingEntity)
{
LivingEntity livingEntity = (LivingEntity) entry.getValue().Entity;
helmet = getItemStackYaml(livingEntity.getEquipment().getHelmet());
chestplate = getItemStackYaml(livingEntity.getEquipment().getChestplate());
leggings = getItemStackYaml(livingEntity.getEquipment().getLeggings());
boots = getItemStackYaml(livingEntity.getEquipment().getBoots());
inHand = getItemStackYaml(livingEntity.getEquipment().getItemInHand());
}
query = context
.insertInto(Tables.npcs)
.set(Tables.npcs.server, serverType)
.set(Tables.npcs.uuid, entry.getKey())
.set(Tables.npcs.name, entry.getValue().Name)
.set(Tables.npcs.world, entry.getValue().Location.getWorld().getName())
.set(Tables.npcs.x, entry.getValue().Location.getX())
.set(Tables.npcs.y, entry.getValue().Location.getY())
.set(Tables.npcs.z, entry.getValue().Location.getZ())
.set(Tables.npcs.radius, entry.getValue().Radius)
.set(Tables.npcs.entityType, entry.getValue().Entity.getType().name())
.set(Tables.npcs.adult, !(entry.getValue().Entity instanceof Ageable) || ((Ageable) entry.getValue().Entity).isAdult())
.set(Tables.npcs.helmet, helmet)
.set(Tables.npcs.chestplate, chestplate)
.set(Tables.npcs.leggings, leggings)
.set(Tables.npcs.boots, boots)
.set(Tables.npcs.inHand, inHand);
queryList.add(query);
}
context.batch(queryList).execute();
}
@Override
public void LoadNpcs()
{
String serverType = GetPlugin().getClass().getSimpleName();
DSLContext context = DSL.using(getConnection());
Result<NpcsRecord> result = context
.selectFrom(Tables.npcs)
.where(Tables.npcs.server.eq(serverType))
.fetch();
for (NpcsRecord record : result)
{
UUID uuid = UUID.fromString(record.getUuid());
Location location = new Location(Bukkit.getWorld(record.getWorld()), record.getX(), record.getY(), record.getZ());
int radius = record.getRadius();
_npcs.put(uuid.toString(), new NpcEntry(record.getName(), null, radius, location));
}
}
private static String getItemStackYaml(ItemStack stack)
{
if (stack == null || stack.getType() == Material.AIR)
return null;
else
{
YamlConfiguration configuration = new YamlConfiguration();
configuration.set("stack", stack);
return configuration.saveToString();
}
}
}

View File

@ -0,0 +1,102 @@
package mineplex.core.npc;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftCreature;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import net.minecraft.server.v1_7_R4.EntityCreature;
import mineplex.database.tables.records.NpcsRecord;
public class Npc
{
private final NpcsRecord _databaseRecord;
private final Location _location;
private UUID _uuid;
private int _failedAttempts = 0;
private boolean _returning = false;
public Npc(NpcsRecord databaseRecord)
{
_databaseRecord = databaseRecord;
_location = new Location(Bukkit.getWorld(getDatabaseRecord().getWorld()), getDatabaseRecord().getX(), getDatabaseRecord().getY(), getDatabaseRecord().getZ());
}
public void setEntity(LivingEntity entity)
{
if (entity == null)
_uuid = null;
else
_uuid = entity.getUniqueId();
}
public UUID getUuid()
{
return _uuid;
}
public NpcsRecord getDatabaseRecord()
{
return _databaseRecord;
}
public int getFailedAttempts()
{
return _failedAttempts;
}
public void setFailedAttempts(int failedAttempts)
{
_failedAttempts = failedAttempts;
}
public int incrementFailedAttempts()
{
return ++_failedAttempts;
}
public Location getLocation()
{
return _location;
}
public int getRadius()
{
return getDatabaseRecord().getRadius();
}
public boolean isInRadius(Location location)
{
if (location.getWorld() != getLocation().getWorld())
return false;
return location.distanceSquared(getLocation()) <= getRadius() * getRadius();
}
public void returnToPost(Entity entity)
{
EntityCreature ec = ((CraftCreature) entity).getHandle();
ec.getNavigation().a(getLocation().getX(), getLocation().getY(), getLocation().getZ(), .8f);
_returning = true;
}
public boolean isReturning()
{
return _returning;
}
public void clearGoals(Entity entity)
{
_returning = false;
Location entityLocation = entity.getLocation();
EntityCreature ec = ((CraftCreature) entity).getHandle();
ec.getNavigation().a(entityLocation.getX(), entityLocation.getY(), entityLocation.getZ(), .8f);
}
}

View File

@ -1,53 +0,0 @@
package mineplex.core.npc;
import net.minecraft.server.v1_7_R4.EntityCreature;
import org.bukkit.entity.Entity;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftCreature;
import org.bukkit.Location;
public class NpcEntry
{
public String Name;
public Entity Entity;
public int Radius;
public Location Location;
private boolean _returning = false;
public NpcEntry(String name, Entity entity, int radius, Location location)
{
Name = name;
Entity = entity;
Radius = radius;
Location = location;
}
public void ReturnToPost()
{
EntityCreature ec = ((CraftCreature)Entity).getHandle();
ec.getNavigation().a(Location.getX(), Location.getY(), Location.getZ(), .8f);
_returning = true;
}
public boolean IsInRadius()
{
Location entityLocation = Entity.getLocation();
return Math.abs(entityLocation.getBlockX() - Location.getBlockX()) + Math.abs(entityLocation.getBlockY() - Location.getBlockY()) + Math.abs(entityLocation.getBlockZ() - Location.getBlockZ()) <= Radius;
}
public boolean Returning()
{
return _returning;
}
public void ClearGoals()
{
_returning = false;
Location entityLocation = Entity.getLocation();
EntityCreature ec = ((CraftCreature)Entity).getHandle();
ec.getNavigation().a(entityLocation.getX(), entityLocation.getY(), entityLocation.getZ(), .8f);
}
}

View File

@ -7,20 +7,24 @@ import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.UUID;
import net.minecraft.server.v1_7_R4.EntityAgeable;
import net.minecraft.server.v1_7_R4.EntityInsentient;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.World.Environment;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftAgeable;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftLivingEntity;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
@ -33,67 +37,71 @@ import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
import net.minecraft.server.v1_7_R4.EntityAgeable;
import net.minecraft.server.v1_7_R4.EntityInsentient;
import mineplex.core.MiniPlugin;
import mineplex.core.common.Rank;
import mineplex.core.common.util.F;
import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.creature.Creature;
import mineplex.core.creature.event.CreatureKillEntitiesEvent;
import mineplex.core.database.DBPool;
import mineplex.core.npc.Commands.NpcCommand;
import mineplex.core.npc.event.NpcDamageByEntityEvent;
import mineplex.core.npc.event.NpcInteractEntityEvent;
import mineplex.database.Tables;
import mineplex.database.tables.records.NpcsRecord;
import org.jooq.DSLContext;
import org.jooq.Result;
import org.jooq.impl.DSL;
public class NpcManager extends MiniPlugin
{
private Creature _creature;
protected NautHashMap<String, NpcEntry> _npcs;
private NautHashMap<String, Integer> _failedAttempts;
private static String getItemStackYaml(ItemStack stack)
{
if (stack == null || stack.getType() == Material.AIR)
return null;
else
{
YamlConfiguration configuration = new YamlConfiguration();
configuration.set("stack", stack);
return configuration.saveToString();
}
}
private NautHashMap<String, NpcEntry> _addTempList;
private HashSet<String> _delTempList;
private final Creature _creature;
private final Set<Npc> _npcs = new HashSet<>();
private final Set<UUID> _npcDeletingPlayers = new HashSet<>();
public NpcManager(JavaPlugin plugin, Creature creature)
public NpcManager(JavaPlugin plugin, Creature creature) throws SQLException
{
super("NpcManager", plugin);
_creature = creature;
_npcs = new NautHashMap<String, NpcEntry>();
_failedAttempts = new NautHashMap<String, Integer>();
_addTempList = new NautHashMap<String, NpcEntry>();
_delTempList = new HashSet<String>();
_plugin.getServer().getScheduler().scheduleSyncRepeatingTask(_plugin, new Runnable()
{
public void run()
{
UpdateNpcLocations();
}
}, 0L, 5L);
_plugin.getServer().getScheduler().scheduleSyncDelayedTask(_plugin, new Runnable()
{
public void run()
{
ReattachNpcs();
}
}, 100L);
{
public void run()
{
UpdateNpcLocations();
}
}, 0L, 5L);
_plugin.getServer().getPluginManager().registerEvents(this, _plugin);
LoadNpcs();
}
public void AddCommands()
{
public void AddCommands()
{
AddCommand(new NpcCommand(this));
}
public void Help(Player caller, String message)
{
UtilPlayer.message(caller, F.main(_moduleName, "Commands List:"));
@ -102,453 +110,338 @@ public class NpcManager extends MiniPlugin
UtilPlayer.message(caller, F.help("/npc clear", "Removes all npcs", Rank.OWNER));
UtilPlayer.message(caller, F.help("/npc home", " Teleport npcs to home locations.", Rank.OWNER));
UtilPlayer.message(caller, F.help("/npc reattach", "Attempt to reattach npcs to entities.", Rank.OWNER));
if (message != null)
UtilPlayer.message(caller, F.main(_moduleName, ChatColor.RED + message));
}
public void Help(Player caller)
{
Help(caller, null);
}
@EventHandler(priority = EventPriority.LOWEST)
public void OnEntityDamage(EntityDamageEvent event)
{
if (_npcs.containsKey(event.getEntity().getUniqueId().toString()))
{
event.setCancelled(true);
return;
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void OnEntityDamage(EntityDamageByEntityEvent event)
{
if (_npcs.containsKey(event.getEntity().getUniqueId().toString()))
{
if (event.getDamager() instanceof LivingEntity)
{
NpcDamageByEntityEvent npcEvent = new NpcDamageByEntityEvent((LivingEntity)event.getEntity(), (LivingEntity)event.getDamager());
Bukkit.getServer().getPluginManager().callEvent(npcEvent);
}
event.setCancelled(true);
return;
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void OnCreatureKillEntities(CreatureKillEntitiesEvent event)
{
Iterator<Entity> entityIterator = event.GetEntities().iterator();
while (entityIterator.hasNext())
{
if (_npcs.containsKey(entityIterator.next().getUniqueId().toString()))
{
entityIterator.remove();
}
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void OnEntityTarget(EntityTargetEvent event)
{
if (_npcs.containsKey(event.getEntity().getUniqueId().toString()))
{
event.setCancelled(true);
return;
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void OnEntityCombust(EntityCombustEvent event)
{
if (_npcs.containsKey(event.getEntity().getUniqueId().toString()))
{
event.setCancelled(true);
return;
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void OnChunkLoad(ChunkLoadEvent event)
{
for (Entity entity : event.getChunk().getEntities())
{
if (_npcs.containsKey(entity.getUniqueId().toString()))
{
_npcs.get(entity.getUniqueId().toString()).Name = ((LivingEntity)entity).getCustomName();
_npcs.get(entity.getUniqueId().toString()).Entity = entity;
UtilEnt.silence(entity, true);
UtilEnt.ghost(entity, true, false);
if (_npcs.get(entity.getUniqueId().toString()).Radius == 0)
{
UtilEnt.Vegetate(entity);
}
}
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerInteractEntity(PlayerInteractEntityEvent event)
{
if (event.getRightClicked() instanceof LivingEntity)
public Npc getNpcByEntityUUID(UUID uuid)
{
if (uuid == null)
return null;
for (Npc npc : _npcs)
{
if (_addTempList.containsKey(event.getPlayer().getName()))
{
if (event.getRightClicked().getType() == EntityType.PLAYER)
{
event.getPlayer().sendMessage(F.main(GetName(), "Failed to add npc. Can't attach to player."));
}
else
{
LivingEntity npc = ((LivingEntity)event.getRightClicked());
if (_addTempList.get(event.getPlayer().getName()).Name != null)
{
npc.setCustomName(_addTempList.get(event.getPlayer().getName()).Name);
npc.setCustomNameVisible(true);
}
npc.getEquipment().setArmorContents(event.getPlayer().getInventory().getArmorContents());
npc.getEquipment().setItemInHand(event.getPlayer().getItemInHand());
npc.setCanPickupItems(false);
((EntityInsentient)((CraftLivingEntity)npc).getHandle()).persistent = true;
if (npc instanceof Creature)
{
((org.bukkit.entity.Creature)npc).setTarget(null);
}
AddNpc(npc, _addTempList.get(event.getPlayer().getName()), true);
event.getPlayer().sendMessage(F.main(GetName(), "Added npc"));
}
_addTempList.remove(event.getPlayer().getName());
}
else if (_delTempList.contains(event.getPlayer().getName()))
{
if (DeleteNpc(event.getRightClicked()))
{
event.getPlayer().sendMessage(F.main(GetName(), "Deleted npc."));
}
else
{
event.getPlayer().sendMessage(F.main(GetName(), "Failed to delete npc. That one isn't in the list."));
}
_delTempList.remove(event.getPlayer().getName());
}
if (_npcs.containsKey(event.getRightClicked().getUniqueId().toString()))
{
NpcInteractEntityEvent npcEvent = new NpcInteractEntityEvent((LivingEntity)event.getRightClicked(), event.getPlayer());
Bukkit.getServer().getPluginManager().callEvent(npcEvent);
event.setCancelled(true);
return;
}
if (npc.getUuid() != null && npc.getUuid().equals(uuid))
return npc;
}
}
public void SetNpcInfo(Player admin, int radius, String name, Location location)
{
_addTempList.put(admin.getName(), new NpcEntry(name, null, radius, location));
}
public Entity AddNpc(EntityType entityType, int radius, String name, Location location)
{
LivingEntity entity = (LivingEntity) _creature.SpawnEntity(location, entityType);
entity.setCustomName(name);
entity.setCustomNameVisible(true);
return null;
}
public Npc getNpcByEntity(Entity entity)
{
if (entity == null)
return null;
return getNpcByEntityUUID(entity.getUniqueId());
}
public boolean isNpc(Entity entity)
{
return getNpcByEntity(entity) != null;
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onEntityDamage(EntityDamageEvent event)
{
if (isNpc(event.getEntity()))
event.setCancelled(true);
}
@EventHandler(priority = EventPriority.LOWEST)
public void onEntityDamage(EntityDamageByEntityEvent event)
{
if (isNpc(event.getEntity()))
{
if (event.getEntity() instanceof LivingEntity && event.getDamager() instanceof LivingEntity)
{
NpcDamageByEntityEvent npcEvent = new NpcDamageByEntityEvent((LivingEntity) event.getEntity(), (LivingEntity) event.getDamager());
Bukkit.getServer().getPluginManager().callEvent(npcEvent);
}
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onCreatureKillEntities(CreatureKillEntitiesEvent event)
{
for (Iterator<Entity> entityIterator = event.GetEntities().iterator(); entityIterator.hasNext(); )
{
if (isNpc(entityIterator.next()))
entityIterator.remove();
}
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onEntityTarget(EntityTargetEvent event)
{
if (isNpc(event.getEntity()))
event.setCancelled(true);
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onEntityCombust(EntityCombustEvent event)
{
if (isNpc(event.getEntity()))
event.setCancelled(true);
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void OnChunkLoad(ChunkLoadEvent event)
{
for (Entity entity : event.getChunk().getEntities())
{
Npc npc = getNpcByEntity(entity);
if (npc != null)
{
UtilEnt.silence(entity, true);
UtilEnt.ghost(entity, true, false);
if (npc.getDatabaseRecord().getRadius() == 0)
UtilEnt.Vegetate(entity);
}
}
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onPlayerInteractEntity(PlayerInteractEntityEvent event)
{
if (event.getRightClicked() instanceof LivingEntity)
{
if (_npcDeletingPlayers.remove(event.getPlayer().getUniqueId()))
{
try
{
if (DeleteNpc(event.getRightClicked()))
event.getPlayer().sendMessage(F.main(GetName(), "Deleted npc."));
else
event.getPlayer().sendMessage(F.main(GetName(), "Failed to delete npc. That one isn't in the list."));
}
catch (SQLException e)
{
e.printStackTrace();
}
}
else if (isNpc(event.getRightClicked()))
{
NpcInteractEntityEvent npcEvent = new NpcInteractEntityEvent((LivingEntity) event.getRightClicked(), event.getPlayer());
Bukkit.getServer().getPluginManager().callEvent(npcEvent);
event.setCancelled(true);
}
}
}
public Entity AddNpc(Player player, String serverType, EntityType entityType, String name, int radius, boolean adult) throws SQLException
{
try (Connection connection = DBPool.getInstance().getConnection())
{
String helmet = getItemStackYaml(player.getInventory().getHelmet());
String chestplate = getItemStackYaml(player.getInventory().getHelmet());
String leggings = getItemStackYaml(player.getInventory().getHelmet());
String boots = getItemStackYaml(player.getInventory().getHelmet());
String inHand = getItemStackYaml(player.getInventory().getHelmet());
NpcsRecord npcsRecord = new NpcsRecord();
npcsRecord.setServer(serverType);
npcsRecord.setName(name);
npcsRecord.setWorld(player.getWorld().getName());
npcsRecord.setX(player.getLocation().getX());
npcsRecord.setY(player.getLocation().getY());
npcsRecord.setZ(player.getLocation().getZ());
npcsRecord.setRadius(radius);
npcsRecord.setEntityType(entityType.name());
npcsRecord.setAdult(adult);
npcsRecord.setHelmet(helmet);
npcsRecord.setChestplate(chestplate);
npcsRecord.setLeggings(leggings);
npcsRecord.setBoots(boots);
npcsRecord.setInHand(inHand);
DSL.using(connection).executeInsert(npcsRecord);
npcsRecord.detach();
Npc npc = new Npc(npcsRecord);
_npcs.add(npc);
return spawnNpc(npc);
}
}
public Entity spawnNpc(Npc npc)
{
LivingEntity entity = (LivingEntity) _creature.SpawnEntity(npc.getLocation(), EntityType.valueOf(npc.getDatabaseRecord().getEntityType()));
if (npc.getDatabaseRecord().getName() != null)
{
entity.setCustomName(npc.getDatabaseRecord().getName());
entity.setCustomNameVisible(true);
}
entity.setCanPickupItems(false);
entity.setRemoveWhenFarAway(false);
((EntityInsentient)((CraftLivingEntity)entity).getHandle()).persistent = true;
if (((CraftLivingEntity)entity).getHandle() instanceof EntityAgeable)
{
((CraftAgeable)entity).getHandle().ageLocked = true;
}
if (entity instanceof Creature)
{
((org.bukkit.entity.Creature)entity).setTarget(null);
}
return AddNpc(entity, new NpcEntry(name, null, radius, location), true);
}
public Entity AddNpc(LivingEntity entity, NpcEntry entry, boolean save)
{
entry.Entity = entity;
_npcs.put(entity.getUniqueId().toString(), entry);
if (entry.Radius == 0)
{
UtilEnt.Vegetate(entry.Entity);
UtilEnt.silence(entry.Entity, true);
}
if (save)
SaveNpcs();
return entity;
}
((EntityInsentient) ((CraftLivingEntity) entity).getHandle()).persistent = true;
public boolean DeleteNpc(Entity entity)
{
if (entity instanceof LivingEntity)
{
if (_npcs.containsKey(entity.getUniqueId().toString()))
{
entity.remove();
_npcs.remove(entity.getUniqueId().toString());
return true;
}
}
return false;
}
if (entity instanceof Ageable)
{
if (npc.getDatabaseRecord().getAdult())
((Ageable) entity).setAdult();
else
((Ageable) entity).setBaby();
((Ageable) entity).setAgeLock(true);
}
if (entity instanceof org.bukkit.entity.Creature)
((org.bukkit.entity.Creature) entity).setTarget(null);
if (npc.getDatabaseRecord().getRadius() == 0)
{
UtilEnt.Vegetate(entity);
UtilEnt.silence(entity, true);
}
npc.setEntity(entity);
return entity;
}
public boolean DeleteNpc(Entity entity) throws SQLException
{
Npc npc = getNpcByEntity(entity);
if (npc != null)
{
try (Connection connection = DBPool.getInstance().getConnection())
{
DSLContext context = DSL.using(connection);
context.executeDelete(npc.getDatabaseRecord());
entity.remove();
_npcs.remove(npc);
return true;
}
}
return false;
}
public void PrepDeleteNpc(Player admin)
{
_delTempList.add(admin.getName());
_npcDeletingPlayers.add(admin.getUniqueId());
}
public void ClearNpcs()
{
Iterator<String> npcIterator = _npcs.keySet().iterator();
while (npcIterator.hasNext())
{
String id = npcIterator.next();
if (_npcs.get(id).Entity != null)
_npcs.get(id).Entity.remove();
npcIterator.remove();
}
SaveNpcs();
}
private void UpdateNpcLocations()
{
for (NpcEntry npc : _npcs.values())
for (World world : Bukkit.getWorlds())
{
if (npc.Entity == null)
for (LivingEntity entity : world.getEntitiesByClass(LivingEntity.class))
{
continue;
}
npc.Entity.setTicksLived(1);
((EntityInsentient)((CraftLivingEntity)npc.Entity).getHandle()).persistent = true;
UtilEnt.silence(npc.Entity, true);
if (!IsNpcChunkLoaded(npc.Entity) || !(npc.Entity instanceof CraftCreature))
{
continue;
}
if (!npc.Entity.isDead() && npc.Entity.isValid())
{
String uuid = npc.Entity.getUniqueId().toString();
((LivingEntity)npc.Entity).getEquipment().getArmorContents()[0].setDurability((short)0);
((LivingEntity)npc.Entity).getEquipment().getArmorContents()[1].setDurability((short)0);
((LivingEntity)npc.Entity).getEquipment().getArmorContents()[2].setDurability((short)0);
((LivingEntity)npc.Entity).getEquipment().getArmorContents()[3].setDurability((short)0);
if (!_failedAttempts.containsKey(uuid))
_failedAttempts.put(uuid, 0);
if (_failedAttempts.get(uuid) >= 10)
{
npc.Entity.teleport(npc.Location);
_failedAttempts.put(uuid, 0);
}
else if (!npc.IsInRadius())
Npc npc = getNpcByEntity(entity);
if (npc == null)
continue;
entity.setTicksLived(1);
((EntityInsentient) ((CraftLivingEntity) entity).getHandle()).persistent = true;
UtilEnt.silence(entity, true);
if (!IsNpcChunkLoaded(entity) || !(entity instanceof CraftCreature))
continue;
if (!entity.isDead() && entity.isValid())
{
npc.ReturnToPost();
_failedAttempts.put(uuid, _failedAttempts.get(uuid) + 1);
for (ItemStack armor : entity.getEquipment().getArmorContents())
{
if (armor != null && armor.getType() != Material.AIR)
armor.setDurability((short) 0);
}
if (npc.getFailedAttempts() >= 10)
{
entity.teleport(npc.getLocation());
npc.setFailedAttempts(0);
}
else if (!npc.isInRadius(entity.getLocation()))
{
npc.returnToPost(entity);
npc.incrementFailedAttempts();
}
else
{
if (npc.isReturning())
npc.clearGoals(entity);
npc.setFailedAttempts(0);
}
}
else
{
if (npc.Returning())
{
npc.ClearGoals();
}
_failedAttempts.put(uuid, 0);
}
}
}
}
public void TeleportNpcsHome()
{
for (NpcEntry npc : _npcs.values())
for (World world : Bukkit.getWorlds())
{
if (npc.Entity == null)
for (LivingEntity entity : world.getEntitiesByClass(LivingEntity.class))
{
continue;
}
if (!IsNpcChunkLoaded(npc.Entity))
{
continue;
}
if (!npc.Entity.isDead() && npc.Entity.isValid())
{
npc.Entity.teleport(npc.Location);
_failedAttempts.put(npc.Entity.getUniqueId().toString(), 0);
Npc npc = getNpcByEntity(entity);
if (npc == null)
continue;
if (!IsNpcChunkLoaded(entity))
continue;
if (!entity.isDead() && entity.isValid())
{
entity.teleport(npc.getLocation());
npc.setFailedAttempts(0);
}
}
}
}
public void ReattachNpcs()
{
for (Entity entity : UtilWorld.getWorldType(Environment.NORMAL).getEntities())
{
if (_npcs.containsKey(entity.getUniqueId().toString()))
{
_npcs.get(entity.getUniqueId().toString()).Name = ((LivingEntity)entity).getCustomName();
_npcs.get(entity.getUniqueId().toString()).Entity = entity;
}
}
}
public boolean IsNpcChunkLoaded(Entity entity)
{
return entity.getWorld().isChunkLoaded(entity.getLocation().getBlockX() >> 4, entity.getLocation().getBlockZ() >> 4);
}
public void LoadNpcs()
public void LoadNpcs() throws SQLException
{
FileInputStream fstream = null;
BufferedReader br = null;
try
{
File npcFile = new File("npcs.dat");
String serverType = _plugin.getClass().getSimpleName();
if (npcFile.exists())
{
fstream = new FileInputStream(npcFile);
br = new BufferedReader(new InputStreamReader(fstream));
String line = br.readLine();
while (line != null)
{
UUID uuid = UUID.fromString(line.split(" ")[0]);
String location = line.split(" ")[1];
Integer radius = Integer.parseInt(line.split(" ")[2]);
_npcs.put(uuid.toString(), new NpcEntry(null, null, radius, UtilWorld.strToLoc(location)));
line = br.readLine();
}
}
}
catch (Exception e)
try (Connection connection = DBPool.getInstance().getConnection())
{
System.out.println(F.main(GetName(), "Error parsing npc file."));
}
finally
{
if (br != null)
{
try
{
br.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}
if (fstream != null)
{
try
{
fstream.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}
}
}
public void SaveNpcs()
{
FileWriter fstream = null;
BufferedWriter out = null;
try
{
fstream = new FileWriter("npcs.dat");
out = new BufferedWriter(fstream);
for (String key : _npcs.keySet())
{
out.write(key + " " + UtilWorld.locToStr(_npcs.get(key).Location) + " " + _npcs.get(key).Radius);
out.newLine();
}
Result<NpcsRecord> result = DSL.using(connection)
.selectFrom(Tables.npcs)
.where(Tables.npcs.server.eq(serverType))
.fetch();
out.close();
}
catch (Exception e)
{
System.err.println("Npc Save Error: " + e.getMessage());
}
finally
{
if (out != null)
for (NpcsRecord record : result)
{
try
{
out.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}
if (fstream != null)
{
try
{
fstream.close();
}
catch (IOException e)
{
e.printStackTrace();
}
record.detach();
Npc npc = new Npc(record);
spawnNpc(npc);
_npcs.add(npc);
}
}
}
public NpcEntry GetNpcByUUID(UUID uniqueId)
public Set<UUID> getNpcDeletingPlayers()
{
return _npcs.get(uniqueId.toString());
}
public boolean isNpc(LivingEntity entity)
{
return _npcs.containsKey(entity.getUniqueId().toString());
return _npcDeletingPlayers;
}
}

View File

@ -11,7 +11,7 @@ package mineplex.database.tables;
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class AccountPreferences extends org.jooq.impl.TableImpl<mineplex.database.tables.records.AccountPreferencesRecord> implements java.io.Serializable, java.lang.Cloneable {
private static final long serialVersionUID = -1892251736;
private static final long serialVersionUID = 203359538;
/**
* The singleton instance of <code>Account.accountPreferences</code>
@ -81,6 +81,16 @@ public class AccountPreferences extends org.jooq.impl.TableImpl<mineplex.databas
*/
public final org.jooq.TableField<mineplex.database.tables.records.AccountPreferencesRecord, java.lang.Byte> forcefield = createField("forcefield", org.jooq.impl.SQLDataType.TINYINT.nullable(false).defaulted(true), this, "");
/**
* The column <code>Account.accountPreferences.showMacReports</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.AccountPreferencesRecord, java.lang.Byte> showMacReports = createField("showMacReports", org.jooq.impl.SQLDataType.TINYINT.nullable(false).defaulted(true), this, "");
/**
* The column <code>Account.accountPreferences.ignoreVelocity</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.AccountPreferencesRecord, java.lang.Byte> ignoreVelocity = createField("ignoreVelocity", org.jooq.impl.SQLDataType.TINYINT.nullable(false).defaulted(true), this, "");
/**
* Create a <code>Account.accountPreferences</code> table reference
*/

View File

@ -11,7 +11,7 @@ package mineplex.database.tables;
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Accounts extends org.jooq.impl.TableImpl<mineplex.database.tables.records.AccountsRecord> implements java.io.Serializable, java.lang.Cloneable {
private static final long serialVersionUID = -3288904;
private static final long serialVersionUID = -555476915;
/**
* The singleton instance of <code>Account.accounts</code>
@ -46,10 +46,15 @@ public class Accounts extends org.jooq.impl.TableImpl<mineplex.database.tables.r
*/
public final org.jooq.TableField<mineplex.database.tables.records.AccountsRecord, java.lang.Integer> gems = createField("gems", org.jooq.impl.SQLDataType.INTEGER, this, "");
/**
* The column <code>Account.accounts.donorRank</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.AccountsRecord, java.lang.String> donorRank = createField("donorRank", org.jooq.impl.SQLDataType.VARCHAR.length(20).defaulted(true), this, "");
/**
* The column <code>Account.accounts.rank</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.AccountsRecord, java.lang.String> rank = createField("rank", org.jooq.impl.SQLDataType.VARCHAR.length(40), this, "");
public final org.jooq.TableField<mineplex.database.tables.records.AccountsRecord, java.lang.String> rank = createField("rank", org.jooq.impl.SQLDataType.VARCHAR.length(20).defaulted(true), this, "");
/**
* The column <code>Account.accounts.rankPerm</code>.

View File

@ -11,7 +11,7 @@ package mineplex.database.tables;
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Npcs extends org.jooq.impl.TableImpl<mineplex.database.tables.records.NpcsRecord> implements java.io.Serializable, java.lang.Cloneable {
private static final long serialVersionUID = -1825231460;
private static final long serialVersionUID = 1867321317;
/**
* The singleton instance of <code>Account.npcs</code>
@ -36,15 +36,10 @@ public class Npcs extends org.jooq.impl.TableImpl<mineplex.database.tables.recor
*/
public final org.jooq.TableField<mineplex.database.tables.records.NpcsRecord, java.lang.String> server = createField("server", org.jooq.impl.SQLDataType.VARCHAR.length(50).nullable(false), this, "");
/**
* The column <code>Account.npcs.uuid</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.NpcsRecord, java.lang.String> uuid = createField("uuid", org.jooq.impl.SQLDataType.CHAR.length(36).nullable(false), this, "");
/**
* The column <code>Account.npcs.name</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.NpcsRecord, java.lang.String> name = createField("name", org.jooq.impl.SQLDataType.VARCHAR.length(50).nullable(false), this, "");
public final org.jooq.TableField<mineplex.database.tables.records.NpcsRecord, java.lang.String> name = createField("name", org.jooq.impl.SQLDataType.VARCHAR.length(50), this, "");
/**
* The column <code>Account.npcs.world</code>.
@ -69,7 +64,7 @@ public class Npcs extends org.jooq.impl.TableImpl<mineplex.database.tables.recor
/**
* The column <code>Account.npcs.radius</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.NpcsRecord, java.lang.Integer> radius = createField("radius", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
public final org.jooq.TableField<mineplex.database.tables.records.NpcsRecord, java.lang.Integer> radius = createField("radius", org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaulted(true), this, "");
/**
* The column <code>Account.npcs.entityType</code>.

View File

@ -9,9 +9,9 @@ package mineplex.database.tables.records;
@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.2" },
comments = "This class is generated by jOOQ")
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class AccountPreferencesRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.AccountPreferencesRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record11<java.lang.Integer, java.lang.String, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte> {
public class AccountPreferencesRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.AccountPreferencesRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record13<java.lang.Integer, java.lang.String, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte> {
private static final long serialVersionUID = -1987641641;
private static final long serialVersionUID = 865577358;
/**
* Setter for <code>Account.accountPreferences.id</code>.
@ -167,6 +167,34 @@ public class AccountPreferencesRecord extends org.jooq.impl.UpdatableRecordImpl<
return (java.lang.Byte) getValue(10);
}
/**
* Setter for <code>Account.accountPreferences.showMacReports</code>.
*/
public void setShowMacReports(java.lang.Byte value) {
setValue(11, value);
}
/**
* Getter for <code>Account.accountPreferences.showMacReports</code>.
*/
public java.lang.Byte getShowMacReports() {
return (java.lang.Byte) getValue(11);
}
/**
* Setter for <code>Account.accountPreferences.ignoreVelocity</code>.
*/
public void setIgnoreVelocity(java.lang.Byte value) {
setValue(12, value);
}
/**
* Getter for <code>Account.accountPreferences.ignoreVelocity</code>.
*/
public java.lang.Byte getIgnoreVelocity() {
return (java.lang.Byte) getValue(12);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
@ -180,23 +208,23 @@ public class AccountPreferencesRecord extends org.jooq.impl.UpdatableRecordImpl<
}
// -------------------------------------------------------------------------
// Record11 type implementation
// Record13 type implementation
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row11<java.lang.Integer, java.lang.String, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte> fieldsRow() {
return (org.jooq.Row11) super.fieldsRow();
public org.jooq.Row13<java.lang.Integer, java.lang.String, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte> fieldsRow() {
return (org.jooq.Row13) super.fieldsRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row11<java.lang.Integer, java.lang.String, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte> valuesRow() {
return (org.jooq.Row11) super.valuesRow();
public org.jooq.Row13<java.lang.Integer, java.lang.String, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte, java.lang.Byte> valuesRow() {
return (org.jooq.Row13) super.valuesRow();
}
/**
@ -287,6 +315,22 @@ public class AccountPreferencesRecord extends org.jooq.impl.UpdatableRecordImpl<
return mineplex.database.tables.AccountPreferences.accountPreferences.forcefield;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Byte> field12() {
return mineplex.database.tables.AccountPreferences.accountPreferences.showMacReports;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Byte> field13() {
return mineplex.database.tables.AccountPreferences.accountPreferences.ignoreVelocity;
}
/**
* {@inheritDoc}
*/
@ -375,6 +419,22 @@ public class AccountPreferencesRecord extends org.jooq.impl.UpdatableRecordImpl<
return getForcefield();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Byte value12() {
return getShowMacReports();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Byte value13() {
return getIgnoreVelocity();
}
/**
* {@inheritDoc}
*/
@ -478,7 +538,25 @@ public class AccountPreferencesRecord extends org.jooq.impl.UpdatableRecordImpl<
* {@inheritDoc}
*/
@Override
public AccountPreferencesRecord values(java.lang.Integer value1, java.lang.String value2, java.lang.Byte value3, java.lang.Byte value4, java.lang.Byte value5, java.lang.Byte value6, java.lang.Byte value7, java.lang.Byte value8, java.lang.Byte value9, java.lang.Byte value10, java.lang.Byte value11) {
public AccountPreferencesRecord value12(java.lang.Byte value) {
setShowMacReports(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AccountPreferencesRecord value13(java.lang.Byte value) {
setIgnoreVelocity(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AccountPreferencesRecord values(java.lang.Integer value1, java.lang.String value2, java.lang.Byte value3, java.lang.Byte value4, java.lang.Byte value5, java.lang.Byte value6, java.lang.Byte value7, java.lang.Byte value8, java.lang.Byte value9, java.lang.Byte value10, java.lang.Byte value11, java.lang.Byte value12, java.lang.Byte value13) {
return this;
}
@ -496,7 +574,7 @@ public class AccountPreferencesRecord extends org.jooq.impl.UpdatableRecordImpl<
/**
* Create a detached, initialised AccountPreferencesRecord
*/
public AccountPreferencesRecord(java.lang.Integer id, java.lang.String uuid, java.lang.Byte filterChat, java.lang.Byte invisibility, java.lang.Byte games, java.lang.Byte visibility, java.lang.Byte friendChat, java.lang.Byte privateMessaging, java.lang.Byte showChat, java.lang.Byte partyRequests, java.lang.Byte forcefield) {
public AccountPreferencesRecord(java.lang.Integer id, java.lang.String uuid, java.lang.Byte filterChat, java.lang.Byte invisibility, java.lang.Byte games, java.lang.Byte visibility, java.lang.Byte friendChat, java.lang.Byte privateMessaging, java.lang.Byte showChat, java.lang.Byte partyRequests, java.lang.Byte forcefield, java.lang.Byte showMacReports, java.lang.Byte ignoreVelocity) {
super(mineplex.database.tables.AccountPreferences.accountPreferences);
setValue(0, id);
@ -510,5 +588,7 @@ public class AccountPreferencesRecord extends org.jooq.impl.UpdatableRecordImpl<
setValue(8, showChat);
setValue(9, partyRequests);
setValue(10, forcefield);
setValue(11, showMacReports);
setValue(12, ignoreVelocity);
}
}

View File

@ -9,9 +9,9 @@ package mineplex.database.tables.records;
@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.2" },
comments = "This class is generated by jOOQ")
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.AccountsRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record9<java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.String, java.lang.Byte, java.lang.String, java.sql.Timestamp, java.lang.String> {
public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.AccountsRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record10<java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.String, java.lang.String, java.lang.Byte, java.lang.String, java.sql.Timestamp, java.lang.String> {
private static final long serialVersionUID = 1410845092;
private static final long serialVersionUID = 1437085324;
/**
* Setter for <code>Account.accounts.id</code>.
@ -69,74 +69,88 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
return (java.lang.Integer) getValue(3);
}
/**
* Setter for <code>Account.accounts.donorRank</code>.
*/
public void setDonorRank(java.lang.String value) {
setValue(4, value);
}
/**
* Getter for <code>Account.accounts.donorRank</code>.
*/
public java.lang.String getDonorRank() {
return (java.lang.String) getValue(4);
}
/**
* Setter for <code>Account.accounts.rank</code>.
*/
public void setRank(java.lang.String value) {
setValue(4, value);
setValue(5, value);
}
/**
* Getter for <code>Account.accounts.rank</code>.
*/
public java.lang.String getRank() {
return (java.lang.String) getValue(4);
return (java.lang.String) getValue(5);
}
/**
* Setter for <code>Account.accounts.rankPerm</code>.
*/
public void setRankPerm(java.lang.Byte value) {
setValue(5, value);
setValue(6, value);
}
/**
* Getter for <code>Account.accounts.rankPerm</code>.
*/
public java.lang.Byte getRankPerm() {
return (java.lang.Byte) getValue(5);
return (java.lang.Byte) getValue(6);
}
/**
* Setter for <code>Account.accounts.rankExpire</code>.
*/
public void setRankExpire(java.lang.String value) {
setValue(6, value);
setValue(7, value);
}
/**
* Getter for <code>Account.accounts.rankExpire</code>.
*/
public java.lang.String getRankExpire() {
return (java.lang.String) getValue(6);
return (java.lang.String) getValue(7);
}
/**
* Setter for <code>Account.accounts.lastLogin</code>.
*/
public void setLastLogin(java.sql.Timestamp value) {
setValue(7, value);
setValue(8, value);
}
/**
* Getter for <code>Account.accounts.lastLogin</code>.
*/
public java.sql.Timestamp getLastLogin() {
return (java.sql.Timestamp) getValue(7);
return (java.sql.Timestamp) getValue(8);
}
/**
* Setter for <code>Account.accounts.totalPlayTime</code>.
*/
public void setTotalPlayTime(java.lang.String value) {
setValue(8, value);
setValue(9, value);
}
/**
* Getter for <code>Account.accounts.totalPlayTime</code>.
*/
public java.lang.String getTotalPlayTime() {
return (java.lang.String) getValue(8);
return (java.lang.String) getValue(9);
}
// -------------------------------------------------------------------------
@ -152,23 +166,23 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
}
// -------------------------------------------------------------------------
// Record9 type implementation
// Record10 type implementation
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row9<java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.String, java.lang.Byte, java.lang.String, java.sql.Timestamp, java.lang.String> fieldsRow() {
return (org.jooq.Row9) super.fieldsRow();
public org.jooq.Row10<java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.String, java.lang.String, java.lang.Byte, java.lang.String, java.sql.Timestamp, java.lang.String> fieldsRow() {
return (org.jooq.Row10) super.fieldsRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row9<java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.String, java.lang.Byte, java.lang.String, java.sql.Timestamp, java.lang.String> valuesRow() {
return (org.jooq.Row9) super.valuesRow();
public org.jooq.Row10<java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.String, java.lang.String, java.lang.Byte, java.lang.String, java.sql.Timestamp, java.lang.String> valuesRow() {
return (org.jooq.Row10) super.valuesRow();
}
/**
@ -208,6 +222,14 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
*/
@Override
public org.jooq.Field<java.lang.String> field5() {
return mineplex.database.tables.Accounts.accounts.donorRank;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field6() {
return mineplex.database.tables.Accounts.accounts.rank;
}
@ -215,7 +237,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Byte> field6() {
public org.jooq.Field<java.lang.Byte> field7() {
return mineplex.database.tables.Accounts.accounts.rankPerm;
}
@ -223,7 +245,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field7() {
public org.jooq.Field<java.lang.String> field8() {
return mineplex.database.tables.Accounts.accounts.rankExpire;
}
@ -231,7 +253,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.sql.Timestamp> field8() {
public org.jooq.Field<java.sql.Timestamp> field9() {
return mineplex.database.tables.Accounts.accounts.lastLogin;
}
@ -239,7 +261,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field9() {
public org.jooq.Field<java.lang.String> field10() {
return mineplex.database.tables.Accounts.accounts.totalPlayTime;
}
@ -280,6 +302,14 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
*/
@Override
public java.lang.String value5() {
return getDonorRank();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.String value6() {
return getRank();
}
@ -287,7 +317,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public java.lang.Byte value6() {
public java.lang.Byte value7() {
return getRankPerm();
}
@ -295,7 +325,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public java.lang.String value7() {
public java.lang.String value8() {
return getRankExpire();
}
@ -303,7 +333,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public java.sql.Timestamp value8() {
public java.sql.Timestamp value9() {
return getLastLogin();
}
@ -311,7 +341,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public java.lang.String value9() {
public java.lang.String value10() {
return getTotalPlayTime();
}
@ -356,6 +386,15 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
*/
@Override
public AccountsRecord value5(java.lang.String value) {
setDonorRank(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public AccountsRecord value6(java.lang.String value) {
setRank(value);
return this;
}
@ -364,7 +403,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public AccountsRecord value6(java.lang.Byte value) {
public AccountsRecord value7(java.lang.Byte value) {
setRankPerm(value);
return this;
}
@ -373,7 +412,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public AccountsRecord value7(java.lang.String value) {
public AccountsRecord value8(java.lang.String value) {
setRankExpire(value);
return this;
}
@ -382,7 +421,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public AccountsRecord value8(java.sql.Timestamp value) {
public AccountsRecord value9(java.sql.Timestamp value) {
setLastLogin(value);
return this;
}
@ -391,7 +430,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public AccountsRecord value9(java.lang.String value) {
public AccountsRecord value10(java.lang.String value) {
setTotalPlayTime(value);
return this;
}
@ -400,7 +439,7 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
* {@inheritDoc}
*/
@Override
public AccountsRecord values(java.lang.Integer value1, java.lang.String value2, java.lang.String value3, java.lang.Integer value4, java.lang.String value5, java.lang.Byte value6, java.lang.String value7, java.sql.Timestamp value8, java.lang.String value9) {
public AccountsRecord values(java.lang.Integer value1, java.lang.String value2, java.lang.String value3, java.lang.Integer value4, java.lang.String value5, java.lang.String value6, java.lang.Byte value7, java.lang.String value8, java.sql.Timestamp value9, java.lang.String value10) {
return this;
}
@ -418,17 +457,18 @@ public class AccountsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.d
/**
* Create a detached, initialised AccountsRecord
*/
public AccountsRecord(java.lang.Integer id, java.lang.String uuid, java.lang.String name, java.lang.Integer gems, java.lang.String rank, java.lang.Byte rankPerm, java.lang.String rankExpire, java.sql.Timestamp lastLogin, java.lang.String totalPlayTime) {
public AccountsRecord(java.lang.Integer id, java.lang.String uuid, java.lang.String name, java.lang.Integer gems, java.lang.String donorRank, java.lang.String rank, java.lang.Byte rankPerm, java.lang.String rankExpire, java.sql.Timestamp lastLogin, java.lang.String totalPlayTime) {
super(mineplex.database.tables.Accounts.accounts);
setValue(0, id);
setValue(1, uuid);
setValue(2, name);
setValue(3, gems);
setValue(4, rank);
setValue(5, rankPerm);
setValue(6, rankExpire);
setValue(7, lastLogin);
setValue(8, totalPlayTime);
setValue(4, donorRank);
setValue(5, rank);
setValue(6, rankPerm);
setValue(7, rankExpire);
setValue(8, lastLogin);
setValue(9, totalPlayTime);
}
}

View File

@ -9,9 +9,9 @@ package mineplex.database.tables.records;
@javax.annotation.Generated(value = { "http://www.jooq.org", "3.4.2" },
comments = "This class is generated by jOOQ")
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.NpcsRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record16<java.lang.Integer, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Double, java.lang.Double, java.lang.Double, java.lang.Integer, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String> {
public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.NpcsRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record15<java.lang.Integer, java.lang.String, java.lang.String, java.lang.String, java.lang.Double, java.lang.Double, java.lang.Double, java.lang.Integer, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String> {
private static final long serialVersionUID = 370528549;
private static final long serialVersionUID = 1527372083;
/**
* Setter for <code>Account.npcs.id</code>.
@ -41,200 +41,186 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
return (java.lang.String) getValue(1);
}
/**
* Setter for <code>Account.npcs.uuid</code>.
*/
public void setUuid(java.lang.String value) {
setValue(2, value);
}
/**
* Getter for <code>Account.npcs.uuid</code>.
*/
public java.lang.String getUuid() {
return (java.lang.String) getValue(2);
}
/**
* Setter for <code>Account.npcs.name</code>.
*/
public void setName(java.lang.String value) {
setValue(3, value);
setValue(2, value);
}
/**
* Getter for <code>Account.npcs.name</code>.
*/
public java.lang.String getName() {
return (java.lang.String) getValue(3);
return (java.lang.String) getValue(2);
}
/**
* Setter for <code>Account.npcs.world</code>.
*/
public void setWorld(java.lang.String value) {
setValue(4, value);
setValue(3, value);
}
/**
* Getter for <code>Account.npcs.world</code>.
*/
public java.lang.String getWorld() {
return (java.lang.String) getValue(4);
return (java.lang.String) getValue(3);
}
/**
* Setter for <code>Account.npcs.x</code>.
*/
public void setX(java.lang.Double value) {
setValue(5, value);
setValue(4, value);
}
/**
* Getter for <code>Account.npcs.x</code>.
*/
public java.lang.Double getX() {
return (java.lang.Double) getValue(5);
return (java.lang.Double) getValue(4);
}
/**
* Setter for <code>Account.npcs.y</code>.
*/
public void setY(java.lang.Double value) {
setValue(6, value);
setValue(5, value);
}
/**
* Getter for <code>Account.npcs.y</code>.
*/
public java.lang.Double getY() {
return (java.lang.Double) getValue(6);
return (java.lang.Double) getValue(5);
}
/**
* Setter for <code>Account.npcs.z</code>.
*/
public void setZ(java.lang.Double value) {
setValue(7, value);
setValue(6, value);
}
/**
* Getter for <code>Account.npcs.z</code>.
*/
public java.lang.Double getZ() {
return (java.lang.Double) getValue(7);
return (java.lang.Double) getValue(6);
}
/**
* Setter for <code>Account.npcs.radius</code>.
*/
public void setRadius(java.lang.Integer value) {
setValue(8, value);
setValue(7, value);
}
/**
* Getter for <code>Account.npcs.radius</code>.
*/
public java.lang.Integer getRadius() {
return (java.lang.Integer) getValue(8);
return (java.lang.Integer) getValue(7);
}
/**
* Setter for <code>Account.npcs.entityType</code>.
*/
public void setEntityType(java.lang.String value) {
setValue(9, value);
setValue(8, value);
}
/**
* Getter for <code>Account.npcs.entityType</code>.
*/
public java.lang.String getEntityType() {
return (java.lang.String) getValue(9);
return (java.lang.String) getValue(8);
}
/**
* Setter for <code>Account.npcs.adult</code>.
*/
public void setAdult(java.lang.Boolean value) {
setValue(10, value);
setValue(9, value);
}
/**
* Getter for <code>Account.npcs.adult</code>.
*/
public java.lang.Boolean getAdult() {
return (java.lang.Boolean) getValue(10);
return (java.lang.Boolean) getValue(9);
}
/**
* Setter for <code>Account.npcs.helmet</code>.
*/
public void setHelmet(java.lang.String value) {
setValue(11, value);
setValue(10, value);
}
/**
* Getter for <code>Account.npcs.helmet</code>.
*/
public java.lang.String getHelmet() {
return (java.lang.String) getValue(11);
return (java.lang.String) getValue(10);
}
/**
* Setter for <code>Account.npcs.chestplate</code>.
*/
public void setChestplate(java.lang.String value) {
setValue(12, value);
setValue(11, value);
}
/**
* Getter for <code>Account.npcs.chestplate</code>.
*/
public java.lang.String getChestplate() {
return (java.lang.String) getValue(12);
return (java.lang.String) getValue(11);
}
/**
* Setter for <code>Account.npcs.leggings</code>.
*/
public void setLeggings(java.lang.String value) {
setValue(13, value);
setValue(12, value);
}
/**
* Getter for <code>Account.npcs.leggings</code>.
*/
public java.lang.String getLeggings() {
return (java.lang.String) getValue(13);
return (java.lang.String) getValue(12);
}
/**
* Setter for <code>Account.npcs.boots</code>.
*/
public void setBoots(java.lang.String value) {
setValue(14, value);
setValue(13, value);
}
/**
* Getter for <code>Account.npcs.boots</code>.
*/
public java.lang.String getBoots() {
return (java.lang.String) getValue(14);
return (java.lang.String) getValue(13);
}
/**
* Setter for <code>Account.npcs.inHand</code>.
*/
public void setInHand(java.lang.String value) {
setValue(15, value);
setValue(14, value);
}
/**
* Getter for <code>Account.npcs.inHand</code>.
*/
public java.lang.String getInHand() {
return (java.lang.String) getValue(15);
return (java.lang.String) getValue(14);
}
// -------------------------------------------------------------------------
@ -250,23 +236,23 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
}
// -------------------------------------------------------------------------
// Record16 type implementation
// Record15 type implementation
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row16<java.lang.Integer, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Double, java.lang.Double, java.lang.Double, java.lang.Integer, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String> fieldsRow() {
return (org.jooq.Row16) super.fieldsRow();
public org.jooq.Row15<java.lang.Integer, java.lang.String, java.lang.String, java.lang.String, java.lang.Double, java.lang.Double, java.lang.Double, java.lang.Integer, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String> fieldsRow() {
return (org.jooq.Row15) super.fieldsRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row16<java.lang.Integer, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.Double, java.lang.Double, java.lang.Double, java.lang.Integer, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String> valuesRow() {
return (org.jooq.Row16) super.valuesRow();
public org.jooq.Row15<java.lang.Integer, java.lang.String, java.lang.String, java.lang.String, java.lang.Double, java.lang.Double, java.lang.Double, java.lang.Integer, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String> valuesRow() {
return (org.jooq.Row15) super.valuesRow();
}
/**
@ -290,14 +276,6 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
*/
@Override
public org.jooq.Field<java.lang.String> field3() {
return mineplex.database.tables.Npcs.npcs.uuid;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field4() {
return mineplex.database.tables.Npcs.npcs.name;
}
@ -305,7 +283,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field5() {
public org.jooq.Field<java.lang.String> field4() {
return mineplex.database.tables.Npcs.npcs.world;
}
@ -313,7 +291,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Double> field6() {
public org.jooq.Field<java.lang.Double> field5() {
return mineplex.database.tables.Npcs.npcs.x;
}
@ -321,7 +299,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Double> field7() {
public org.jooq.Field<java.lang.Double> field6() {
return mineplex.database.tables.Npcs.npcs.y;
}
@ -329,7 +307,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Double> field8() {
public org.jooq.Field<java.lang.Double> field7() {
return mineplex.database.tables.Npcs.npcs.z;
}
@ -337,7 +315,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field9() {
public org.jooq.Field<java.lang.Integer> field8() {
return mineplex.database.tables.Npcs.npcs.radius;
}
@ -345,7 +323,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field10() {
public org.jooq.Field<java.lang.String> field9() {
return mineplex.database.tables.Npcs.npcs.entityType;
}
@ -353,7 +331,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Boolean> field11() {
public org.jooq.Field<java.lang.Boolean> field10() {
return mineplex.database.tables.Npcs.npcs.adult;
}
@ -361,7 +339,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field12() {
public org.jooq.Field<java.lang.String> field11() {
return mineplex.database.tables.Npcs.npcs.helmet;
}
@ -369,7 +347,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field13() {
public org.jooq.Field<java.lang.String> field12() {
return mineplex.database.tables.Npcs.npcs.chestplate;
}
@ -377,7 +355,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field14() {
public org.jooq.Field<java.lang.String> field13() {
return mineplex.database.tables.Npcs.npcs.leggings;
}
@ -385,7 +363,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field15() {
public org.jooq.Field<java.lang.String> field14() {
return mineplex.database.tables.Npcs.npcs.boots;
}
@ -393,7 +371,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field16() {
public org.jooq.Field<java.lang.String> field15() {
return mineplex.database.tables.Npcs.npcs.inHand;
}
@ -418,14 +396,6 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
*/
@Override
public java.lang.String value3() {
return getUuid();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.String value4() {
return getName();
}
@ -433,7 +403,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.String value5() {
public java.lang.String value4() {
return getWorld();
}
@ -441,7 +411,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.Double value6() {
public java.lang.Double value5() {
return getX();
}
@ -449,7 +419,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.Double value7() {
public java.lang.Double value6() {
return getY();
}
@ -457,7 +427,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.Double value8() {
public java.lang.Double value7() {
return getZ();
}
@ -465,7 +435,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.Integer value9() {
public java.lang.Integer value8() {
return getRadius();
}
@ -473,7 +443,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.String value10() {
public java.lang.String value9() {
return getEntityType();
}
@ -481,7 +451,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.Boolean value11() {
public java.lang.Boolean value10() {
return getAdult();
}
@ -489,7 +459,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.String value12() {
public java.lang.String value11() {
return getHelmet();
}
@ -497,7 +467,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.String value13() {
public java.lang.String value12() {
return getChestplate();
}
@ -505,7 +475,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.String value14() {
public java.lang.String value13() {
return getLeggings();
}
@ -513,7 +483,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.String value15() {
public java.lang.String value14() {
return getBoots();
}
@ -521,7 +491,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public java.lang.String value16() {
public java.lang.String value15() {
return getInHand();
}
@ -548,15 +518,6 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
*/
@Override
public NpcsRecord value3(java.lang.String value) {
setUuid(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public NpcsRecord value4(java.lang.String value) {
setName(value);
return this;
}
@ -565,7 +526,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value5(java.lang.String value) {
public NpcsRecord value4(java.lang.String value) {
setWorld(value);
return this;
}
@ -574,7 +535,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value6(java.lang.Double value) {
public NpcsRecord value5(java.lang.Double value) {
setX(value);
return this;
}
@ -583,7 +544,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value7(java.lang.Double value) {
public NpcsRecord value6(java.lang.Double value) {
setY(value);
return this;
}
@ -592,7 +553,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value8(java.lang.Double value) {
public NpcsRecord value7(java.lang.Double value) {
setZ(value);
return this;
}
@ -601,7 +562,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value9(java.lang.Integer value) {
public NpcsRecord value8(java.lang.Integer value) {
setRadius(value);
return this;
}
@ -610,7 +571,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value10(java.lang.String value) {
public NpcsRecord value9(java.lang.String value) {
setEntityType(value);
return this;
}
@ -619,7 +580,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value11(java.lang.Boolean value) {
public NpcsRecord value10(java.lang.Boolean value) {
setAdult(value);
return this;
}
@ -628,7 +589,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value12(java.lang.String value) {
public NpcsRecord value11(java.lang.String value) {
setHelmet(value);
return this;
}
@ -637,7 +598,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value13(java.lang.String value) {
public NpcsRecord value12(java.lang.String value) {
setChestplate(value);
return this;
}
@ -646,7 +607,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value14(java.lang.String value) {
public NpcsRecord value13(java.lang.String value) {
setLeggings(value);
return this;
}
@ -655,7 +616,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value15(java.lang.String value) {
public NpcsRecord value14(java.lang.String value) {
setBoots(value);
return this;
}
@ -664,7 +625,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord value16(java.lang.String value) {
public NpcsRecord value15(java.lang.String value) {
setInHand(value);
return this;
}
@ -673,7 +634,7 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
* {@inheritDoc}
*/
@Override
public NpcsRecord values(java.lang.Integer value1, java.lang.String value2, java.lang.String value3, java.lang.String value4, java.lang.String value5, java.lang.Double value6, java.lang.Double value7, java.lang.Double value8, java.lang.Integer value9, java.lang.String value10, java.lang.Boolean value11, java.lang.String value12, java.lang.String value13, java.lang.String value14, java.lang.String value15, java.lang.String value16) {
public NpcsRecord values(java.lang.Integer value1, java.lang.String value2, java.lang.String value3, java.lang.String value4, java.lang.Double value5, java.lang.Double value6, java.lang.Double value7, java.lang.Integer value8, java.lang.String value9, java.lang.Boolean value10, java.lang.String value11, java.lang.String value12, java.lang.String value13, java.lang.String value14, java.lang.String value15) {
return this;
}
@ -691,24 +652,23 @@ public class NpcsRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.datab
/**
* Create a detached, initialised NpcsRecord
*/
public NpcsRecord(java.lang.Integer id, java.lang.String server, java.lang.String uuid, java.lang.String name, java.lang.String world, java.lang.Double x, java.lang.Double y, java.lang.Double z, java.lang.Integer radius, java.lang.String entityType, java.lang.Boolean adult, java.lang.String helmet, java.lang.String chestplate, java.lang.String leggings, java.lang.String boots, java.lang.String inHand) {
public NpcsRecord(java.lang.Integer id, java.lang.String server, java.lang.String name, java.lang.String world, java.lang.Double x, java.lang.Double y, java.lang.Double z, java.lang.Integer radius, java.lang.String entityType, java.lang.Boolean adult, java.lang.String helmet, java.lang.String chestplate, java.lang.String leggings, java.lang.String boots, java.lang.String inHand) {
super(mineplex.database.tables.Npcs.npcs);
setValue(0, id);
setValue(1, server);
setValue(2, uuid);
setValue(3, name);
setValue(4, world);
setValue(5, x);
setValue(6, y);
setValue(7, z);
setValue(8, radius);
setValue(9, entityType);
setValue(10, adult);
setValue(11, helmet);
setValue(12, chestplate);
setValue(13, leggings);
setValue(14, boots);
setValue(15, inHand);
setValue(2, name);
setValue(3, world);
setValue(4, x);
setValue(5, y);
setValue(6, z);
setValue(7, radius);
setValue(8, entityType);
setValue(9, adult);
setValue(10, helmet);
setValue(11, chestplate);
setValue(12, leggings);
setValue(13, boots);
setValue(14, inHand);
}
}