summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--EssentialsExtra/pom.xml21
-rw-r--r--EssentialsExtra/src/Commandkittycannon.java (renamed from Essentials/src/net/ess3/commands/Commandkittycannon.java)5
-rw-r--r--EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java56
-rw-r--r--EssentialsExtra/src/plugin.yml13
-rw-r--r--pom.xml1
5 files changed, 93 insertions, 3 deletions
diff --git a/EssentialsExtra/pom.xml b/EssentialsExtra/pom.xml
new file mode 100644
index 000000000..bb763b565
--- /dev/null
+++ b/EssentialsExtra/pom.xml
@@ -0,0 +1,21 @@
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>net.essentials3</groupId>
+ <artifactId>BuildAll</artifactId>
+ <version>3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>EssentialsExtra</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>Essentials</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/Essentials/src/net/ess3/commands/Commandkittycannon.java b/EssentialsExtra/src/Commandkittycannon.java
index 455ddd1a5..db9fa5fdf 100644
--- a/Essentials/src/net/ess3/commands/Commandkittycannon.java
+++ b/EssentialsExtra/src/Commandkittycannon.java
@@ -1,8 +1,7 @@
-package net.ess3.commands;
-
import java.util.Random;
import net.ess3.api.IUser;
+import net.ess3.commands.EssentialsCommand;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Ocelot;
@@ -36,4 +35,4 @@ public class Commandkittycannon extends EssentialsCommand
}
}, 20);
}
-} \ No newline at end of file
+}
diff --git a/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java b/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java
new file mode 100644
index 000000000..a1504b9cb
--- /dev/null
+++ b/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java
@@ -0,0 +1,56 @@
+package net.ess3.extra;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.logging.Level;
+import net.ess3.api.ICommandHandler;
+import net.ess3.api.IEssentials;
+import net.ess3.bukkit.BukkitPlugin;
+import net.ess3.commands.EssentialsCommandHandler;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandSender;
+import org.bukkit.plugin.java.JavaPlugin;
+
+
+public class EssentialsExtra extends JavaPlugin
+{
+ private IEssentials ess;
+ private ICommandHandler handler;
+ private ClassLoader loader;
+
+ @Override
+ public void onLoad()
+ {
+ ess = ((BukkitPlugin)getServer().getPluginManager().getPlugin("Essentials-3")).getEssentials();
+ }
+
+ @Override
+ public void onEnable()
+ {
+ handler = new EssentialsCommandHandler(loader, "Command", "essentials.", ess);
+ File commandDir = new File(ess.getPlugin().getDataFolder(), "extras");
+ commandDir.mkdir();
+ URL[] urls = null;
+ try
+ {
+ urls = new URL[]
+ {
+ commandDir.toURI().toURL()
+ };
+ }
+ catch (MalformedURLException ex)
+ {
+ getLogger().log(Level.SEVERE, "Could not get extra command dir", ex);
+ getServer().getPluginManager().disablePlugin(this);
+ }
+ loader = new URLClassLoader(urls, getClassLoader());
+ }
+
+ @Override
+ public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
+ {
+ return handler.handleCommand(sender, command, label, args);
+ }
+}
diff --git a/EssentialsExtra/src/plugin.yml b/EssentialsExtra/src/plugin.yml
new file mode 100644
index 000000000..9202b0fbd
--- /dev/null
+++ b/EssentialsExtra/src/plugin.yml
@@ -0,0 +1,13 @@
+# This determines the command prefix when there are conflicts (/name:home, /name:help, etc.)
+name: EssentialsExtra
+main: net.ess3.extra.EssentialsExtra
+# Note to developers: This next line cannot change, or the automatic versioning system will break.
+version: ${build.number}
+website: http://tiny.cc/EssentialsWiki
+description: Provides extra commands for Essentials
+authors: [md_5]
+depend: [Essentials-3]
+commands:
+ kittycannon:
+ description: Throw an exploding kitten at your opponent
+ usage: /<command>
diff --git a/pom.xml b/pom.xml
index 62b0ce1ac..e9d579a67 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,6 +14,7 @@
<module>Essentials</module>
<module>Essentials2Compat</module>
<module>EssentialsChat</module>
+ <module>EssentialsExtra</module>
<module>EssentialsGeoIP</module>
<module>EssentialsGroupBridge</module>
<module>EssentialsGroupManager</module>