1434967947
如题,表示本人无法早jd.bukkit.org找到LORE相关的内容
求大神告诉如何操作LORE

t9044
http://mineplugin.org/Bukkit/%E6 ... 1.E6.95.B0.E6.8D.AE
自行参考吧

q549365815
lore就是list嘛

所以你需要遍历循环

遍历lore的:
  1. for(int x;x<lore.Size();x++)
  2.   System.out.print(lores.get(x));
复制代码


还有一个是检测lore里面是否有符号的字符串

  1. for(String s:lore)
  2. {
  3.    if(s.contains("lore"))
  4.       {
  5.        }
  6. }
复制代码


当然这是一个小的方法  想看大触写的 就多反编译 看看源码

1434967947
q549365815 发表于 2016-1-20 00:52
lore就是list嘛

所以你需要遍历循环

thx。原来这么简单

Bryan33
https://coding.net/u/Bryan_lzh/p ... c/Br/API/Lores.java
自用的一个Lore操作API
有兴趣的可以研究一下

reginalcazar
t9044 发表于 2016-1-19 22:39
http://mineplugin.org/Bukkit/%E6%8F%92%E4%BB%B6%E5%BC%80%E5%8F%91%E6%95%99%E7%A8%8B#.E7.89.A9.E5.93. ...

差评!
人家是想询问如何设置和修改lore 你就搬出如何开发和构建环境来!

弱鸡绿毛怪
//设置lore
ItemStack item = new ItemMeta(Material.STONE);
ItemMeta itemmeta = item.getItemMeta();
List<String> lore  = new ArrayList<>();
lore.add("233");
itemmeta.setLore(lore);
item.setItemMeta(itemmeta);
//读取lore
if(item.getItemMeta().hasLore()){//判断一下,不然有可能报空指针
for(String line:item.getItemMeta().getLore()){
System.out.println(line);
}
}

第一页 上一页 下一页 最后一页