org.spongepowered.api.text.Text.toString()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.spongepowered.api.text.Text.toString()方法的一些代码示例,展示了Text.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.toString()方法的具体详情如下:
包路径:org.spongepowered.api.text.Text
类名称:Text
方法名:toString

Text.toString介绍

暂无

代码示例

代码示例来源:origin: SpongePowered/SpongeAPI

@Override
public int compareTo(Property<?, ?> other) {
  if (other == null) {
    return 1;
  }
  return this.getValue().toString().compareTo(Coerce.toString(other.getValue()));
}

代码示例来源:origin: org.spongepowered/spongeapi

@Override
public int compareTo(Property<?, ?> other) {
  if (other == null) {
    return 1;
  }
  return this.getValue().toString().compareTo(Coerce.toString(other.getValue()));
}

代码示例来源:origin: IntellectualSites/PlotSquared

@Override
public String[] getSign(Location location) {
  World world = SpongeUtil.getWorld(location.getWorld());
  Optional<TileEntity> block = world.getTileEntity(location.getX(), location.getY(), location.getZ());
  if (!block.isPresent()) {
    return null;
  }
  TileEntity tile = block.get();
  if (!(tile instanceof Sign)) {
    return null;
  }
  Sign sign = (Sign) tile;
  Optional<SignData> optional = sign.get(SignData.class);
  if (!optional.isPresent()) {
    return null;
  }
  String[] result = new String[4];
  ListValue<Text> lines = optional.get().lines();
  for (int i = 0; i < 4; i++) {
    result[i] = lines.get(i).toString();
  }
  return result;
}

代码示例来源:origin: com.greatmancode/tools

@Subscribe
  public void onPlayerJoinEvent(PlayerJoinEvent event) {
    com.greatmancode.tools.events.playerEvent.PlayerJoinEvent pEvent = new com.greatmancode.tools.events.playerEvent.PlayerJoinEvent(new Player(event.getUser().getName(), event.getUser().getDisplayNameData().getDisplayName().toString(), event.getUser().getWorld().getName(), null));
    EventManager.getInstance().callEvent(pEvent);
  }
}

相关文章