1
0
mirror of https://e.coding.net/circlecloud/QuickShop.git synced 2024-12-27 07:48:48 +00:00

修复PlayerInteractEvent错误参数导致GuiShopManager的报错...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2016-01-20 20:54:26 +08:00
parent 764f8a8446
commit 9669c6cc8e
3 changed files with 12 additions and 7 deletions

View File

@ -54,8 +54,9 @@
</build>
<properties>
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
<env.BUILD_NUMBER>DEBUG</env.BUILD_NUMBER>
<env.GIT_COMMIT>DEBUG</env.GIT_COMMIT>
<update.description>&amp;a全新版本 &amp;c虚拟悬浮物(橙子提供 对 就是那个汉化COI的逗比) &amp;e7老板修复逗比BUG...</update.description>
<update.changes>&amp;c修复PlayerInteractEvent错误参数导致GuiShopManager的报错...</update.changes>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>

View File

@ -59,11 +59,15 @@ public class ShopManager {
return false;
}
}
final PlayerInteractEvent pie = new PlayerInteractEvent(p, Action.RIGHT_CLICK_BLOCK, new ItemStack(Material.AIR), b, bf); // PIE = PlayerInteractEvent - What else?
Bukkit.getPluginManager().callEvent(pie);
pie.getPlayer().closeInventory(); // If the player has chat open, this will close their chat.
if (pie.isCancelled()) {
return false;
/* 修复其他插件调用产生的报错... */
try {
final PlayerInteractEvent pie = new PlayerInteractEvent(p, Action.RIGHT_CLICK_BLOCK, new ItemStack(Material.AIR), b, bf); // PIE = PlayerInteractEvent - What else?
Bukkit.getPluginManager().callEvent(pie);
pie.getPlayer().closeInventory(); // If the player has chat open, this will close their chat.
if (pie.isCancelled()) {
return false;
}
} catch (final Exception e) {
}
final ShopPreCreateEvent spce = new ShopPreCreateEvent(p, b.getLocation());
Bukkit.getPluginManager().callEvent(spce);

View File

@ -1,7 +1,7 @@
name: ${project.artifactId}
description: ${project.description}
main: ${project.groupId}.${project.artifactId}.${project.artifactId}
version: ${project.version}-Build#${env.BUILD_NUMBER}
version: ${project.version}-git-${env.GIT_COMMIT}
authors:
- Netherfoam
- Timtower