diff --git a/src/com/massivecraft/mcore/mixin/ActuallMixin.java b/src/com/massivecraft/mcore/mixin/ActuallMixin.java new file mode 100644 index 00000000..7434d033 --- /dev/null +++ b/src/com/massivecraft/mcore/mixin/ActuallMixin.java @@ -0,0 +1,11 @@ +package com.massivecraft.mcore.mixin; + +import org.bukkit.event.player.PlayerJoinEvent; + +import com.massivecraft.mcore.event.MCorePlayerLeaveEvent; + +public interface ActuallMixin +{ + public boolean isActuallJoin(PlayerJoinEvent event); + public boolean isActuallLeave(MCorePlayerLeaveEvent event); +} diff --git a/src/com/massivecraft/mcore/mixin/ActuallMixinAbstract.java b/src/com/massivecraft/mcore/mixin/ActuallMixinAbstract.java new file mode 100644 index 00000000..98c20ced --- /dev/null +++ b/src/com/massivecraft/mcore/mixin/ActuallMixinAbstract.java @@ -0,0 +1,6 @@ +package com.massivecraft.mcore.mixin; + +public abstract class ActuallMixinAbstract implements ActuallMixin +{ + +} diff --git a/src/com/massivecraft/mcore/mixin/ActuallMixinDefault.java b/src/com/massivecraft/mcore/mixin/ActuallMixinDefault.java new file mode 100644 index 00000000..84f7702b --- /dev/null +++ b/src/com/massivecraft/mcore/mixin/ActuallMixinDefault.java @@ -0,0 +1,32 @@ +package com.massivecraft.mcore.mixin; + +import org.bukkit.event.player.PlayerJoinEvent; + +import com.massivecraft.mcore.event.MCorePlayerLeaveEvent; + +public class ActuallMixinDefault extends ActuallMixinAbstract +{ + // -------------------------------------------- // + // INSTANCE & CONSTRUCT + // -------------------------------------------- // + + private static ActuallMixinDefault i = new ActuallMixinDefault(); + public static ActuallMixinDefault get() { return i; } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + + @Override + public boolean isActuallJoin(PlayerJoinEvent event) + { + return true; + } + + @Override + public boolean isActuallLeave(MCorePlayerLeaveEvent event) + { + return true; + } + +} \ No newline at end of file diff --git a/src/com/massivecraft/mcore/mixin/Mixin.java b/src/com/massivecraft/mcore/mixin/Mixin.java index bf8534e7..1bc6291e 100644 --- a/src/com/massivecraft/mcore/mixin/Mixin.java +++ b/src/com/massivecraft/mcore/mixin/Mixin.java @@ -7,10 +7,12 @@ import java.util.Set; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.permissions.Permissible; import com.massivecraft.mcore.PS; import com.massivecraft.mcore.Predictate; +import com.massivecraft.mcore.event.MCorePlayerLeaveEvent; public class Mixin { @@ -58,6 +60,10 @@ public class Mixin public static KickMixin getKickMixin() { return kickMixin; } public static void setKickMixin(KickMixin val) { kickMixin = val; } + private static ActuallMixin actuallMixin = ActuallMixinDefault.get(); + public static ActuallMixin getActuallMixin() { return actuallMixin; } + public static void setActuallMixin(ActuallMixin val) { actuallMixin = val; } + // -------------------------------------------- // // STATIC EXPOSE: WORLD // -------------------------------------------- // @@ -456,4 +462,18 @@ public class Mixin return getKickMixin().kick(senderId, message); } + // -------------------------------------------- // + // STATIC EXPOSE: ACTUALL + // -------------------------------------------- // + + public static boolean isActuallJoin(PlayerJoinEvent event) + { + return getActuallMixin().isActuallJoin(event); + } + + public static boolean isActuallLeave(MCorePlayerLeaveEvent event) + { + return getActuallMixin().isActuallLeave(event); + } + }