Skip to content

Commit

Permalink
#640 Use command sender's target block, not the bedrock player's
Browse files Browse the repository at this point in the history
  • Loading branch information
eccentricdevotion committed Jun 1, 2022
1 parent 3a801e4 commit 31acf61
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public TARDISCreateCommand(TARDIS plugin) {
}

public boolean buildTARDIS(CommandSender sender, String[] args) {
if (sender instanceof Player) {
if (sender instanceof Player admin) {
// tadmin create eccentric_nz budget ORANGE_WOOL LIGHT_GRAY_WOOL
if (args.length < 3) {
return false;
Expand Down Expand Up @@ -71,7 +71,7 @@ public boolean buildTARDIS(CommandSender sender, String[] args) {
}
}
// get target location
Location target = player.getTargetBlock(plugin.getGeneralKeeper().getTransparent(), 16).getRelative(BlockFace.UP).getLocation();
Location target = admin.getTargetBlock(plugin.getGeneralKeeper().getTransparent(), 16).getRelative(BlockFace.UP).getLocation();
TARDISBuildData data = new TARDISBuildData();
data.setSchematic(schematic);
data.setWallType(wallMaterial);
Expand Down

0 comments on commit 31acf61

Please sign in to comment.