+ fixed tellrawJson
This commit is contained in:
parent
a6b4246bd3
commit
4b1cbd6349
@ -17,6 +17,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author sky
|
||||
@ -166,8 +167,9 @@ public class TellrawJson {
|
||||
}
|
||||
|
||||
public BaseComponent[] getComponentsAll() {
|
||||
List<BaseComponent> components = this.components.stream().filter(component -> !(component instanceof TextComponent) || !((TextComponent) component).getText().isEmpty()).collect(Collectors.toList());
|
||||
this.componentsLatest.stream().filter(component -> !(component instanceof TextComponent) || !((TextComponent) component).getText().isEmpty()).forEach(components::add);
|
||||
return this.components.stream().filter(component -> !(component instanceof TextComponent) || !((TextComponent) component).getText().isEmpty()).toArray(BaseComponent[]::new);
|
||||
return components.toArray(new BaseComponent[0]);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
|
@ -55,8 +55,10 @@ public class ListenerPlayerCommand implements Listener {
|
||||
if (TabooLib.getVerint() > 10700) {
|
||||
e.setCancelled(true);
|
||||
}
|
||||
Bukkit.getScheduler().runTask(Main.getInst(), DataUtils::saveAllCaches);
|
||||
Bukkit.getScheduler().runTask(Main.getInst(), () -> PlayerDataManager.saveAllCaches(true, false));
|
||||
Bukkit.getScheduler().runTask(Main.getInst(), () -> {
|
||||
DataUtils.saveAllCaches();
|
||||
PlayerDataManager.saveAllCaches(true, false);
|
||||
});
|
||||
TLogger.getGlobalLogger().info("Successfully.");
|
||||
} else if (e.getCommand().equalsIgnoreCase("tDebug")) {
|
||||
if (TabooLib.getVerint() > 10700) {
|
||||
|
Loading…
Reference in New Issue
Block a user