1
0
mirror of https://e.coding.net/circlecloud/QuickShop.git synced 2024-11-22 01:58:54 +00:00

修改扫描流程 发现非法物品后扫描玩家背包...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-12-06 16:33:24 +08:00
parent ab54e56821
commit f09901f0b5
2 changed files with 10 additions and 5 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.maxgamer</groupId>
<artifactId>QuickShop</artifactId>
<version>1.6.2</version>
<version>1.6.3</version>
<description>快捷商店重置版本...</description>
<build>
<finalName>${project.name}</finalName>
@ -54,7 +54,7 @@
</build>
<properties>
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
<update.description>&amp;c修复部分回收悬浮物的插件导致的刷物品 异步检测装备...</update.description>
<update.description>&amp;a修改扫描流程 &amp;c发现非法物品后扫描玩家背包...</update.description>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>

View File

@ -95,7 +95,7 @@ public class ProtectListener implements Listener {
try {
if (MarkUtil.hasMark(ci)) {
inv.setItem(solt, new ItemStack(Material.AIR));
Bukkit.broadcastMessage("§6[§b快捷商店§6] §4警告 " + p.getDisplayName() + " §c非法 §d§l获取 " + ci.getItemMeta().getDisplayName() + " §a已清理...");
sendWarning(p, ci, "§d§l获取");
p.closeInventory();
}
} catch (final Exception ex) {
@ -114,7 +114,7 @@ public class ProtectListener implements Listener {
final ItemStack itemStack = cis[i];
if (MarkUtil.hasMark(itemStack)) {
cis[i] = new ItemStack(Material.AIR);
Bukkit.broadcastMessage("§6[§b快捷商店§6] §4警告 " + p.getDisplayName() + " §c非法 §e§l穿戴 " + itemStack.getItemMeta().getDisplayName() + " §a已清理...");
sendWarning(p, itemStack, "§e§l穿戴");
}
}
inv.setArmorContents(cis);
@ -122,7 +122,7 @@ public class ProtectListener implements Listener {
final ItemStack newItem = inv.getItem(newslot);
if (MarkUtil.hasMark(newItem)) {
inv.setItem(newslot, new ItemStack(Material.AIR));
Bukkit.broadcastMessage("§6[§b快捷商店§6] §4警告 " + p.getDisplayName() + " §c非法 §e§l使用 " + newItem.getItemMeta().getDisplayName() + " §a已清理...");
sendWarning(p, newItem, "§3§l使用");
}
}
});
@ -135,4 +135,9 @@ public class ProtectListener implements Listener {
e.setCancelled(true);
}
}
private void sendWarning(final Player p, final ItemStack ci, final String action) {
Bukkit.broadcastMessage(plugin.getConfigManager().getGuiTitle() + " §4警告 " + p.getDisplayName() + " §c非法 " + action + " " + ci.getItemMeta().getDisplayName());
Bukkit.broadcastMessage(plugin.getConfigManager().getGuiTitle() + " §d保护系统 §d已清理 §c非法获取的物品 §a并扫描玩家背包...");
}
}