-################################################################################
+CraftBukkit%20Version:%20git-Spigot-1304%20(MC:%201.7.2)%0aActive%20Plugins:%20%012WorldBorder:%201.7.7%2c%20%012iTags:%202.1.1%2c%20%012Buycraft:%206.4%2c%20%012mcore:%207.0.1%2c%20%012Vault:%201.2.31-b411%2c%20%0a%012Multiverse-Core:%202.5-b677%2c%20%012MobBountyReloaded:%20376%2c%20%012Whitelist:%203.3%2c%20%012MCDocs:%2014.4%2c%20%0a%012CityGates:%201.7%2c%20%012Chairs:%203.3.beta%2c%20%012ItemAttributes:%201.2.0-SNAPSHOT-b102%2c%20%012EnderPearlCoolDown:%201.4%2c%20%0a%012MOTD:%201.0.3%2c%20%012WhatIsIt:%201.3.7%2c%20%012BanManager:%203.13%2c%20%012ProtocolLib:%203.1.2%2c%20%012Votifier:%201.9%2c%20%0a%012MobArena:%200.96.2%2c%20%012Catacombs:%203.6%2c%20%012ToughAnvils:%201.1-SNAPSHOT%2c%20%012GAListener:%200.9%2c%20%0a%012Citizens:%202.0.11-SNAPSHOT%20(build%201071)%2c%20%012Referrals:%200.463%2c%20%012AlphaChest:%201.16.0%2c%20%0a%012WorldEdit:%205.5.9-SNAPSHOT:3000-ab0d170%2cmaster%2c%20%012MythicDrops:%203.0.0-SNAPSHOT-b307-STABLE%2c%20%0a%012VotifierCount:%201.0.5%2c%20%012PermissionsEx:%201.20.4%2c%20%012HealthBar:%201.8.1%2c%20%012CombatTag:%206.0.2%2c%20%0a%012WorldGuard:%205.8.1-SNAPSHOT:1268-2df3290%2cmaster%20with%20custom%20flags%20plugin.%2c%20%012Give%20All:%200.1%2c%20%0a%012PvPTimer:%201.2%2c%20%012CombatApples:%201.0%2c%20%012MobSpawnControl:%202.4.4%2c%20%012massivetickets:%201.2.0%2c%20%0a%012NoFarm:%200.8%2c%20%012ClearLag:%202.6.2%2c%20%012Herochat:%205.6.7-SNAPSHOT%2c%20%012TrophyHeads:%201.12.6%2c%20%0a%012AutoAnnouncer:%201.7-03.23%2c%20%012CommunityBridge:%202.1.3.341%2c%20%012Essentials:%20Pre2.13.1.2%2c%20%0a%012HyperConomy:%200.974.3%2c%20%012floAuction:%202.10.3%2c%20%012SilkSpawners:%203.3.4%2c%20%012HyperMerchant:%201.4-dev%2c%20%0a%012LeveledMobs:%2013.0%2c%20%012Denizen:%200.9.4-SNAPSHOT%20(build%20Unknown)%2c%20%012WGCustomFlags:%201.6%2c%20%0a%012mcMMO:%201.5.00-SNAPSHOT-b96%2c%20%012SimpleRegionMarket:%203.6%2c%20%012EssentialsProtect:%20Pre2.13.1.2%2c%20%0a%012EssentialsSpawn:%20Pre2.13.1.2%2c%20%012BattleTracker:%202.5.8.4%2c%20%012EssentialsGeoIP:%20Pre2.13.1.2%2c%20%0a%012VanishNoPacket:%203.18.7%2c%20%012WGBlockRestricter:%201.7%2c%20%012AuthMe:%203.2%2c%20%012CompatNoCheatPlus:%206.4.5-SNAPSHOT-sMD5NET-b64%2c%20%0a%012NoCheatPlus:%203.10.8-SNAPSHOT-sMD5NET-b655%2c%20%012Factions:%202.3.0%2c%20%012ObsidianDestroyer:%204.1.3%2c%20%0a%012Sentry:%201.7.1%2c%20%012BattleArena:%203.9.5.8%2c%20%012FactionAlert:%200.1-Beta%0aLoaded%20Worlds:%20world%2c%20world_nether%2c%20world_the_end%0aOnline%20Players:%20TheRealKeith%017(TheRealKeith)%0a%0a10:50:45%20%5bINFO%5d%20%01e%2b%26gt;%20%018Executing%20'%01eEvent%018':%20%018Type%3d'%01eon%20entity%20damages%20entity%018'%20%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%018Container%3d'%01bLIFESTEAL1%01e(WORLD)%018'%20%20%018Player%3d'%01eTheRealKeith%018'%20%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%018Context%3d'%01e%7bcause%3dENTITY_ATTACK%2c%20damager%3dp%40TheRealKeith%2c%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20entity%3de%401645%2c%20damage%3d11.5%7d%018'%20%0a10:50:45%20%5bINFO%5d%20%01d%2b-%20Building%20event%20'ON%20ENTITY%20DAMAGES%20ENTITY'%20for%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20LIFESTEAL1%20---------%2b%20%0a10:50:45%20%5bINFO%5d%20%01d%20%01fStarting%20InstantQueue%20'ENEENNDNIE'...%20%0a10:50:45%20%5bINFO%5d%20%01d%2b-%20Executing%20dCommand:%20IF/TheRealKeith%20---------%2b%20%0a10:50:45%20%5bINFO%5d%20%01d%20%01fFilled%20tag%20%26lt;context.damager.is_player%26gt;%20with%20'true'.%20%0a10:50:45%20%5bINFO%5d%20%01d%20%01f%01eComparable%201:%20%01fLogic%3d'NEGATIVE'%2c%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Comparable%3d'Boolean(%01btrue%01f)'%2c%20Operator%3d'EQUALS'%2c%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ComparedTo%3d'Boolean(%01btrue%01f)'%20%01e--%26gt;%20OUTCOME%3d'false'%20%0a10:50:45%20%5bINFO%5d%20%01d%2b-%20Executing%20dCommand:%20IF/TheRealKeith%20---------%2b%20%0a10:50:45%20%5bINFO%5d%20%01d%20%01fFilled%20tag%20%26lt;player.item_in_hand.lore%26gt;%20with%20'li%40%01FType:%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Diamond%20Sword%7c%016An%20item%20only%20the%20legendary%20can%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20hold.%7c%016Lifesteal%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20III%7c%016(Socket)%7c%016(Socket)%7c%016(Socket)%7c%016(Socket)%7c%016(Socket)%7c%019%2b3%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Lifesteal%7c%014Lifesteal%20does%20not%20stack%7c%014Cannot%20lifesteal%20when%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Poisoned'.%20%0a10:50:45%20%5bINFO%5d%20%01d%20%01fFilled%20tag%20%26lt;player.has_effect%5bpoison%5d%26gt;%20with%20'false'.%20%0a10:50:45%20%5bINFO%5d%20%01d%20%01f%01eComparable%201:%20%01fComparable%3d'dList(%01bli%40%20Diamond%20Sword%7c%016An%20item%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20only%20the%20legendary%20can%20hold.%7c%016Lifesteal%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20III%7c%016(Socket)%7c%016(Socket)%7c%016(Socket)%7c%016(Socket)%7c%016(Socket)%7c%019%2b3%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Lifesteal%7c%014Lifesteal%20does%20not%20stack%7c%014Cannot%20lifesteal%20when%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Poisoned%01f)'%2c%20Operator%3d'CONTAINS'%2c%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ComparedTo%3d'String(%01bLifesteal%01f)'%20%01e--%26gt;%20OUTCOME%3d'false'%20%0a10:50:45%20%5bINFO%5d%20%01d%20%01f%01eComparable%202:%20%01fLogic%3d'NEGATIVE'%2c%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Comparable%3d'Boolean(%01bfalse%01f)'%2c%20Operator%3d'EQUALS'%2c%20%0a%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ComparedTo%3d'Boolean(%01btrue%01f)'%20%01e--%26gt;%20OUTCOME%3d'true'%20%0a10:50:45%20%5bINFO%5d%20%01d%20%01fCompleting%20queue%20'ENEENNDNIE'.
-#
-# d W o r l d E d i t o r
-#
-#
-# Authors: |Anthony|, mcmonkey
-# Version: 0.21
-# dScript Version: 0.9.6-DEV-b54
-#
-#
-#
-#--- About this script
-#
-# This is a basic recreation of WorldEdit in denizen
-#
-#--- Permission nodes
-# dwe.basic: use the /dwe command
-# dwe.admin: Admin commands
-# dwe.chunk: Set the chunk you are standing in as your selection
-# dwe.contract: Contract your region selection
-# dwe.expand: Expand your region selection
-# dwe.inset: Inset your region selection
-# dwe.outset: Outset your region selection
-# dwe.pos: Use commands to set selection positions
-# dwe.set: Set the blocks in a selection
-# dwe.shift: Shift your selection
-# dwe.show: Show your current region selection
-# dwe.wand: Get the region selection wand
-# dwe.undo: Undo previous edits
-#
-#
-# TODO:
-# - Selection
-# - Inset
-# - Outset
-# - Shift
-# - Editing & Clipboard
-# - Copy
-# - Paste
-# - Stack
-# - Rotate
-# - Permissions
-# - Permissions for each individual command
-# - Parent permissions for categories (selection,tool,navigation)
-# - Config File
-# - Maxblocks to change per operation
-# - Undo history size
-# - async-blockedit
-#
-#
-################################################################################
-#
-# dWE World Events Script
-#
-# This should cover all dWE related world events.
-#
-dWE_Events:
- type: world
- debug: false
- events:
- on player clicks block:
- - if <c.item.scriptname.split[_].get[1].is[!=].to[dWE]||true> queue clear
- - determine passively CANCELLED
- - inject <c.item.scriptname.as_script> instantly
-
-dWE_Msg:
- type: item
- debug: false
- material: i@human_skull
- display name: "<&4> [<&6>dWE<&4>]"
- lore:
- - <&5>Click for Help
- script:
- - ^define text '<&4>[<&6>dWE<&4>]'
- - ^define hover '{<i@dWE_Msg.json>}'
- - ^define click '/dwe help'
- - ^define button "text:'%text%',clickEvent:{action:run_command,value:'%click%'},hoverEvent:{action:show_item,value:'%hover%'}"
- - ^define spacer "text:' '"
- - ^define msg "text:'%1%'"
- - ^execute as_server "tellraw <player.name> {text:'',extra:[{%button%},{%spacer%},{%msg%}]}"
-
- set_Pos:
- - inject s@dWE_Commands p:selection_Size instantly
- - run s@dWE_Msg 'def:<&f>POS%pos%<&co> <&3><&o><def[pos%pos%].replace[,].with[<&7>, <&3><&o>]> <&7>(<&o>%size%<&7>)'
-
- set_pos1:
- - run s@dWE_Msg 'def:<&f>Selection started at <&3><&o><def[cuboid].min.simple.replace[,].with[<&7>,<&3><&o>]>'
-
- set_pos2:
- - inject s@dWE_Commands p:selection_Size instantly
- - run s@dWE_Msg 'def:<&f>Selection expanded to include<&co> <&3><&o><context.location.simple.replace[,].with[<&7>,<&3><&o>]> <&7>(<&o>%size%<&7>)'
-
- shift:
- - inject s@dWE_Commands p:selection_Size instantly
- - run s@dWE_Msg 'def:<&f>Shifted<&f> <&7><&o>%direction% <&7>by <&o>%n% <&7>blocks (<&o>%size%<&7>)'
-
- expand:
- - inject s@dWE_Commands p:selection_Size instantly
- - define expandBy '<def[size].sub[%oldSize%].as_int>'
- - run s@dWE_Msg 'def:<&f>Expanded<&f> <&7><&o>%direction% <&7>by <&o>%expandBy% <&7>blocks (<&o>%size%<&7>)'
-
- contract:
- - inject s@dWE_Commands p:selection_Size instantly
- - define contractBy '<def[oldSize].sub[%size%].as_int>'
- - run s@dWE_Msg 'def:<&f>Contracted<&f> <&7><&o>%direction% <&7>by <&o>%contractBy% <&7>blocks (<&o>%size%<&7>)'
-
- inset:
- - inject s@dWE_Commands p:selection_Size instantly
- - define insetBy '<def[oldSize].sub[%size%].as_int>'
- - run s@dWE_Msg 'def:<&f>Inset<&f> <&7>by <&o>%insetBy% <&7>blocks (<&o>%size%<&7>)'
-
- outset:
- - inject s@dWE_Commands p:selection_Size instantly
- - define outsetBy '<def[size].sub[%oldSize%].as_int>'
- - run s@dWE_Msg 'def:<&f>Outset<&f> <&7>by <&o>%outsetBy% <&7>blocks (<&o>%size%<&7>)'
-
-dWE_Wand:
- type: item
- debug: false
- material: m@wood_axe
- display name: dWE Region Selector
- lore:
- - <&7><&o>Left<&7> click to start a selection
- - <&7><&o>Right<&7> click to expand the selection
-
- script:
- - if !<player.has_permission[dwe.wand]||<player.is_op>> {
- - take i@dWE_Wand
- - run s@dWE_Msg 'def:<&4><&l>ERROR<&co> <&a>You should not have this!' instantly
- - queue clear
- }
- - if <c.click_type.is[==].to[LEFT_CLICK_BLOCK]> define pos 1
- else if <c.click_type.is[==].to[RIGHT_CLICK_BLOCK]> define pos 2
- else queue clear
- - define pos1 '<player.flag[dWEWand].as_list.get[1]||null>'
- - define pos2 '<player.flag[dWEWand].as_list.get[2]||null>'
- - define type '<player.flag[dWEWand_Type]||cuboid>'
- - if <li@cuboid|extender.contains[%type%]||false> inject locally %type%
- else inject locally cuboid
-
- cuboid:
- - if <context.location.simple.is[==].to[<def[pos%pos%]>]||false> {
- - run s@dWE_Msg 'def:<&c>pos%pos% is already set'
- - queue clear
- }
- - define pos%pos% '<context.location.simple>'
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
- - inject s@dWE_Msg p:set_Pos
-
- extender:
- - define cuboid cu@%pos1%|%pos2%
- - if %pos% == 1 {
- - define cuboid cu@<context.location.simple>|<context.location.simple>
- }
- else {
- - if %pos1% == null {
- - run s@DWE_Msg 'Def:<&c>You must begin a selection before you can expand it.'
- - queue clear
- }
- - define cuboid_old %cuboid%
- - define cuboid <def[cuboid].include[<context.location.simple>]>
- - if <def[cuboid_old]> == <def[cuboid]> {
- - run s@dWE_Msg 'def:<&c>That position is already included.'
- - queue clear
- }
- }
- - define pos1 '<def[cuboid].min>'
- - define pos2 '<def[cuboid].max>'
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
- - inject s@dWE_Msg p:set_pos%pos%
-
-
-################################################################################
-#
-# Denizen World Editor Command Script Container
-#
-# This script covers all dWE commands
-#
-#
-#
-#--------------------------------------
-#
-# dWE Command Script Basics
-#
-# The basic stuff required in a command script container
-#
-dWE_Commands:
- type: command
- debug: false
- name: dwe
- description: Denizen World Editor
- usage: /dwe
- aliases: ''
- allowed help:
- - determine <player.has_permission[dwe.basic]||<player.is_op>>
- script:
- - if !<player.has_permission[dwe.basic]||<player.is_op>> {
- - narrate "<red>You do not have permission to use this command."
- - queue clear
- }
- - define arg1 '<c.args.get[1].escaped||help>'
- - define args 'li@help|wand|expand|contract|inset|outset|shift|pos1|pos2|hpos1|hpos2|sphere|chunk|show|set|undo'
- - if !<def[args].contains[%arg1%]> inject locally help instantly
- else inject locally %arg1% instantly
-
-#
-# END dWE Command Script Basics
-#--------------------------------------
-#
-# dWE Command Arguments
-#
-# Each of these subscripts is an argument for the root command.
-#
- help:
- - if <player.has_permission[dwe.admin]||<player.is_op||<context.server>>> inject locally msgsHelpAdmin instantly
- else inject locally msgsHelpUser instantly
- - inject locally msgsFooter instantly
- - queue clear
-
- wand:
- # /dwe wand (-type [cuboid/extender])
- - if !<player.has_permission[dwe.wand]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - if <c.args.find[-type].is[OR_MORE].than[0]||false> {
- - define type <c.args.get[<c.args.find[-type].add[1].as_int>]||null>
- - if <li@cuboid|extender.contains[%type%]||false> {
- - run s@dWE_Msg 'def:<&7><&o>Now using the <&f><&o>%type% <&7><&o>selection wand'
- - flag player 'dWEWand_Type:%type%'
- }
- else {
- - run s@dWE_Msg 'def:<&4><&l>ERROR<&co> <&c>Unknown type!'
- - run s@dWE_Msg 'def:<&c>SYNTAX<&co> <&e>/dwe -type <&6><&lb><&7>cuboid/extender<&6><&rb>'
- }
- - queue clear
- }
- - give i@dWE_Wand
- - define type '<player.flag[dWEWand_Type]||cuboid>'
- - if <def[type].is[==].to[cuboid]> {
- - run s@dWE_Msg 'def:<&a>Left click to select pos1'
- - run s@dWE_Msg 'def:<&a>Right click to select pos2'
- }
- else {
- - run s@dWE_Msg 'def:<&a>Left click to start a selection,'
- - run s@dWE_Msg 'def:<&a>Right click to expand the selection.'
- }
- - queue clear
-
-#
-#-----------------------------
-# Selection Commands
-#
- show:
- - if !<player.has_permission[dwe.show]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - define pos1 '<player.flag[dWEWand].get[1].as_location||null>'
- - define pos2 '<player.flag[dWEWand].get[2].as_location||null>'
- - if <def[pos1].is[==].to[null]> run s@dWE_Msg 'def:<&c>Must select corner 1 with left-click.'
- else if <def[pos2].is[==].to[null]> run s@dWE_Msg 'def:<red>Must select corner 2 with right-click.'
- else showfake m@blue_stained_glass <cu@%pos1%|%pos2%.get_outline> to:<player> d:10s
-
- pos1:
- - if !<player.has_permission[dwe.pos]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - define pos1 '<player.flag[dWEWand].as_list.get[1]||null>'
- - if <player.location.simple.is[==].to[%pos1%]> {
- - run s@dWE_Msg 'def:<&c>pos1 is already set'
- - queue clear
- }
- - define pos1 '<player.location.simple>'
- - define pos2 '<player.flag[dWEWand].as_list.get[2]||null>'
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
- - define pos 1
- - inject s@dWE_Msg p:set_Pos
-
- pos2:
- - if !<player.has_permission[dwe.pos]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - define pos2 '<player.flag[dWEWand].as_list.get[2]||null>'
- - if <player.location.simple.is[==].to[%pos2%]> {
- - run s@dWE_Msg 'def:<&c>pos2 is already set'
- - queue clear
- }
- - define pos1 '<player.flag[dWEWand].as_list.get[1]||null>'
- - define pos2 '<player.location.simple>'
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
- - define pos 2
- - inject s@dWE_Msg p:set_Pos
-
- hpos1:
- - if !<player.has_permission[dwe.pos]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - define pos1 '<player.flag[dWEWand].as_list.get[1]||null>'
- - if <player.location.cursor_on[160].simple.is[==].to[%pos1%]> {
- - run s@dWE_Msg 'def:<&c>pos1 is already set'
- - queue clear
- }
- - define pos1 '<player.location.cursor_on[160].simple>'
- - define pos2 '<player.flag[dWEWand].as_list.get[2]||null>'
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
- - define pos 1
- - inject s@dWE_Msg p:set_Pos
-
- hpos2:
- - if !<player.has_permission[dwe.pos]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - define pos2 '<player.flag[dWEWand].as_list.get[2]||null>'
- - if <player.location.cursor_on[160].simple.is[==].to[%pos2%]> {
- - run s@dWE_Msg 'def:<&c>pos2 is already set'
- - queue clear
- }
- - define pos1 '<player.flag[dWEWand].as_list.get[1]||null>'
- - define pos2 '<player.location.cursor_on[160].simple>'
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
- - define pos 2
- - inject s@dWE_Msg p:set_Pos
-
- chunk:
- - if !<player.has_permission[dwe.chunk]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - define pos1 '<player.location.get_chunk.cuboid.min>'
- - define pos2 '<player.location.get_chunk.cuboid.max>'
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
- - run s@dWE_Msg 'def:<&f>Chunk selected<&co> <player.location.get_chunk.replace[ch@].split[,].get[1|2].comma_separated>'
-
- expand:
- # /dwe expand <amount/v> (n/s/e/w/u/d)
- - define command 'expand'
- - inject locally prerun instantly
- - if <c.args.get[2].escaped.is[==].to[v]||false> {
- - define pos1 '<def[pos1].sub[0,<def[pos1].y>,0].replace[l@]>'
- - define pos2 '<def[pos2].add[0,<el@val[255].sub[<def[pos2].y>]>,0].replace[l@]>'
-# - define pos1 '<def[pos1].x>,0,<def[pos1].z>'
-# - define pos2 '<def[pos2].x>,255,<def[pos2].z>'
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
- - define direction 'Vertically'
- - inject s@dWE_Msg p:expand
- - queue clear
- }
-
- - define n '<c.args.get[2].escaped.round_up||0>'
- - define d '<c.args.get[3].escaped||0>'
- - if <def[n].is[OR_LESS].than[0]||true> {
- - run s@dWE_Msg 'def:<&c>SYNTAX<&co> <&e>/dwe expand <&6><&lb><&7>amount/v<&6><&rb> <&6>(<&7>direction<&6>)'
- - queue clear
- }
- - if <el@[li@n|e|s|w|u|d].contains[%d%].not||true> define d '<proc[getFacing].context[<player.location.pitch.as_money>|<player.location.yaw.as_money>]>'
- - if <el@[li@n|e|s|w|u|d].contains[%d%].not||true> {
- - run s@dWE_Msg 'def:<&4><&l>ERROR<&co> <&c>Unknown direction!'
- - queue clear
- }
- - if <def[d].is[==].to[n]||false> {
- - if <def[pos1].z.is[OR_LESS].than[<def[pos2].z>]> define pos1 '<def[pos1].sub[0,0,%n%]>'
- else define pos2 '<def[pos2].sub[0,0,%n%]>'
- - define direction 'North'
- - inject s@dWE_Msg p:expand
- }
- else if <def[d].is[==].to[e]||false> {
- - if <def[pos1].x.is[OR_MORE].than[<def[pos2].x>]> define pos1 '<def[pos1].add[%n%,0,0]>'
- else define pos2 '<def[pos2].add[%n%,0,0]>'
- - define direction 'East'
- - inject s@dWE_Msg p:expand
- }
- else if <def[d].is[==].to[s]||false> {
- - if <def[pos1].z.is[OR_MORE].than[<def[pos2].z>]> define pos1 '<def[pos1].add[0,0,%n%]>'
- else define pos2 '<def[pos2].add[0,0,%n%]>'
- - define direction 'South'
- - inject s@dWE_Msg p:expand
- }
- else if <def[d].is[==].to[w]||false> {
- - if <def[pos1].x.is[OR_LESS].than[<def[pos2].x>]> define pos1 '<def[pos1].sub[%n%,0,0]>'
- else define pos2 '<def[pos2].sub[%n%,0,0]>'
- - define direction 'West'
- - inject s@dWE_Msg p:expand
- }
- else if <def[d].is[==].to[u]||false> {
- - if <def[pos1].y.is[OR_MORE].than[<def[pos2].y>]> define pos1 '<def[pos1].add[0,%n%,0]>'
- else define pos2 '<def[pos2].add[0,%n%,0]>'
- - define direction 'Up'
- - inject s@dWE_Msg p:expand
- }
- else if <def[d].is[==].to[d]||false> {
- - if <def[pos1].y.is[OR_LESS].than[<def[pos2].y>]> define pos1 '<def[pos1].sub[0,%n%,0]>'
- else define pos2 '<def[pos2].sub[0,%n%,0]>'
- - define direction 'Down'
- - inject s@dWE_Msg p:expand
- }
- else {
- - run s@dWE_Msg 'def:<&4><&l>ERROR<&co> <&c>An impossible error occurred while expanding your selection!'
- - queue clear
- }
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
-
- contract:
- # /dwe contract <amount> (n/s/e/w/u/d)
- - define command 'contract'
- - inject locally prerun instantly
- - define n '<c.args.get[2].escaped.round_up||0>'
- - define d '<c.args.get[3].escaped||0>'
- - if <def[n].is[OR_LESS].than[0]||true> {
- - run s@dWE_Msg 'def:<&c>SYNTAX<&co> <&e>/dwe contract <&6><&lb><&7>amount<&6><&rb> <&6>(<&7>direction<&6>)'
- - queue clear
- }
- - if <el@[li@n|e|s|w|u|d].contains[%d%].not||true> define d '<proc[getFacing].context[<player.location.pitch.as_money>|<player.location.yaw.as_money>]>'
- - if <el@[li@n|e|s|w|u|d].contains[%d%].not||true> {
- - run s@dWE_Msg 'def:<&4><&l>ERROR<&co> <&c>Unknown direction!'
- - queue clear
- }
- - if <def[d].is[==].to[n]||false> {
- - if <def[pos1].z.is[OR_LESS].than[<def[pos2].z>]> define pos2 '<def[pos2].sub[0,0,%n%]>'
- else define pos1 '<def[pos1].sub[0,0,%n%]>'
- - define direction 'North'
- - inject s@dWE_Msg p:contract
- }
- else if <def[d].is[==].to[e]||false> {
- - if <def[pos1].x.is[OR_MORE].than[<def[pos2].x>]> define pos2 '<def[pos2].add[%n%,0,0]>'
- else define pos1 '<def[pos1].add[%n%,0,0]>'
- - define direction 'East'
- - inject s@dWE_Msg p:contract
- }
- else if <def[d].is[==].to[s]||false> {
- - if <def[pos1].z.is[OR_MORE].than[<def[pos2].z>]> define pos2 '<def[pos2].add[0,0,%n%]>'
- else define pos1 '<def[pos1].add[0,0,%n%]>'
- - define direction 'South'
- - inject s@dWE_Msg p:contract
- }
- else if <def[d].is[==].to[w]||false> {
- - if <def[pos1].x.is[OR_LESS].than[<def[pos2].x>]> define pos2 '<def[pos2].sub[%n%,0,0]>'
- else define pos1 '<def[pos1].sub[%n%,0,0]>'
- - define direction 'West'
- - inject s@dWE_Msg p:contract
- }
- else if <def[d].is[==].to[u]||false> {
- - if <def[pos1].y.is[OR_MORE].than[<def[pos2].y>]> define pos2 '<def[pos2].add[0,%n%,0]>'
- else define pos1 '<def[pos1].add[0,%n%,0]>'
- - define direction 'Up'
- - inject s@dWE_Msg p:contract
- }
- else if <def[d].is[==].to[d]||false> {
- - if <def[pos1].y.is[OR_LESS].than[<def[pos2].y>]> define pos2 '<def[pos2].sub[0,%n%,0]>'
- else define pos1 '<def[pos1].sub[0,%n%,0]>'
- - define direction 'Down'
- - inject s@dWE_Msg p:contract
- }
- else {
- - run s@dWE_Msg 'def:<&4><&l>ERROR<&co> <&c>An impossible error occurred while contracting your selection!'
- - queue clear
- }
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
-
- inset:
- # /dwe inset <number> -h
- - define command 'inset'
- - inject locally prerun instantly
- - define n '<c.args.filter[is[matches].to[number]].get[1]||0>'
- - if <def[n].is[OR_LESS].than[0]||true> {
- - run s@dWE_Msg 'def:<&c>SYNTAX<&co> <&e>/dwe inset <&6><&lb><&7>amount<&6><&rb> <&6>(<&7>-h<&6>)'
- - queue clear
- }
- - define cuboid cu@%pos1%|%pos2%
- - if '<c.args.contains[-h].not||false>' define cuboid 'cu@<def[cuboid].min.add[0,%n%,0]>|<def[cuboid].max.sub[0,%n%,0]>'
- - define cuboid 'cu@<def[cuboid].min.add[%n%,0,%n%]>|<def[cuboid].max.sub[%n%,0,%n%]>'
- - define pos1 '<def[cuboid].min>'
- - define pos2 '<def[cuboid].max>'
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
- - inject s@dWE_Msg p:inset
-
- outset:
- # /dwe outset <number> -h
- - define command 'outset'
- - inject locally prerun instantly
- - define n '<c.args.filter[is[matches].to[number]].get[1]||0>'
- - if <def[n].is[OR_LESS].than[0]||true> {
- - run s@dWE_Msg 'def:<&c>SYNTAX<&co> <&e>/dwe outset <&6><&lb><&7>amount<&6><&rb> <&6>(<&7>-h<&6>)'
- - queue clear
- }
- - define cuboid cu@%pos1%|%pos2%
- - if '<c.args.contains[-h].not||false>' define cuboid 'cu@<def[cuboid].min.sub[0,%n%,0]>|<def[cuboid].max.add[0,%n%,0]>'
- - define cuboid 'cu@<def[cuboid].min.sub[%n%,0,%n%]>|<def[cuboid].max.add[%n%,0,%n%]>'
- - define pos1 '<def[cuboid].min>'
- - define pos2 '<def[cuboid].max>'
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
- - inject s@dWE_Msg p:outset
-
- shift:
- # /dwe shift <amount> (n/s/e/w/u/d)
- - define command 'shift'
- - inject locally prerun instantly
- - define n '<c.args.get[2].escaped.round_up||0>'
- - define d '<c.args.get[3].escaped||0>'
- - if <def[n].is[OR_LESS].than[0]||true> {
- - run s@dWE_Msg 'def:<&c>SYNTAX<&co> <&e>/dwe shift <&6><&lb><&7>amount<&6><&rb> <&6>(<&7>direction<&6>)'
- - queue clear
- }
- - if <el@[li@n|e|s|w|u|d].contains[%d%].not||true> define d '<proc[getFacing].context[<player.location.pitch.as_money>|<player.location.yaw.as_money>]>'
- - if <el@[li@n|e|s|w|u|d].contains[%d%].not||true> {
- - run s@dWE_Msg 'def:<&4><&l>ERROR<&co> <&c>Unknown direction!'
- - queue clear
- }
- - define direction '<def[d].replace[s].with[South].replace[e].with[East].replace[w].with[West].replace[n].with[North]>'
- - define n_math 'sub'
- - define n_coord '0,0,%n%'
- - define s_math 'add'
- - define s_coord '0,0,%n%'
- - define w_math 'sub'
- - define w_coord '%n%,0,0'
- - define e_math 'add'
- - define e_coord '%n%,0,0'
- - define d_math 'sub'
- - define d_coord '0,%n%,0'
- - define u_math 'add'
- - define u_coord '0,%n%,0'
- - define math '<def[%d%_math]>'
- - define coord '<def[%d%_coord]>'
- - repeat 2 {
- - define pos%value% '<def[pos%value%].%math%[%coord%]>'
- }
- - inject s@dWE_Msg p:shift
- - flag player dWEWand:!
- - flag player dWEWand:|:%pos1%|%pos2%
-
-
-
-# END Selection Commands
-#-----------------------------
-# Editing Commands
-#
-
- set:
- # /dwe set <material>
- - define command 'set'
- - inject locally prerun instantly
- - define material <c.args.get[2]||null>
- - if %material% !matches material {
- - run s@dWE_Msg 'def:<&c>Must specify a valid material.'
- - queue clear
- }
-# - define blocks <cu@%pos1%|%pos2%.get_blocks>
- - define undoMaterials <def[blocks].parse[material.full]>
-# - ~modifyblock %blocks% %material% delayed
- - ~modifyblock cu@%pos1%|%pos2% %material% delayed
- - flag player 'dWE_UndoHistory:->:set_blocks;cu@%pos1%|%pos2%;%undoMaterials%'
- - run s@dWE_Msg 'def:Set complete!'
-
- sphere:
- # /dwe sphere <x>,[<y>,<z>] <material>
- - define command 'sphere'
- - inject locally utility_prerun instantly
- - define size <c.args.get[2]||null>
- - define material <c.args.get[3]||null>
- - define commas <def[size].to_list.count[,]>
- - if %commas% != 2 && %commas% != 0 {
- - run s@dWE_Msg 'def:<&c>/dwe sphere <x>,[<y>,<z>] <material>'
- - queue clear
- }
- - if %material% !matches material {
- - run s@dWE_Msg 'def:<&c>/dwe sphere <x>,[<y>,<z>] <material>'
- - queue clear
- }
- - if %commas% == 0 {
- - define size %size%,%size%,%size%
- }
- - if <def[size].contains[@]> || <def[size].is[matches].to[location]> {
- - run s@dWE_Msg 'def:<&c>/dwe sphere <x>,[<y>,<z>] <material>'
- - queue clear
- }
- - define ellipsoid ellipsoid@<player.location.simple>,%size%
-# - define blocks <def[ellipsoid].get_blocks>
- - define undoMaterials <def[blocks].parse[material.full]>
-# - ~modifyblock %blocks% %material% delayed
- - ~modifyblock %ellipsoid% %material% delayed
- - flag player 'dWE_UndoHistory:->:set_blocks;<def[ellipsoid]>;%undoMaterials%'
- - run s@dWE_Msg 'def:Set complete!'
-
- copy:
- # /dwe copy
- - define command 'set'
- - inject locally prerun instantly
- - define blocks '<cu@%pos1%|%pos2%.get_blocks>'
- - flag player dWE_Clipboard:!
- - flag player 'dWE_Clipboard:|:<def[blocks].parse[material]>'
- - run s@dWE_Msg 'def:<&7><&o>Selection saved to clipboard'
-
- paste:
- # /dwe paste
- - if !<player.has_permission[dwe.paste]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - narrate "stub"
-
- rotate:
- # /dwe rotate <90/180/270/360>
- - if !<player.has_permission[dwe.rotate]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - narrate "stub"
-
- undo:
- - if !<player.has_permission[dwe.undo]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - define last_action '<player.flag[dWE_UndoHistory].as_list.last||null>'
- - if <def[last_action].is[==].to[null]> run s@dWE_Msg 'def:<&6>Nothing to undo!'
- else {
- - inject locally 'p:undo_<def[last_action].split[;].get[1]>'
- - flag player 'dWE_UndoHistory:<-:%last_action%'
- }
-
-#
-# END dWE Command Arguments
-#--------------------------------------
-#
-# dWE Command Utilities
-#
-# Just some commonly used code blocks
-#
- prerun:
- - if !<player.has_permission[dwe.%command%]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
- - define pos1 '<player.flag[dWEWand].get[1].as_location||null>'
- - define pos2 '<player.flag[dWEWand].get[2].as_location||null>'
- - if <def[pos1].is[==].to[null]>
- || <def[pos2].is[==].to[null]> {
- - run s@dWE_Msg 'def:<&c>No region selected!'
- - queue clear
- }
- - inject s@dWE_Commands p:selection_Size instantly
- - define oldSize '%size%'
-
- utility_prerun:
- - if !<player.has_permission[dwe.%command%]||<player.is_op||false>> {
- - inject locally help
- - queue clear
- }
-
- undo_set_blocks:
-# - define cuboid '<def[last_action].split[;].get[2].get_blocks||null>'
- - define selection '<def[last_action].split[;].get[2]||null>'
- - define materials '<def[last_action].split[;].get[3]||li@>'
-# - ~modifyblock %cuboid% %materials% delayed
- - ~modifyblock %selection% %materials% delayed
- - run s@dWE_Msg 'def:<&a>Undo complete!'
-
- selection_Size:
- - define x '<def[pos1].as_location.x.sub[<def[pos2].as_location.x||<c.location.x>>].abs.add[1]||1>'
- - define y '<def[pos1].as_location.y.sub[<def[pos2].as_location.y||<c.location.y>>].abs.add[1]||1>'
- - define z '<def[pos1].as_location.z.sub[<def[pos2].as_location.z||<c.location.z>>].abs.add[1]||1>'
- - define size '<def[x].mul[%y%].mul[%z%].as_int||0>'
-
-#
-# END dWE Command Utilities
-#--------------------------------------
-#
-# dWE Command Messages
-#
-# These are not complete! They are mostly just stubs till the rest is fleshed out!
-#
- msgsHeader:
- - narrate "<&5>|----------------------------------------|"
- - narrate "<&5>|<&sp><&sp><&sp><&6>dWorldEditor <&7>%msgsHeaderTitle%"
- - narrate "<&5>|<&f>"
-
- msgsFooter:
- - define anthony "text:'<&7>|Anthony|',clickEvent:{action:open_url,value:'http://mineconomy.org'},hoverEvent:{action:show_item,value:'{<i@dwe_Author_Anthony.json>}'}"
- - define morphan "text:'<&7>Morphan1',clickEvent:{action:open_url,value:'http://en.wikipedia.org/wiki/Candy'},hoverEvent:{action:show_item,value:'{<i@dwe_Author_Morphan1.json>}'}"
- - define mcmonkey "text:'<&7>mcmonkey',clickEvent:{action:open_url,value:'http://mcmonkey.org'},hoverEvent:{action:show_item,value:'{<i@dwe_Author_mcmonkey.json>}'}"
- - define spacer "text:' '"
- - define prefix "text:'<&5>| <&f>Authors: '"
- - execute as_server "tellraw <player.name> {text:'',extra:[{%prefix%},{%anthony%},{%spacer%},{%morphan%},{%spacer%},{%mcmonkey%}]}"
- - narrate "<&d>|-----------S-c-r-o-l-l---U-p-------------|"
-
- msgsHelpAdmin:
- - define msgsHeaderTitle 'Admin Help'
- - inject locally msgsHeader instantly
- - narrate "<&5>|<&sp><&sp><&sp><&f>"
- - narrate "<&5>|<&sp><&sp><&f>"
- - narrate "<&5>|<&sp><&sp><&f>"
- - narrate "<&5>|<&sp><&sp><&f>"
- - narrate "<&5>|<&sp><&sp><&f>"
- - narrate "<&5>|<&sp><&sp><&f>"
- - narrate "<&5>|<&sp><&f>"
-
- msgsHelpUser:
- - define msgsHeaderTitle 'User Help'
- - inject locally msgsHeader instantly
- - narrate "<&5>|<&sp><&sp><&sp><&sp><&f>"
- - narrate "<&5>|<&sp><&sp><&f>"
- - narrate "<&5>|<&sp><&sp><&f>"
- - narrate "<&5>|<&sp><&f>"
-
-#
-# END dWE Command Messages
-#--------------------------------------
-#
-# other utilities
-#
-# These are not complete! They are mostly just stubs till the rest is fleshed out!
-#
-
-
-# Usage: <proc[getFacing].context[%pitch%|%yaw%]>
-getFacing:
- type: procedure
- definitions: pitch|yaw
- script:
- - if <def[pitch].is[OR_MORE].than[45]||false> determine d
- else if <def[pitch].is[OR_LESS].than[-45]||false> determine u
- else if <def[yaw].is[OR_MORE].than[337.5]||false> || <def[yaw].is[LESS].than[22.5]||false> determine s
- else if <def[yaw].is[OR_MORE].than[292.5]||false> determine se
- else if <def[yaw].is[OR_MORE].than[247.5]||false> determine e
- else if <def[yaw].is[OR_MORE].than[202.5]||false> determine ne
- else if <def[yaw].is[OR_MORE].than[157.5]||false> determine n
- else if <def[yaw].is[OR_MORE].than[112.5]||false> determine nw
- else if <def[yaw].is[OR_MORE].than[67.5]||false> determine w
- else if <def[yaw].is[OR_MORE].than[22.5]||false> determine sw
- else determine 0
-
-#
-# END other utilities
-#--------------------------------------
-#
-# dWE author banner items
-#
-# Banner items representing the authors
-#
-dwe_Author_mcmonkey:
- type: item
- material: creeper_skull
- display name: <&2><&l>MCMONKEY
- lore:
- - <&a>Click to visit http://mcmonkey.org
-
-dwe_Author_Morphan1:
- type: item
- material: creeper_skull
- display name: <&2><&l>Morphan1
- lore:
- - <&a>pls2buymesome
-
-dwe_Author_Anthony:
- type: item
- material: i@human_skull
- display name: "<&f> |Anthony|"
- lore:
- - <&7> Owner<&co> <&e>M<&6>ine<&e>C<&6>onomy <&e>N<&6>etwork
- - <&5>-------------------------
- - <&7>
- - <&7> I`ve been playing minecraft
- - <&7> and running a server since
- - <&7> 2010. I have fun and share
- - <&7> what I do.
- - <&7>
- - <&9> Click To Visit
-#
-# END dWE author banner items
-#--------------------------------------