Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

Commit

Permalink
Clarify message
Browse files Browse the repository at this point in the history
Former-commit-id: b37b3be
  • Loading branch information
sandtechnology committed Mar 7, 2020
1 parent ea59893 commit 19a5af6
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 243 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,17 @@ public void onCommand(
final Block b = bIt.next();
final Shop shop = plugin.getShopManager().getShop(b.getLocation());

if (shop != null && shop.getModerator().isModerator(((Player) sender).getUniqueId())) {
shop.setShopType(ShopType.BUYING);
// shop.setSignText();
shop.update();
sender.sendMessage(
MsgUtil.getMessage(
"command.now-buying", sender, Util.getItemStackName(shop.getItem())));
return;
if (shop != null) {
if (shop.getModerator().isModerator(((Player) sender).getUniqueId())) {
shop.setShopType(ShopType.BUYING);
// shop.setSignText();
shop.update();
sender.sendMessage(MsgUtil.getMessage("command.now-buying", sender, Util.getItemStackName(shop.getItem())));
return;
} else {
MsgUtil.getMessage("not-managed-shop", sender);
return;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ public void onPlace(BlockPlaceEvent e) {
Block chest = null;
//Chest combine mechanic based checking
if (player.isSneaking()) {
Block blockAgainst=e.getBlockAgainst();
if (blockAgainst.getType() == Material.CHEST &&placingBlock.getFace(blockAgainst)!=BlockFace.UP&&placingBlock.getFace(blockAgainst)!=BlockFace.DOWN&&!(((Chest)blockAgainst.getState()).getInventory() instanceof DoubleChestInventory)) {
Block blockAgainst = e.getBlockAgainst();
if (blockAgainst.getType() == Material.CHEST && placingBlock.getFace(blockAgainst) != BlockFace.UP && placingBlock.getFace(blockAgainst) != BlockFace.DOWN && !(((Chest) blockAgainst.getState()).getInventory() instanceof DoubleChestInventory)) {
chest = e.getBlockAgainst();
} else {
return;
Expand Down Expand Up @@ -244,9 +244,10 @@ public void onPlace(BlockPlaceEvent e) {
if (!QuickShop.getPermissionManager().hasPermission(player, "quickshop.create.double")) {
e.setCancelled(true);
player.sendMessage(MsgUtil.getMessage("no-double-chests", player));
} else if (!shop.getOwner().equals(player.getUniqueId())) {

} else if (!shop.getModerator().isModerator(player.getUniqueId())) {
e.setCancelled(true);
player.sendMessage(MsgUtil.getMessage("that-is-locked", player));
player.sendMessage(MsgUtil.getMessage("not-managed-shop", player));
}
}
}
Expand Down
Loading

0 comments on commit 19a5af6

Please sign in to comment.