Permalink
Browse files

Modify the target creation methods.

  • Loading branch information...
me4502 committed Aug 6, 2018
1 parent 3203a81 commit 34efb6e40e2ea07a5f92b58f37da5c6e4d867644
Showing with 4 additions and 2 deletions.
  1. +4 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/BukkitUtil.java
@@ -187,7 +187,8 @@ public static boolean isIntensiveEntity(Entity entity) {
*/
public static Target createTarget(Block 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) {
checkNotNull(item);
return new ItemTarget(BukkitAdapter.adapt(item).getType());
checkNotNull(item.getType());
return new ItemTarget(BukkitAdapter.asItemType(item.getType()));
}
/**

0 comments on commit 34efb6e

Please sign in to comment.