Skip to content

Commit

Permalink
Fix some documentation in dPlayer attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
aufdemrand committed Jul 26, 2013
1 parent 3c95f28 commit 25a9431
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/java/net/aufdemrand/denizen/objects/dPlayer.java
Expand Up @@ -479,15 +479,15 @@ else if (attribute.startsWith("list.offline")) {
return new Element(player_name).getAttribute(attribute.fulfill(1));

// <--
// <player.name.list> -> dLocation
// <player.eyes> -> dLocation
// returns a dLocation of the player's eyes.
// -->
if (attribute.startsWith("eyes"))
return new dLocation(getEyeLocation())
.getAttribute(attribute.fulfill(1));

// <--
// <player.name.list> -> dLocation
// <player.compass.target> -> dLocation
// returns a dLocation of the player's 'compass target'.
// -->
if (attribute.startsWith("compass_target"))
Expand Down Expand Up @@ -516,7 +516,7 @@ else if ((float) getPlayerEntity().getFoodLevel() / maxHunger < 1)
}

// <--
// <player.name.list> -> Element(number)
// <player.food_level> -> Element(number)
// returns the current food level of the player.
// -->
if (attribute.startsWith("food_level"))
Expand Down
Expand Up @@ -8,6 +8,7 @@
import net.aufdemrand.denizen.scripts.commands.AbstractCommand;
import net.aufdemrand.denizen.scripts.queues.core.InstantQueue;
import net.aufdemrand.denizen.scripts.queues.core.TimedQueue;
import net.aufdemrand.denizen.utilities.debugging.dB;

import java.util.List;

Expand Down Expand Up @@ -61,14 +62,14 @@ else if (arg.matchesPrefix("p, path"))
scriptEntry.addObject("path", arg.asElement());

else if (arg.matches("instant, instantly"))
scriptEntry.addObject("instant", Element.TRUE);
scriptEntry.addObject("instant", new Element(true));

else if (arg.matchesPrefix("delay")
&& arg.matchesArgumentType(Duration.class))
scriptEntry.addObject("delay", arg.asType(Duration.class));

else if (arg.matches("loop"))
scriptEntry.addObject("loop", Element.TRUE);
scriptEntry.addObject("loop", new Element(true));

else if (arg.matchesPrefix("q, quantity")
&& arg.matchesPrimitive(aH.PrimitiveType.Integer))
Expand All @@ -93,6 +94,9 @@ else if (arg.matchesPrefix("d, def, define, c, context"))
@Override
public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {

dB.report(getName(), scriptEntry.getdObject("script").debug()
+ (scriptEntry.hasObject("instant") ? scriptEntry.getdObject("instant").debug() : ""));

// definitions
// loop
// quantity
Expand Down

0 comments on commit 25a9431

Please sign in to comment.