mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-23 00:21:26 +01:00
SEVERE error messages for other plugins, that try to manually enable Essentials, FakePermissions or GroupManager
This commit is contained in:
parent
27c84ceaac
commit
b63ae9b771
@ -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);
|
||||
|
@ -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 Essentials 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 Essentials 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);
|
||||
|
Loading…
Reference in New Issue
Block a user