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:
parent
ab54e56821
commit
f09901f0b5
4
pom.xml
4
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.maxgamer</groupId>
|
<groupId>org.maxgamer</groupId>
|
||||||
<artifactId>QuickShop</artifactId>
|
<artifactId>QuickShop</artifactId>
|
||||||
<version>1.6.2</version>
|
<version>1.6.3</version>
|
||||||
<description>快捷商店重置版本...</description>
|
<description>快捷商店重置版本...</description>
|
||||||
<build>
|
<build>
|
||||||
<finalName>${project.name}</finalName>
|
<finalName>${project.name}</finalName>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
</build>
|
</build>
|
||||||
<properties>
|
<properties>
|
||||||
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
|
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
|
||||||
<update.description>&c修复部分回收悬浮物的插件导致的刷物品 异步检测装备...</update.description>
|
<update.description>&a修改扫描流程 &c发现非法物品后扫描玩家背包...</update.description>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -95,7 +95,7 @@ public class ProtectListener implements Listener {
|
|||||||
try {
|
try {
|
||||||
if (MarkUtil.hasMark(ci)) {
|
if (MarkUtil.hasMark(ci)) {
|
||||||
inv.setItem(solt, new ItemStack(Material.AIR));
|
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();
|
p.closeInventory();
|
||||||
}
|
}
|
||||||
} catch (final Exception ex) {
|
} catch (final Exception ex) {
|
||||||
@ -114,7 +114,7 @@ public class ProtectListener implements Listener {
|
|||||||
final ItemStack itemStack = cis[i];
|
final ItemStack itemStack = cis[i];
|
||||||
if (MarkUtil.hasMark(itemStack)) {
|
if (MarkUtil.hasMark(itemStack)) {
|
||||||
cis[i] = new ItemStack(Material.AIR);
|
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);
|
inv.setArmorContents(cis);
|
||||||
@ -122,7 +122,7 @@ public class ProtectListener implements Listener {
|
|||||||
final ItemStack newItem = inv.getItem(newslot);
|
final ItemStack newItem = inv.getItem(newslot);
|
||||||
if (MarkUtil.hasMark(newItem)) {
|
if (MarkUtil.hasMark(newItem)) {
|
||||||
inv.setItem(newslot, new ItemStack(Material.AIR));
|
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);
|
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并扫描玩家背包...");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user