版本更新至:3.76
调整:开发框架改为 Gradle 新增:Language2 工具新增 [book] 类型
This commit is contained in:
27
src/main/java/me/skymc/taboolib/player/TargetUtils.java
Normal file
27
src/main/java/me/skymc/taboolib/player/TargetUtils.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package me.skymc.taboolib.player;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.util.BlockIterator;
|
||||
|
||||
|
||||
@Deprecated
|
||||
public class TargetUtils {
|
||||
|
||||
public static LinkedList<Block> getTarget(LivingEntity p, int max) {
|
||||
BlockIterator itor = new BlockIterator(p);
|
||||
LinkedList<Block> block = new LinkedList<>();
|
||||
while(itor.hasNext())
|
||||
{
|
||||
max++;
|
||||
block.add(itor.next());
|
||||
if (max >= 100)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return block;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user