Small database changes

This commit is contained in:
Magnus Ulf 2019-01-27 16:42:09 +01:00
parent c7ba58b9ab
commit dd3724e663
3 changed files with 16 additions and 13 deletions

View File

@ -1295,6 +1295,11 @@ public class MassiveCommand implements Active, PluginIdentifiableCommand
return ret; return ret;
} }
public Mson getTemplateWithArgs(CommandSender sender, String... args)
{
return this.getTemplateWithArgs(sender, MUtil.list(args));
}
public Mson getTemplateWithArgs(CommandSender sender, List<String> args) public Mson getTemplateWithArgs(CommandSender sender, List<String> args)
{ {
Mson ret = this.getTemplateChain(true, sender); Mson ret = this.getTemplateChain(true, sender);

View File

@ -48,8 +48,6 @@ public class Entity<E extends Entity<E>> extends EntityInternal<E>
this.lastStackTraceChanged = null; this.lastStackTraceChanged = null;
} }
// -------------------------------------------- // // -------------------------------------------- //
// ATTACH AND DETACH // ATTACH AND DETACH
// -------------------------------------------- // // -------------------------------------------- //
@ -61,15 +59,6 @@ public class Entity<E extends Entity<E>> extends EntityInternal<E>
return container.attach((E) this); return container.attach((E) this);
} }
@SuppressWarnings("unchecked")
public E detach()
{
EntityContainer<E> coll = this.getContainer();
if (coll == null) return (E)this;
return coll.detachEntity((E) this);
}
// -------------------------------------------- // // -------------------------------------------- //
// SYNC AND IO ACTIONS // SYNC AND IO ACTIONS
// -------------------------------------------- // // -------------------------------------------- //

View File

@ -74,6 +74,15 @@ public class EntityInternal<E extends EntityInternal<E>> implements Identified
} }
@SuppressWarnings("unchecked")
public E detach()
{
EntityContainer<E> coll = this.getContainer();
if (coll == null) return (E)this;
return coll.detachEntity((E) this);
}
// -------------------------------------------- // // -------------------------------------------- //
// SYNC AND IO ACTIONS // SYNC AND IO ACTIONS
// -------------------------------------------- // // -------------------------------------------- //