mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-11-14 00:38:56 +00:00
feat: 修复一个在删除商店时导致的报错
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
665d6d77d1
commit
b10c601ce7
4
pom.xml
4
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.maxgamer</groupId>
|
||||
<artifactId>QuickShop</artifactId>
|
||||
<version>1.9.1</version>
|
||||
<version>1.9.2</version>
|
||||
<description>快捷商店重置版本...</description>
|
||||
<build>
|
||||
<finalName>${project.name}</finalName>
|
||||
@ -60,9 +60,9 @@
|
||||
<env.GIT_COMMIT>DEBUG</env.GIT_COMMIT>
|
||||
<update.description>&a全新版本 &c虚拟悬浮物(橙子提供 对 就是那个汉化COI的逗比)&e7老板修复逗比BUG...</update.description>
|
||||
<update.changes>
|
||||
&b1.9.2 - &c修复一个在删除商店时导致的报错...;
|
||||
&b1.9.1 - &c修复同一个玩家的商店直接漏洞不能传递的问题...;
|
||||
&b1.9.0 - &c修复1.9开始以后不允许异步更新木牌的问题...;
|
||||
&b1.8.9 - &c修复虚拟物品产生的异常...;
|
||||
</update.changes>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
@ -43,7 +43,7 @@ public class PlayerListener implements Listener {
|
||||
public void onClick(final PlayerInteractEvent e) {
|
||||
final Block b = e.getClickedBlock();
|
||||
final Player p = e.getPlayer();
|
||||
if (e.getAction() != Action.LEFT_CLICK_BLOCK || (e.getMaterial() == plugin.getConfigManager().getSuperItem() && b.getType() == Material.WALL_SIGN)) {
|
||||
if (e.getAction() != Action.LEFT_CLICK_BLOCK || (e.getMaterial() == plugin.getConfigManager().getSuperItem() && (b.getType() == Material.WALL_SIGN || p.getGameMode() == GameMode.CREATIVE))) {
|
||||
return;
|
||||
}
|
||||
final Location loc = b.getLocation();
|
||||
@ -74,12 +74,7 @@ public class PlayerListener implements Listener {
|
||||
return;
|
||||
}
|
||||
// Handles creating shops
|
||||
else if (shop == null
|
||||
&& item != null
|
||||
&& item.getType() != Material.AIR
|
||||
&& p.hasPermission("quickshop.create.sell")
|
||||
&& Util.canBeShop(b)
|
||||
&& p.getGameMode() != GameMode.CREATIVE
|
||||
else if (shop == null && item != null && item.getType() != Material.AIR && p.hasPermission("quickshop.create.sell") && Util.canBeShop(b) && p.getGameMode() != GameMode.CREATIVE
|
||||
&& (plugin.getConfigManager().isSneakCreate() == p.isSneaking())) {
|
||||
if (!plugin.getShopManager().canBuildShop(p, b, e.getBlockFace())) {
|
||||
// As of the new checking system, most plugins will tell the
|
||||
@ -169,6 +164,7 @@ public class PlayerListener implements Listener {
|
||||
final Block attached = Util.getAttached(b);
|
||||
final Shop shop = attached == null ? null : plugin.getShopManager().getShop(attached.getLocation());
|
||||
if (shop != null) {
|
||||
e.setCancelled(true);
|
||||
final Location loc = shop.getLocation();
|
||||
String shopmode = "";
|
||||
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||
|
Loading…
Reference in New Issue
Block a user