MassiveCore - Minor Editor Stuff
This commit is contained in:
parent
44d525446b
commit
ed15088ed5
@ -329,8 +329,6 @@ public class CommandEditAbstract<O, V> extends MassiveCommand
|
|||||||
// Others
|
// Others
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
message(Mson.prepondfix(
|
message(Mson.prepondfix(
|
||||||
title.add(mson(":").color(ChatColor.GRAY)),
|
title.add(mson(":").color(ChatColor.GRAY)),
|
||||||
show,
|
show,
|
||||||
|
@ -89,14 +89,29 @@ public class EditSettings<O>
|
|||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// USED COMMAND
|
// COMMAND CREATION
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public CommandEditUsed<O> createCommandEditUsed()
|
public CommandEditUsed<O> createCommandUsed()
|
||||||
{
|
{
|
||||||
return new CommandEditUsed<O>(this);
|
return new CommandEditUsed<O>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CommandEditShow<O, O> createCommandShow()
|
||||||
|
{
|
||||||
|
return new CommandEditShow<O, O>(this, new PropertyThis<>(this.getObjectType()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public CommandEditAbstract<O, O> createCommandEdit()
|
||||||
|
{
|
||||||
|
// TODO: Where does command creation belong? Inside the type or the edit settings.
|
||||||
|
// TODO: Resolve and research asymmetry between createCommandShow() and createCommandEdit().
|
||||||
|
// TODO: Where should the permission nodes and requirements be set?
|
||||||
|
CommandEditAbstract<O, O> ret = this.getObjectType().createEditCommand(this, new PropertyThis<>(this.getObjectType()));
|
||||||
|
ret.setAliases("edit");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
// TYPE READ UTILITY
|
// TYPE READ UTILITY
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
@ -150,8 +150,8 @@ public abstract class TypeAbstract<T> implements Type<T>
|
|||||||
public <I extends Property<T, ?>> I getInnerProperty(int index) { return (I) this.getInnerProperties().get(index); }
|
public <I extends Property<T, ?>> I getInnerProperty(int index) { return (I) this.getInnerProperties().get(index); }
|
||||||
|
|
||||||
public <I extends Property<T, ?>> void setInnerProperties(Collection<I> innerProperties) { this.innerProperties = new MassiveList<Property<T, ?>>(innerProperties); }
|
public <I extends Property<T, ?>> void setInnerProperties(Collection<I> innerProperties) { this.innerProperties = new MassiveList<Property<T, ?>>(innerProperties); }
|
||||||
@SuppressWarnings("unchecked")
|
@SafeVarargs
|
||||||
public <I extends Property<T, ?>> void setInnerProperties(I... innerProperties) { this.setInnerProperties(Arrays.asList(innerProperties)); }
|
public final <I extends Property<T, ?>> void setInnerProperties(I... innerProperties) { this.setInnerProperties(Arrays.asList(innerProperties)); }
|
||||||
public void setInnerProperties(Class<T> clazz) { this.setInnerProperties(PropertyReflection.getAll(clazz, this)); }
|
public void setInnerProperties(Class<T> clazz) { this.setInnerProperties(PropertyReflection.getAll(clazz, this)); }
|
||||||
|
|
||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
@ -652,7 +652,7 @@ public abstract class TypeAbstract<T> implements Type<T>
|
|||||||
{
|
{
|
||||||
if (this.hasInnerProperties())
|
if (this.hasInnerProperties())
|
||||||
{
|
{
|
||||||
return new CommandEditProperties<O, T>(settings, property, null);
|
return new CommandEditProperties<O, T>(settings, property, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user