+ 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.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author sky
|
* @Author sky
|
||||||
@ -166,8 +167,9 @@ public class TellrawJson {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BaseComponent[] getComponentsAll() {
|
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);
|
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
|
@Deprecated
|
||||||
|
@ -55,8 +55,10 @@ public class ListenerPlayerCommand implements Listener {
|
|||||||
if (TabooLib.getVerint() > 10700) {
|
if (TabooLib.getVerint() > 10700) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
}
|
}
|
||||||
Bukkit.getScheduler().runTask(Main.getInst(), DataUtils::saveAllCaches);
|
Bukkit.getScheduler().runTask(Main.getInst(), () -> {
|
||||||
Bukkit.getScheduler().runTask(Main.getInst(), () -> PlayerDataManager.saveAllCaches(true, false));
|
DataUtils.saveAllCaches();
|
||||||
|
PlayerDataManager.saveAllCaches(true, false);
|
||||||
|
});
|
||||||
TLogger.getGlobalLogger().info("Successfully.");
|
TLogger.getGlobalLogger().info("Successfully.");
|
||||||
} else if (e.getCommand().equalsIgnoreCase("tDebug")) {
|
} else if (e.getCommand().equalsIgnoreCase("tDebug")) {
|
||||||
if (TabooLib.getVerint() > 10700) {
|
if (TabooLib.getVerint() > 10700) {
|
||||||
|
Loading…
Reference in New Issue
Block a user