mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-26 06:11:40 +01:00
Changed method of non-registration
This commit is contained in:
parent
fff67516f4
commit
e1fc4f3c38
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.integrations.mcmmo;
|
||||
|
||||
import com.willfp.ecoenchants.util.ClassUtils;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import java.util.HashSet;
|
||||
@ -18,6 +19,8 @@ public class McmmoManager {
|
||||
* @param integration The integration to register
|
||||
*/
|
||||
public static void registerIntegration(McmmoIntegration integration) {
|
||||
if(!ClassUtils.exists("com.gmail.nossr50.events.fake.FakeEvent"))
|
||||
return;
|
||||
integrations.add(integration);
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@ package com.willfp.ecoenchants.integrations.mcmmo.plugins;
|
||||
|
||||
import com.gmail.nossr50.events.fake.FakeEvent;
|
||||
import com.willfp.ecoenchants.integrations.mcmmo.McmmoIntegration;
|
||||
import com.willfp.ecoenchants.util.ClassUtils;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
/**
|
||||
@ -11,8 +10,6 @@ import org.bukkit.event.Event;
|
||||
public class McmmoIntegrationImpl implements McmmoIntegration {
|
||||
@Override
|
||||
public boolean isFake(Event event) {
|
||||
if(!ClassUtils.exists("com.gmail.nossr50.events.fake.FakeEvent"))
|
||||
return false;
|
||||
return event instanceof FakeEvent;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user