new senderId sources and minor message mixin fix.
This commit is contained in:
parent
8e071f2f6f
commit
65f84c25fe
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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<Collection<String>> getSenderIdCollections()
|
||||
{
|
||||
List<Collection<String>> ret = new ArrayList<Collection<String>>();
|
||||
ret.add(Mixin.getOnlinePlayerIds());
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
@ -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<Collection<String>> getSenderIdCollections()
|
||||
{
|
||||
List<Collection<String>> ret = new ArrayList<Collection<String>>();
|
||||
ret.add(Mixin.getOnlineSenderIds());
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user