Added actuall mixin
This commit is contained in:
parent
8dbb8f793d
commit
9fe7a9c489
11
src/com/massivecraft/mcore/mixin/ActuallMixin.java
Normal file
11
src/com/massivecraft/mcore/mixin/ActuallMixin.java
Normal file
@ -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);
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.massivecraft.mcore.mixin;
|
||||
|
||||
public abstract class ActuallMixinAbstract implements ActuallMixin
|
||||
{
|
||||
|
||||
}
|
32
src/com/massivecraft/mcore/mixin/ActuallMixinDefault.java
Normal file
32
src/com/massivecraft/mcore/mixin/ActuallMixinDefault.java
Normal file
@ -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;
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user