diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-12-31 02:28:52 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-12-31 02:28:52 +0000 |
commit | 86619275992b4b29bfac91897986b10f2ef863cb (patch) | |
tree | c46ac4dd7fb3a7d7dde90d508e3b123efd09def7 /EssentialsExtra | |
parent | a6b83ca260386fbafb24473aca5f95dc2d5c284b (diff) | |
download | Essentials-86619275992b4b29bfac91897986b10f2ef863cb.tar Essentials-86619275992b4b29bfac91897986b10f2ef863cb.tar.gz Essentials-86619275992b4b29bfac91897986b10f2ef863cb.tar.lz Essentials-86619275992b4b29bfac91897986b10f2ef863cb.tar.xz Essentials-86619275992b4b29bfac91897986b10f2ef863cb.zip |
Merge gravy's pull and reformat code
Diffstat (limited to 'EssentialsExtra')
4 files changed, 38 insertions, 40 deletions
diff --git a/EssentialsExtra/pom.xml b/EssentialsExtra/pom.xml index bb763b565..fc2f8e23f 100644 --- a/EssentialsExtra/pom.xml +++ b/EssentialsExtra/pom.xml @@ -1,21 +1,20 @@ - <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> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.essentials3</groupId> - <artifactId>BuildAll</artifactId> - <version>3.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> + <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> + <artifactId>EssentialsExtra</artifactId> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>Essentials</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> </project> diff --git a/EssentialsExtra/src/net/ess3/extra/AnnotatedCommand.java b/EssentialsExtra/src/net/ess3/extra/AnnotatedCommand.java index 258b53bb5..05418e9d8 100644 --- a/EssentialsExtra/src/net/ess3/extra/AnnotatedCommand.java +++ b/EssentialsExtra/src/net/ess3/extra/AnnotatedCommand.java @@ -14,7 +14,6 @@ public @interface AnnotatedCommand String usage() default ""; - String[] aliases() default - { + String[] aliases() default { }; } diff --git a/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java b/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java index de2c5fedd..93831ef19 100644 --- a/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java +++ b/EssentialsExtra/src/net/ess3/extra/EssentialsExtra.java @@ -12,18 +12,17 @@ import java.util.Enumeration; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.logging.Level; -import net.ess3.api.ICommandHandler; -import net.ess3.api.IEssentials; -import net.ess3.bukkit.BukkitPlugin; -import org.bukkit.command.TabExecutor; -import net.ess3.commands.EssentialsCommandHandler; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandMap; import org.bukkit.command.CommandSender; +import org.bukkit.command.TabExecutor; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.SimplePluginManager; import org.bukkit.plugin.java.JavaPlugin; +import net.ess3.api.IEssentials; +import net.ess3.bukkit.BukkitPlugin; +import net.ess3.commands.EssentialsCommandHandler; public class EssentialsExtra extends JavaPlugin @@ -69,9 +68,8 @@ public class EssentialsExtra extends JavaPlugin } } } - urls = new URL[] - { - commandDir.toURI().toURL() + urls = new URL[]{ + commandDir.toURI().toURL() }; } catch (Exception ex) @@ -95,7 +93,8 @@ public class EssentialsExtra extends JavaPlugin { throw new IllegalArgumentException("Command class is not annotated with AnnotatedCommand.class"); } - commandMap.register("Essentials", new Command(commandName, anot.description(), anot.usage(), Arrays.asList(anot.aliases())) + commandMap.register( + "Essentials", new Command(commandName, anot.description(), anot.usage(), Arrays.asList(anot.aliases())) { @Override public boolean execute(CommandSender cs, String label, String[] args) diff --git a/EssentialsExtra/src/net/ess3/extra/commands/Commandkittycannon.java b/EssentialsExtra/src/net/ess3/extra/commands/Commandkittycannon.java index 9ad4274a7..cc947ead2 100644 --- a/EssentialsExtra/src/net/ess3/extra/commands/Commandkittycannon.java +++ b/EssentialsExtra/src/net/ess3/extra/commands/Commandkittycannon.java @@ -2,12 +2,12 @@ package net.ess3.extra.commands; import java.util.Random; -import net.ess3.api.IUser; -import net.ess3.commands.EssentialsCommand; -import net.ess3.extra.AnnotatedCommand; import org.bukkit.Location; import org.bukkit.entity.EntityType; import org.bukkit.entity.Ocelot; +import net.ess3.api.IUser; +import net.ess3.commands.EssentialsCommand; +import net.ess3.extra.AnnotatedCommand; @AnnotatedCommand(description = "Throw an exploding kitten at your opponent", usage = "/<command>") @@ -28,15 +28,16 @@ public class Commandkittycannon extends EssentialsCommand ocelot.setCatType(Ocelot.Type.values()[i]); ocelot.setTamed(true); ocelot.setVelocity(user.getPlayer().getEyeLocation().getDirection().multiply(2)); - ess.getPlugin().scheduleSyncDelayedTask(new Runnable() - { - @Override - public void run() - { - final Location loc = ocelot.getLocation(); - ocelot.remove(); - loc.getWorld().createExplosion(loc, 0F); - } - }, 20); + ess.getPlugin().scheduleSyncDelayedTask( + new Runnable() + { + @Override + public void run() + { + final Location loc = ocelot.getLocation(); + ocelot.remove(); + loc.getWorld().createExplosion(loc, 0F); + } + }, 20); } } |