mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-03 05:51:35 +01:00
Modify the target creation methods.
This commit is contained in:
parent
3203a81710
commit
34efb6e40e
@ -187,7 +187,8 @@ public static boolean isIntensiveEntity(Entity entity) {
|
|||||||
*/
|
*/
|
||||||
public static Target createTarget(Block block) {
|
public static Target createTarget(Block block) {
|
||||||
checkNotNull(block);
|
checkNotNull(block);
|
||||||
return new BlockTarget(BukkitAdapter.adapt(block.getBlockData()).getBlockType());
|
checkNotNull(block.getType());
|
||||||
|
return new BlockTarget(BukkitAdapter.asBlockType(block.getType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -198,7 +199,8 @@ public static Target createTarget(Block block) {
|
|||||||
*/
|
*/
|
||||||
public static Target createTarget(ItemStack item) {
|
public static Target createTarget(ItemStack item) {
|
||||||
checkNotNull(item);
|
checkNotNull(item);
|
||||||
return new ItemTarget(BukkitAdapter.adapt(item).getType());
|
checkNotNull(item.getType());
|
||||||
|
return new ItemTarget(BukkitAdapter.asItemType(item.getType()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user