Remove Supervisor support.

This reverts commit 442d97a1b1, fcbd3deb6b, and 6231a25413.

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:
Ali Moghnieh 2017-05-04 13:52:59 +01:00
parent 4bfabaa1d3
commit af5d2c2fca
No known key found for this signature in database
GPG Key ID: F09D3A1BAF2E6D70
5 changed files with 2 additions and 125 deletions

View File

@ -133,27 +133,11 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </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> </dependencies>
<repositories> <repositories>
<repository> <repository>
<id>vault-repo</id> <id>vault-repo</id>
<url>http://nexus.hc.to/content/repositories/pub_releases</url> <url>http://nexus.hc.to/content/repositories/pub_releases</url>
</repository> </repository>
<repository>
<id>ender-zone-repo</id>
<url>http://ci.ender.zone/plugin/repository/everything/</url>
</repository>
</repositories> </repositories>
</project> </project>

View File

@ -24,7 +24,6 @@ import com.earth2me.essentials.register.payment.Methods;
import com.earth2me.essentials.signs.SignBlockListener; import com.earth2me.essentials.signs.SignBlockListener;
import com.earth2me.essentials.signs.SignEntityListener; import com.earth2me.essentials.signs.SignEntityListener;
import com.earth2me.essentials.signs.SignPlayerListener; import com.earth2me.essentials.signs.SignPlayerListener;
import com.earth2me.essentials.supervisor.EssentialsReportContext;
import com.earth2me.essentials.textreader.IText; import com.earth2me.essentials.textreader.IText;
import com.earth2me.essentials.textreader.KeywordReplacer; import com.earth2me.essentials.textreader.KeywordReplacer;
import com.earth2me.essentials.textreader.SimpleTextInput; 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 :-( // Failed to submit the stats :-(
} }
if (getServer().getPluginManager().getPlugin("Supervisor") != null) {
EssentialsReportContext.load(this);
}
final String timeroutput = execTimer.end(); final String timeroutput = execTimer.end();
if (getSettings().isDebug()) { if (getSettings().isDebug()) {
LOGGER.log(Level.INFO, "Essentials load {0}", timeroutput); LOGGER.log(Level.INFO, "Essentials load {0}", timeroutput);

View File

@ -928,8 +928,4 @@ public abstract class UserData extends PlayerExtension implements IConf {
public void stopTransaction() { public void stopTransaction() {
config.stopTransaction(); config.stopTransaction();
} }
public EssentialsUserConf getConfig() {
return config;
}
} }

View File

@ -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();
}
}
}
}

View File

@ -5,8 +5,8 @@ main: com.earth2me.essentials.Essentials
version: ${project.version}-b${build.number} version: ${project.version}-b${build.number}
website: http://tiny.cc/EssentialsCommands website: http://tiny.cc/EssentialsCommands
description: Provides an essential, core set of commands for Bukkit. description: Provides an essential, core set of commands for Bukkit.
softdepend: [Vault, Supervisor] softdepend: [Vault]
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5, Iaccidentally, drtshock, vemacs, SupaHam] authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5, Iaccidentally, drtshock, vemacs]
commands: commands:
afk: afk:
description: Marks you as away-from-keyboard. description: Marks you as away-from-keyboard.