Added Registerable interface.

This commit is contained in:
Olof Larsson 2014-10-02 11:45:27 +02:00
parent 45009a7f59
commit 8b45d2b71e
3 changed files with 29 additions and 1 deletions

View File

@ -11,7 +11,7 @@
</properties>
<build>
<defaultGoal>clean install</defaultGoal>
<defaultGoal>install</defaultGoal>
<finalName>MassiveCore</finalName>
<sourceDirectory>${basedir}/src/main/java/</sourceDirectory>
<resources>

View File

@ -0,0 +1,22 @@
package com.massivecraft.massivecore;
public class PredictateIsRegistered implements Predictate<Registerable>
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static PredictateIsRegistered i = new PredictateIsRegistered();
public static PredictateIsRegistered get() { return i; }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public boolean apply(Registerable registerable)
{
return registerable.isRegistered();
}
}

View File

@ -0,0 +1,6 @@
package com.massivecraft.massivecore;
public interface Registerable
{
public boolean isRegistered();
}