#Simple cuboid by sander758 # #Permissions # /ctool - simplecuboid.tool # /cpreview - simplecuboid.preview # /cnew - simplecuboid.new # /clist - simplecuboid.list # /cremove - simplecuboid.remove # /cteleport - simplecuboid.teleport cuboid_tool: type: item material: i@stone_axe display name: Cuboid Tool lore: - "Left click to set postion 1" - "Right click to set postion 2" cuboid_events: type: world debug: false events: on system time hourly: - webget "http://morphanone.space/webizen.aspx/tracker?script=63&version=1" on system time minutely: - execute as_server "denizen save" on chelp command: - determine passively FULFILLED - narrate "Simple cuboid plugin by sander758" - narrate " - /chelp Displays the cuboid commands" - narrate " - /ctool Get the tool" - narrate " - /cpreview (name) Shows the outline of the specified cuboid. If no cuboid specified the outline of the current selected locations will be visible" - narrate " - /cnew [name] Create a new cuboid" - narrate " - /clist [number] List of all cuboids" - narrate " - /cremove [name] Remove a cuboid" - narrate " - /cteleport [name] Teleport to the center of the specified cuboid" on ctool command: - determine passively FULFILLED - if || { - give cuboid_tool qty:1 - narrate "Giving cuboid tool" } else { - narrate "You dont have permission for that command!" } on cpreview command: - determine passively FULFILLED - if || { - if == nope { - if && { - if == { - narrate "Displaying the outline of the current selected locations" - define loc1 - define loc2 - define locations - async { - repeat 5 { - foreach { - playeffect effect:red_dust data:0 offset:0 qty:1 } - wait 10t } } } else { - narrate "Error: Please select 2 locations in the same world" } } else { - narrate "Error: Please select 2 valid locations" } } else { - if == nope { - narrate "Error: doesnt exist" } else { - narrate "Displaying the outline of " - define locations - async { - repeat 5 { - foreach { - playeffect effect:red_dust data:0 offset:0 qty:1 } - wait 10t } } } } } else { - narrate "You dont have permission for that command!" } on cnew command: - determine passively FULFILLED - if || { - if == nope { - narrate "Error: No cuboid name specified" } else { - if && { - if == { - if == nope { - narrate "Created a new cuboid as " - note cu@| as: } else { - narrate "Error: That name already exists" } } else { - narrate "Error: Please select 2 locations in the same world" } } else { - narrate "Error: Please select 2 valid locations" } } } else { - narrate "You dont have permission for that command!" } on clist command: - determine passively FULFILLED - if || { - narrate "Amount of cuboids: " - narrate "List:" - define page - define first - define last - foreach { - narrate "- " } - narrate "Page of /clist [number]" } else { - narrate "You dont have permission for that command!" } on cremove command: - determine passively FULFILLED - if || { - if == nope { - narrate "Error: No cuboid name specified" } else { - if == nope { - narrate "Error: doesnt exist" } else { - narrate "Removed cuboid" - note remove as: } } } else { - narrate "You dont have permission for that command!" } on cteleport command: - determine passively FULFILLED - if || { - if == nope { - narrate "Error: No cuboid name specified" } else { - if == nope { - narrate "Error: doesnt exist" } else { - narrate "Teleporting to the center of " - teleport } } } else { - narrate "You dont have permission for that command!" } on player right clicks block with cuboid_tool: - narrate "Set location 2 on " - flag player cuboidToolLoc2: on player left clicks block with cuboid_tool: - narrate "Set location 1 on " - flag player cuboidToolLoc1: on player breaks block: - if == i@CUBOID_TOOL { - determine passively CANCELLED }