diff --git a/src/com/massivecraft/mcore/mixin/MessageMixinDefault.java b/src/com/massivecraft/mcore/mixin/MessageMixinDefault.java index cc9c9a41..99af186f 100644 --- a/src/com/massivecraft/mcore/mixin/MessageMixinDefault.java +++ b/src/com/massivecraft/mcore/mixin/MessageMixinDefault.java @@ -49,10 +49,7 @@ public class MessageMixinDefault extends MessageMixinAbstract { if (sendee == null) return false; if (messages == null) return false; - for (String message : messages) - { - sendee.sendMessage(message); - } + sendee.sendMessage(messages.toArray(new String[0])); return true; } diff --git a/src/com/massivecraft/mcore/store/SenderIdSourceMixinOnlinePlayerIds.java b/src/com/massivecraft/mcore/store/SenderIdSourceMixinOnlinePlayerIds.java new file mode 100644 index 00000000..aa2af0ac --- /dev/null +++ b/src/com/massivecraft/mcore/store/SenderIdSourceMixinOnlinePlayerIds.java @@ -0,0 +1,30 @@ +package com.massivecraft.mcore.store; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.massivecraft.mcore.mixin.Mixin; + +public class SenderIdSourceMixinOnlinePlayerIds implements SenderIdSource +{ + // -------------------------------------------- // + // INSTANCE & CONSTRUCT + // -------------------------------------------- // + + private static SenderIdSourceMixinOnlinePlayerIds i = new SenderIdSourceMixinOnlinePlayerIds(); + public static SenderIdSourceMixinOnlinePlayerIds get() { return i; } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + + @Override + public Collection> getSenderIdCollections() + { + List> ret = new ArrayList>(); + ret.add(Mixin.getOnlinePlayerIds()); + return ret; + } + +} diff --git a/src/com/massivecraft/mcore/store/SenderIdSourceMixinOnlineSenderIds.java b/src/com/massivecraft/mcore/store/SenderIdSourceMixinOnlineSenderIds.java new file mode 100644 index 00000000..613a81a1 --- /dev/null +++ b/src/com/massivecraft/mcore/store/SenderIdSourceMixinOnlineSenderIds.java @@ -0,0 +1,30 @@ +package com.massivecraft.mcore.store; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.massivecraft.mcore.mixin.Mixin; + +public class SenderIdSourceMixinOnlineSenderIds implements SenderIdSource +{ + // -------------------------------------------- // + // INSTANCE & CONSTRUCT + // -------------------------------------------- // + + private static SenderIdSourceMixinOnlineSenderIds i = new SenderIdSourceMixinOnlineSenderIds(); + public static SenderIdSourceMixinOnlineSenderIds get() { return i; } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + + @Override + public Collection> getSenderIdCollections() + { + List> ret = new ArrayList>(); + ret.add(Mixin.getOnlineSenderIds()); + return ret; + } + +}