use of com.denizenscript.denizen.objects.WorldTag in project Denizen-For-Bukkit by DenizenScript.
the class WorldLoadsScriptEvent method onWorldLoads.
@EventHandler
public void onWorldLoads(WorldLoadEvent event) {
world = new WorldTag(event.getWorld());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.WorldTag in project Denizen-For-Bukkit by DenizenScript.
the class WorldSavesScriptEvent method onWorldSaves.
@EventHandler
public void onWorldSaves(WorldSaveEvent event) {
world = new WorldTag(event.getWorld());
this.event = event;
fire(event);
}
use of com.denizenscript.denizen.objects.WorldTag in project Denizen-For-Bukkit by DenizenScript.
the class GameRuleCommand method execute.
@Override
public void execute(ScriptEntry scriptEntry) {
WorldTag world = scriptEntry.getObjectTag("world");
ElementTag gamerule = scriptEntry.getElement("gamerule");
ElementTag value = scriptEntry.getElement("value");
if (scriptEntry.dbCallShouldDebug()) {
Debug.report(scriptEntry, getName(), world, gamerule, value);
}
if (!world.getWorld().setGameRuleValue(gamerule.asString(), value.asString())) {
Debug.echoError(scriptEntry, "Invalid gamerule!");
}
}
use of com.denizenscript.denizen.objects.WorldTag in project Denizen-For-Bukkit by DenizenScript.
the class PlayerChangesWorldScriptEvent method onPlayerChangesWorld.
@EventHandler
public void onPlayerChangesWorld(PlayerChangedWorldEvent event) {
if (EntityTag.isNPC(event.getPlayer())) {
return;
}
origin_world = new WorldTag(event.getFrom());
destination_world = new WorldTag(event.getPlayer().getWorld());
this.event = event;
fire(event);
}
Aggregations