我准备做一个枪战服务器 想做一个 物资刷新系统 想法是半砖改贴图 改成刷新物品的方块 然后右键 这个半砖方块消失并在半砖位置生成一个物品
现在获取了方块但是不知道怎么生成物品
现在获取了方块但是不知道怎么生成物品
PlayerInteractEvent event
if(event.hasBlock())
{
Location location=event.getClickedBlock().getLocation();
event.getClickedBlock().setType(Material.AIR);
location.getWorld().dropItem(location,new ItemStack(Material.DIAMOND));
}
if(event.hasBlock())
{
Location location=event.getClickedBlock().getLocation();
event.getClickedBlock().setType(Material.AIR);
location.getWorld().dropItem(location,new ItemStack(Material.DIAMOND));
}
810587921 发表于 2017-4-25 17:43
PlayerInteractEvent event
if(event.hasBlock())
{
很棒棒哦 谢谢了