mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-01-05 23:08:23 +00:00
NULL item is when we click on stuff like doors.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1053 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
fb80869961
commit
65312004df
1 changed files with 9 additions and 8 deletions
|
@ -44,11 +44,12 @@ public class EssentialsProtectPlayerListener extends PlayerListener
|
|||
return;
|
||||
}
|
||||
|
||||
if (EssentialsProtect.checkProtectionItems(EssentialsProtect.usageList, item.getTypeId()) && !user.isAuthorized("essentials.protect.exemptusage"))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (item != null && EssentialsProtect.checkProtectionItems(EssentialsProtect.usageList, item.getTypeId()) && !user.isAuthorized("essentials.protect.exemptusage"))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (user.isAuthorized("essentials.protect.admin"))
|
||||
{
|
||||
|
@ -60,12 +61,12 @@ public class EssentialsProtectPlayerListener extends PlayerListener
|
|||
+ ownerName);
|
||||
}
|
||||
}
|
||||
if (EssentialsProtect.onUseAlert.contains(String.valueOf(item.getTypeId())))
|
||||
if (item != null && EssentialsProtect.onUseAlert.contains(String.valueOf(item.getTypeId())))
|
||||
{
|
||||
parent.alert(user, item.getType().toString(), "used: ");
|
||||
}
|
||||
|
||||
if (item.getTypeId() == 323)
|
||||
if (item != null && item.getTypeId() == 323)
|
||||
{
|
||||
if (EssentialsProtect.genSettings.get("protect.protect.signs"))
|
||||
{
|
||||
|
@ -88,6 +89,6 @@ public class EssentialsProtectPlayerListener extends PlayerListener
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue