Fixed chat channel MC scores

This commit is contained in:
Norbi Peti 2017-08-03 22:24:56 +02:00
parent 5e7da1e89a
commit 107a60eb2e
2 changed files with 2 additions and 5 deletions

View file

@ -133,7 +133,8 @@ public class ChatProcessing {
Objective obj = PluginMain.SB.getObjective(channel.ID);
int score = -1;
for (Player p : Bukkit.getOnlinePlayers())
obj.getScore(p.getName()).setScore(score = e.getMCScore(p));
obj.getScore(p.getName())
.setScore(p.getUniqueId().equals(player) ? score = e.getMCScore(p) : e.getMCScore(p));
PluginMain.Instance.getServer().dispatchCommand(PluginMain.Console, String.format(
"tellraw @a[score_%s=%d,score_%s_min=%d] %s", channel.ID, score, channel.ID, score, jsonstr));
} else

View file

@ -1,9 +1,5 @@
package buttondevteam.chat.formatting;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.function.BiFunction;
import java.util.regex.Pattern;