generalize 3rd party plugins' event check

This commit is contained in:
mfnalex
2020-07-16 04:27:08 +02:00
parent 331fae8c0e
commit d06fb2515d

View File

@@ -55,8 +55,8 @@ public class PlayerListener implements Listener {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerInteract(PlayerInteractEvent event) {
// Do not cancel the event if it is the InvUnloadCheckAccessEvent
if(!event.getClass().getName().equals("de.jeff_media.InvUnload.API.InvUnloadCheckAccessEvent")) {
// Do not cancel 3rd party plugins' custom events
if (!PlayerInteractEvent.class.equals(event.getClass())) {
return;
}