Skip to content

Commit

Permalink
Small cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcernat committed Jul 12, 2013
1 parent 8acf6fd commit 138386d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
3 changes: 3 additions & 0 deletions src/main/java/net/aufdemrand/denizen/objects/dEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ else if (entityGroup.matches("P@")) {
for (World world : Bukkit.getWorlds()) {
net.minecraft.server.v1_6_R2.Entity nmsEntity = ((CraftWorld) world).getHandle().getEntity(entityID);

// Make sure the nmsEntity is valid, to prevent
// unpleasant errors

if (nmsEntity != null) {
entity = nmsEntity.getBukkitEntity();
}
Expand Down
1 change: 0 additions & 1 deletion src/main/java/net/aufdemrand/denizen/objects/dWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import net.aufdemrand.denizen.utilities.debugging.dB;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ public void registerCoreMembers() {
"ATTACK", "attack (stop)", 0);

registerCoreMember(BreakCommand.class,
"BREAK", "break [<location>] (as:<entity>)", 1);
"BREAK", "break [<location>] (entity:<entity>) (radius:<#.#>)", 1);

registerCoreMember(BurnCommand.class,
"BURN", "burn [entities:<entity>|...] (duration:<value>)", 1);

registerCoreMember(CastCommand.class,
"CAST", "cast [effect] (duration:<#>) (power:<#>) (target(s):<entity>|...)", 1);
"CAST", "cast [effect] (duration:<#>) (power:<#>) (targets:<entity>|...)", 1);

registerCoreMember(ChatCommand.class,
"CHAT", "chat [\"<text>\"] (target(s):<entity>|...)", 1);
"CHAT", "chat [\"<text>\"] (targets:<entity>|...)", 1);

registerCoreMember(ChunkLoadCommand.class,
"CHUNKLOAD", "chunkload ({add}/remove/removeall) [<location>] (duration:<value>)", 1);
Expand Down Expand Up @@ -149,10 +149,10 @@ public void registerCoreMembers() {
"FLAG", "flag ({player}/npc/global) [<name>([<#>])](:<action>)[:<value>] (duration:<#>)", 1);

registerCoreMember(FlyCommand.class,
"FLY", "fly (cancel) [entities:<entity>|...] (origin:<location>) (destination(s):<location>|...) (speed:<#>)", 1);
"FLY", "fly (cancel) [entities:<entity>|...] (origin:<location>) (destinations:<location>|...) (speed:<#.#>)", 1);

registerCoreMember(FollowCommand.class,
"FOLLOW", "follow (stop)", 0);
"FOLLOW", "follow (stop) (lead:<#.#>)", 0);

registerCoreMember(ForEachCommand.class,
"FOREACH", "foreach [location:<location>|...] [<script>]", 0);
Expand All @@ -167,13 +167,13 @@ public void registerCoreMembers() {
"HEAD", "head (player) [skin:<name>]", 0);

registerCoreMember(HealCommand.class,
"HEAL", "heal (amt:<#>) (target:<entity>)", 0);
"HEAL", "heal (qty:<#.#>) (target:<entity>)", 0);

registerCoreMember(HealthCommand.class,
"HEALTH", "health (state:true/false/toggle) (set_max:<#>)", 1);

registerCoreMember(HurtCommand.class,
"HURT", "hurt (amt:<#>) (target:<entity>)", 0);
"HURT", "hurt (qty:<#.#>) (target:<entity>)", 0);

registerCoreMember(IfCommand.class,
"IF", "if [<value>] (!)(<operator> <value>) (&&/|| ...) [<commands>] (else <commands>)", 2);
Expand All @@ -197,7 +197,7 @@ public void registerCoreMembers() {
"LOOKCLOSE", "lookclose [state:true/false]", 1);

registerCoreMember(MidiCommand.class,
"MIDI", "midi [file:<name>] [<location>/listener(s):<player>|...] (tempo:<#>)", 1);
"MIDI", "midi [file:<name>] [<location>/listeners:<player>|...] (tempo:<#>)", 1);

registerCoreMember(MountCommand.class,
"MOUNT", "mount (cancel) [entities:<entity>|...] (<location>)", 0);
Expand All @@ -209,7 +209,7 @@ public void registerCoreMembers() {
"NAMEPLATE", "nameplate [<chatcolor>] [set:<text>] (target:<player>) +--> Requires ProtocolLib", 1);

registerCoreMember(NarrateCommand.class,
"NARRATE", "narrate [\"<text>\"] (target(s):<entity>|...) (format:<name>)", 1);
"NARRATE", "narrate [\"<text>\"] (targets:<entity>|...) (format:<name>)", 1);

registerCoreMember(NewCommand.class,
"NEW", "new [itemstack/entity/npc] [id:<name>] (<item> qty:<#>)", 2);
Expand All @@ -218,7 +218,7 @@ public void registerCoreMembers() {
"OXYGEN", "oxygen (type:maximum/remaining) (mode:set/add/remove) [qty:<#>]", 1);

registerCoreMember(PlayEffectCommand.class,
"PLAYEFFECT", "playeffect [<location>] [effect:<name>] (data:<#>) (radius:<#>) (qty:<#>) (offset:<#>)", 2);
"PLAYEFFECT", "playeffect [<location>] [effect:<name>] (qty:<#>) (radius:<#.#>) (data:<#.#>) (offset:<#.#>)", 2);

registerCoreMember(PlaySoundCommand.class,
"PLAYSOUND", "playsound [<location>] [sound:<name>] (volume:<#>) (pitch:<#>)", 2);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package net.aufdemrand.denizen.scripts.commands.world;

import org.bukkit.Bukkit;

import net.aufdemrand.denizen.exceptions.CommandExecutionException;
import net.aufdemrand.denizen.exceptions.InvalidArgumentsException;
import net.aufdemrand.denizen.scripts.ScriptEntry;
import net.aufdemrand.denizen.scripts.commands.AbstractCommand;
import net.aufdemrand.denizen.objects.Duration;
import net.aufdemrand.denizen.objects.Element;
import net.aufdemrand.denizen.objects.aH;
import net.aufdemrand.denizen.objects.dWorld;
import net.aufdemrand.denizen.utilities.debugging.dB;
Expand Down

0 comments on commit 138386d

Please sign in to comment.