mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-08 20:10:29 +01:00
Remove Supervisor support.
This reverts commit442d97a1b1
,fcbd3deb6b
, and6231a25413
. Due to the lack of proper dependency deployment and availability users are unable to build EssentialsX without doing some manual installations. Until issue is resolved Supervisor support is dropped.
This commit is contained in:
parent
4bfabaa1d3
commit
af5d2c2fca
@ -133,27 +133,11 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.supaham.supervisor</groupId>
|
||||
<artifactId>supervisor-bukkit</artifactId>
|
||||
<version>1.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>vault-repo</id>
|
||||
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>ender-zone-repo</id>
|
||||
<url>http://ci.ender.zone/plugin/repository/everything/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
|
@ -24,7 +24,6 @@ import com.earth2me.essentials.register.payment.Methods;
|
||||
import com.earth2me.essentials.signs.SignBlockListener;
|
||||
import com.earth2me.essentials.signs.SignEntityListener;
|
||||
import com.earth2me.essentials.signs.SignPlayerListener;
|
||||
import com.earth2me.essentials.supervisor.EssentialsReportContext;
|
||||
import com.earth2me.essentials.textreader.IText;
|
||||
import com.earth2me.essentials.textreader.KeywordReplacer;
|
||||
import com.earth2me.essentials.textreader.SimpleTextInput;
|
||||
@ -258,10 +257,6 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
|
||||
// Failed to submit the stats :-(
|
||||
}
|
||||
|
||||
if (getServer().getPluginManager().getPlugin("Supervisor") != null) {
|
||||
EssentialsReportContext.load(this);
|
||||
}
|
||||
|
||||
final String timeroutput = execTimer.end();
|
||||
if (getSettings().isDebug()) {
|
||||
LOGGER.log(Level.INFO, "Essentials load {0}", timeroutput);
|
||||
|
@ -928,8 +928,4 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
||||
public void stopTransaction() {
|
||||
config.stopTransaction();
|
||||
}
|
||||
|
||||
public EssentialsUserConf getConfig() {
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
@ -1,98 +0,0 @@
|
||||
package com.earth2me.essentials.supervisor;
|
||||
|
||||
import com.earth2me.essentials.Essentials;
|
||||
import com.earth2me.essentials.User;
|
||||
import com.earth2me.essentials.UserMap;
|
||||
import com.supaham.supervisor.bukkit.SupervisorPlugin;
|
||||
import com.supaham.supervisor.report.AbstractReportContextEntry;
|
||||
import com.supaham.supervisor.report.ReportContext;
|
||||
import com.supaham.supervisor.report.ReportContextEntry;
|
||||
import com.supaham.supervisor.report.ReportSpecifications;
|
||||
import com.supaham.supervisor.report.ReportSpecifications.ReportLevel;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class EssentialsReportContext extends ReportContext {
|
||||
|
||||
private static final Method getNamesMethod;
|
||||
|
||||
private final Essentials ess;
|
||||
|
||||
static {
|
||||
try {
|
||||
getNamesMethod = UserMap.class.getDeclaredMethod("getNames");
|
||||
} catch (NoSuchMethodException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void load(Essentials ess) {
|
||||
SupervisorPlugin.get().registerContext(ess, new EssentialsReportContext(ess));
|
||||
}
|
||||
|
||||
public EssentialsReportContext(Essentials ess) {
|
||||
super("essentialsx", "EssentialsX", "1");
|
||||
this.ess = ess;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReportContextEntry createEntry(@Nonnull ReportSpecifications specs) {
|
||||
return new EssentialsContext(this, specs);
|
||||
}
|
||||
|
||||
private final class EssentialsContext extends AbstractReportContextEntry {
|
||||
|
||||
public EssentialsContext(@Nonnull ReportContext parentContext, @Nonnull ReportSpecifications reportSpecifications) {
|
||||
super(parentContext, reportSpecifications);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
append("users_count", ess.getUserMap().getUniqueUsers());
|
||||
uuidMapCount();
|
||||
|
||||
if (getReportLevel() >= ReportLevel.NORMAL) {
|
||||
userdata();
|
||||
}
|
||||
|
||||
if (getReportLevel() > ReportLevel.BRIEF) {
|
||||
config();
|
||||
}
|
||||
}
|
||||
|
||||
private void uuidMapCount() {
|
||||
try {
|
||||
getNamesMethod.setAccessible(true);
|
||||
append("uuidmap_count", ((Map) getNamesMethod.invoke(ess.getUserMap())).size());
|
||||
getNamesMethod.setAccessible(false);
|
||||
} catch (IllegalAccessException | InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void userdata() {
|
||||
for (User user : ess.getOnlineUsers()) {
|
||||
File file = user.getConfig().getFile();
|
||||
try {
|
||||
createPlainTextFile("userdata/" + file.getName(), user.getName() + " data").appendFile(file);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void config() {
|
||||
try {
|
||||
createPlainTextFile("config.yml", "Essentials Configuration file").appendFile(new File(ess.getDataFolder(), "config.yml"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -5,8 +5,8 @@ main: com.earth2me.essentials.Essentials
|
||||
version: ${project.version}-b${build.number}
|
||||
website: http://tiny.cc/EssentialsCommands
|
||||
description: Provides an essential, core set of commands for Bukkit.
|
||||
softdepend: [Vault, Supervisor]
|
||||
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5, Iaccidentally, drtshock, vemacs, SupaHam]
|
||||
softdepend: [Vault]
|
||||
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5, Iaccidentally, drtshock, vemacs]
|
||||
commands:
|
||||
afk:
|
||||
description: Marks you as away-from-keyboard.
|
||||
|
Loading…
Reference in New Issue
Block a user