Compare commits

...
4 changed files with 14 additions and 11 deletions

No files matched your search

@@ -96,6 +96,10 @@ public class Essentials extends JavaPlugin implements IEssentials
public void onEnable()
{
if (!Thread.currentThread().getStackTrace()[5].getMethodName().equals("loadPlugin")) {
logger.log(Level.SEVERE, "Another plugin is trying to enable Essentials manually. Don't do this! It's probably "
+ Thread.currentThread().getStackTrace()[5].getClassName());
}
if (enableErrorLogging)
{
logger.addHandler(errorHandler);
@@ -68,14 +68,6 @@ public class Methods {
if(method.getDescription().getName().equals(name)) plugin = method; else plugin = manager.getPlugin(name);
if(plugin == null) continue;
if(!plugin.isEnabled()) {
this.self = true;
Logger.getLogger("Minecraft").log(Level.SEVERE, name + " Plugin was found, but not enabled before Essentials. Read the Essentials thread for help.");
//manager.enablePlugin(plugin);
}
if(plugin == null) continue;
Method current = this.createMethod(plugin);
if(current == null) continue;
@@ -99,9 +91,7 @@ public class Methods {
break;
}
if(this.preferred.isEmpty()) this.Method = attached;
if(count == 0) {
if(count != 0) {
if(this.preferred.equalsIgnoreCase(attached.getName()))
this.Method = attached;
} else {
@@ -3,6 +3,7 @@ package com.nijikokun.bukkit.Permissions;
import com.nijiko.Misc;
import com.nijiko.configuration.DefaultConfiguration;
import com.nijiko.permissions.PermissionHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.anjocaido.groupmanager.GroupManager;
import org.anjocaido.groupmanager.permissions.NijikoPermissionsProxy;
@@ -55,6 +56,10 @@ public class Permissions extends JavaPlugin {
@Override
public void onEnable() {
if (!Thread.currentThread().getStackTrace()[5].getMethodName().equals("loadPlugin")) {
Logger.getLogger("Minecraft").log(Level.SEVERE, "Another plugin is trying to enable Permissions manually. Don't do this! It's probably "
+ Thread.currentThread().getStackTrace()[5].getClassName());
}
Server = this.getServer();
PluginDescriptionFile pdfFile = this.getDescription();
@@ -63,6 +63,10 @@ public class GroupManager extends JavaPlugin {
@Override
public void onEnable() {
if (!Thread.currentThread().getStackTrace()[5].getMethodName().equals("loadPlugin")) {
logger.log(Level.SEVERE, "Another plugin is trying to enable GroupManager manually. Don't do this! It's probably "
+ Thread.currentThread().getStackTrace()[5].getClassName());
}
GroupManager.logger.setUseParentHandlers(false);
GMLoggerHandler ch = new GMLoggerHandler();
GroupManager.logger.addHandler(ch);