Skip to content

Commit

Permalink
Change LiquidSpreadsScriptEvent to LiquidSpreadScriptEvent.
Browse files Browse the repository at this point in the history
Adjust meta for modern uses.
Avoid conflict with block spread event during onLoad script parsing.
  • Loading branch information
AnthonyAMC committed Feb 13, 2015
1 parent 1fb5358 commit cedcc2b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/aufdemrand/denizen/Denizen.java
Expand Up @@ -11,7 +11,7 @@

import net.aufdemrand.denizen.events.core.*;
import net.aufdemrand.denizen.events.scriptevents.EntityTeleportScriptEvent;
import net.aufdemrand.denizen.events.scriptevents.LiquidSpreadsScriptEvent;
import net.aufdemrand.denizen.events.scriptevents.LiquidSpreadScriptEvent;
import net.aufdemrand.denizen.events.scriptevents.VehicleMoveScriptEvent;
import net.aufdemrand.denizen.objects.properties.bukkit.BukkitElementProperties;
import net.aufdemrand.denizen.objects.properties.bukkit.BukkitListProperties;
Expand Down Expand Up @@ -588,7 +588,7 @@ public void onEnable() {

ScriptEvent.registerScriptEvent(new VehicleMoveScriptEvent());
ScriptEvent.registerScriptEvent(new EntityTeleportScriptEvent());
ScriptEvent.registerScriptEvent(new LiquidSpreadsScriptEvent());
ScriptEvent.registerScriptEvent(new LiquidSpreadScriptEvent());


ObjectFetcher.registerWithObjectFetcher(dItem.class); // i@
Expand Down
Expand Up @@ -13,29 +13,29 @@

import java.util.HashMap;

public class LiquidSpreadsScriptEvent extends ScriptEvent implements Listener {
public class LiquidSpreadScriptEvent extends ScriptEvent implements Listener {

// <--[event]
// @Events
// liquid spreads
// <liquid block> spreads
//
// @Triggers when a liquid block spreads or dragon egg moves.
//
// @Cancellable true
//
// @Context
// <context.destination> returns the dLocation the block spread to.
// <context.location> returns the dLocation the block spread from.
// <context.material> returns the dMaterial of the block that spread.
//
// @Determine
// "CANCELLED" to stop the block from spreading.
//
// -->


public LiquidSpreadsScriptEvent() {
public LiquidSpreadScriptEvent() {
instance = this;
}
public static LiquidSpreadsScriptEvent instance;
public static LiquidSpreadScriptEvent instance;
public dMaterial material;
public dLocation from;
public dLocation to;
Expand All @@ -54,7 +54,8 @@ public boolean matches(ScriptContainer scriptContainer, String s) {
String mname2 = material.identifySimple().substring(2);
return lower.startsWith("liquid spreads")
|| lower.startsWith(mname + " spreads")
|| lower.startsWith(mname2 + " spreads");
|| lower.startsWith(mname2 + " spreads")
&& !lower.equals("block spreads");
}

@Override
Expand Down

0 comments on commit cedcc2b

Please sign in to comment.