Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix : &c[&aWorld Regenerate&c]&r
- variables:
- {BlockType::*} = 0
- {BlockLoc::*) = 0
- {Count} = 0
- {DebugState.%player%} = 0
- on mine:
- set {BlockType::%{Count}%} to type of block
- set {BlockLoc::%{Count}%} to location of block
- if {DebugState.%event-player%} is 1:
- message "{@prefix} &cBlock Break:"
- message "{@prefix} &cType: %{BlockType::%{Count}%}%"
- message "{@prefix} &cLocation: %{BlockLoc::%{Count}%}%"
- message " "
- add 1 to {Count}
- on place:
- set {BlockType::%{Count}%} to air
- set {BlockLoc::%{Count}%} to location of block
- if {DebugState.%event-player%} is 1:
- message "{@prefix} &aBlock Place"
- message "{@prefix} &aType: %{BlockType::%{Count}%}%"
- message "{@prefix} &aLocation: %{BlockLoc::%{Count}%}%"
- message " "
- add 1 to {Count}
- command /worldregenerate <text>:
- description: To let you regenerate what you have placed or destroyed
- usage: &e/wrg help &afor more help
- aliases: /wr, /wrg
- trigger:
- if player has permission "WorldRegenerate.admin":
- if arg-1 is "reset" or "rs":
- set {_BlockLocTempCount} to 1
- loop {BlockLoc::*}:
- delete {BlockLoc::%{_BlockLocTempCount}%}
- delete {BlockType::%{_BlockLocTempCount}%}
- add 1 to {_BlockLocTempCount}
- set {Count} to 0
- message "{@prefix} &cYou resetted all data of block and they no longer can be regenerated."
- if arg-1 is "regen" or "regenerate" or "rg" or "r":
- broadcast "{@prefix} &aBlocks to regenerate: &e%{Count}%"
- loop {BlockLoc::*}:
- remove 1 from {Count}
- if {DebugState.%event-player%} is 1:
- broadcast " "
- broadcast "{@prefix} &aRegenerating..."
- broadcast "{@prefix} &aBlock Location: %{BlockLoc::%{Count}%}%"
- broadcast "{@prefix} &aBlock Type: %{BlockType::%{Count}%}%"
- broadcast " "
- set block at {BlockLoc::%{Count}%} to {BlockType::%{Count}%}
- set {_BlockLocRegenTempCount} to 1
- loop {BlockLoc::*}:
- delete {BlockLoc::%{_BlockLocRegenTempCount}%}
- delete {BlockType::%{_BlockLocRegenTempCount}%}
- add 1 to {_BlockLocRegenTempCount}
- set {Count} to 0
- broadcast "{@prefix} &aRegenerate complete."
- if arg-1 is "debug" or "d" or "db":
- if {DebugState.%event-player%} is 0:
- set {DebugState.%event-player%} to 1
- message "{@prefix} &aYou turned on debug mode."
- stop
- if {DebugState.%event-player%} is 1:
- set {DebugState.%event-player%} to 0
- message "{@prefix} &cYou turned off debug mode."
- stop
- if arg-1 is "help" or "h" or "hp":
- message " "
- message "&a=================================================="
- message "&eAuthor: i998979"
- message "&cMain Command:"
- message "&aPermission: &eWorldRegenerate.admin"
- message " &e/worldregenerate <argument>"
- message " &aAliases: /wr, /wrg, /rg"
- message "&cSub Commands:"
- message " &eregenerate:"
- message " &aAliases: regen, rg, r"
- message " &aUsage: To regenerate the block that broke or placed"
- message " &ereset:"
- message " &aAliases: rs"
- message " &aUsage: To reset the database of all block"
- message " &aand they will no longer can be regenerated"
- message " &edebug:"
- message " &aAliases: d"
- message " &aUsage: To turn on/off the debug message"
- message " &athat shows what block was placed, destroyed"
- message " &aand the location of it"
- message " &ehelp:"
- message " &aAliases: h"
- message " &aUsage: To show this help menu"
- message "&a=================================================="
- message " "
- else:
- message "{@prefix} &cYou are not allowed to perform this command."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement