Skip to content

Commit

Permalink
add <l@location.highest_y>
Browse files Browse the repository at this point in the history
  • Loading branch information
aufdemrand committed Aug 3, 2013
1 parent c71e725 commit 213e0d1
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 51 deletions.
3 changes: 2 additions & 1 deletion src/main/java/net/aufdemrand/denizen/CommandHandler.java
Expand Up @@ -736,7 +736,8 @@ public void version(CommandContext args, CommandSender sender, NPC npc) throws C
desc = "Saves the current state of Denizen/saves.yml.", modifiers = { "save" },
min = 1, max = 3, permission = "denizen.basic", flags = "s")
public void save(CommandContext args, CommandSender sender, NPC npc) throws CommandException {
((Denizen) plugin.getServer().getPluginManager().getPlugin("Denizen")).saveSaves();

DenizenAPI.getCurrentInstance().saveSaves();

Messaging.send(sender, ChatColor.GREEN + "Denizen/saves.yml saved to disk from memory.");
}
Expand Down
Expand Up @@ -59,7 +59,6 @@ public String report() {

@Override
public void onBuild(List<aH.Argument> args) {

// Build the listener from script arguments. onBuild() is called when a new listener is
// made with the LISTEN command. All arguments except type, id, and script
// are passed through to here.
Expand Down Expand Up @@ -98,7 +97,6 @@ else if (arg.matchesPrefix("targets, target, t, name, names"))

@Override
public void onLoad() {

// Build the listener from saved data. id and type are saved automatically.
// onBuild() will not be called, this should handle everything onBuild() would with the
// saved data from onSave().
Expand All @@ -115,7 +113,6 @@ public void onLoad() {

@Override
public void onSave() {

// If the player leaves the game while a listener is in progress, save the information
// so that it can be rebuilt onLoad(). id and type are done automatically.
store("Type", type.name());
Expand Down Expand Up @@ -149,7 +146,6 @@ public void onCancel() {

@Override
public void constructed() {

// Called after build and load methods. Perfect place to register
// any bukkit events!
denizen.getServer().getPluginManager().registerEvents(this, denizen);
Expand All @@ -161,18 +157,17 @@ public void constructed() {

@Override
public void deconstructed() {

// Called when the instance is deconstructed due to either it being
// saved, finished, or cancelled.
// This is the perfect place to unregister any bukkit events so it
// can be cleanly removed from memory.

EntityDeathEvent.getHandlerList().unregister(this);
}


@EventHandler
public void listen(EntityDeathEvent event) {

// Only continue if the event is an event for the player that owns this listener.
if (event.getEntity().getKiller() != player.getPlayerEntity()) return;

Expand Down Expand Up @@ -290,12 +285,12 @@ else if (type == KillType.GROUP) {


public void check() {

// Check current kills vs. required kills; finish() if necessary.
if (kills_so_far >= required)
finish();
}


@EventHandler
public void listenTag(ReplaceableTagEvent event) {

Expand Down
5 changes: 2 additions & 3 deletions src/main/java/net/aufdemrand/denizen/objects/dItem.java
Expand Up @@ -78,7 +78,6 @@ public static void remove(String id) {
////////////////

public static dItem valueOf(String string) {

return valueOf(string, null, null);
}

Expand Down Expand Up @@ -352,7 +351,7 @@ public int comparesTo(ItemStack item) {
* Check whether this item contains a lore that starts
* with a certain prefix.
*
* @param String The prefix
* @param prefix The prefix
* @return True if it does, otherwise false
*
*/
Expand All @@ -373,7 +372,7 @@ public boolean containsLore(String prefix) {
* Get the lore from this item that starts with a
* certain prefix.
*
* @param String The prefix
* @param prefix The prefix
* @return String The lore
*
*/
Expand Down

0 comments on commit 213e0d1

Please sign in to comment.