mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Ignore right clicks in the inventory to avoid spam from spreading blocks (._. )
This commit is contained in:
1 parent
b2e86c43c1
commit
d021d29ac2
2 files changed
+3
-2
No files matched your search
@@ -8,7 +8,7 @@
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>bukkit-repo</id>
|
||||
<url>http://repo.bukkit.org/content/repositories/snapshots</url>
|
||||
<url>http://repo.bukkit.org</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<build>
|
||||
|
||||
@@ -32,10 +32,11 @@ public class InventoryListener extends EventListener {
|
||||
|
||||
@EventHandler
|
||||
public void onInventoryClick(InventoryClickEvent event) {
|
||||
if (event.getWhoClicked() instanceof Player) {
|
||||
if (!event.isRightClick() && event.getWhoClicked() instanceof Player) {
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
if (getCheckManager().willCheck(player, CheckType.FAST_INVENTORY)) {
|
||||
CheckResult result = getBackend().checkInventoryClicks(player);
|
||||
System.out.println("Result :"+result.getResult());
|
||||
if (result.failed()) {
|
||||
if (!silentMode()) {
|
||||
getUserManager().getUser(player.getName()).restore(event.getInventory());
|
||||
|
||||
Reference in new issue
Block a user