mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-22 01:58:54 +00:00
change Aciton Mode...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
a0768cdf7a
commit
8b4e2c5ece
@ -162,10 +162,10 @@ public class PlayerListener implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onSuperItemClick(final PlayerInteractEvent e) {
|
||||
if (e.getAction() == Action.LEFT_CLICK_BLOCK || e.getMaterial() != plugin.getConfigManager().getSuperItem()) {
|
||||
final Player p = e.getPlayer();
|
||||
if (e.getAction() == Action.LEFT_CLICK_BLOCK || p.getGameMode() != GameMode.SURVIVAL || e.getMaterial() != plugin.getConfigManager().getSuperItem()) {
|
||||
return;
|
||||
}
|
||||
final Player p = e.getPlayer();
|
||||
final Block b = e.getClickedBlock();
|
||||
// If that wasn't a shop, search nearby shops
|
||||
if (b.getType() == Material.WALL_SIGN) {
|
||||
@ -173,11 +173,12 @@ public class PlayerListener implements Listener {
|
||||
final Shop shop = attached == null ? null : plugin.getShopManager().getShop(attached.getLocation());
|
||||
if (shop != null) {
|
||||
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||
if (p.hasPermission("quickshop.unlimited") && p.getGameMode() == GameMode.CREATIVE) {
|
||||
if (p.hasPermission("quickshop.unlimited")) {
|
||||
shop.setUnlimited(!shop.isUnlimited());
|
||||
p.sendMessage(MsgUtil.p("command.toggle-unlimited", (shop.isUnlimited() ? "无限模式" : "有限模式")));
|
||||
return;
|
||||
} else if (p.getGameMode() == GameMode.SURVIVAL) {
|
||||
}
|
||||
} else {
|
||||
if (shop.getShopType() == ShopType.BUYING && p.hasPermission("quickshop.create.sell")) {
|
||||
shop.setShopType(ShopType.SELLING);
|
||||
p.sendMessage(MsgUtil.p("command.now-selling", shop.getDataName()));
|
||||
@ -193,7 +194,6 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onTeleport(final PlayerTeleportEvent e) {
|
||||
|
Loading…
Reference in New Issue
Block a user