Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Skript créé par : Zmolahah => http://dev.bukkit.org/profiles/Zmolahah/
- # Modifié par : HalCroves (Doc/LoD_Doc)
- # ----------------------------------------------------------------------------------------------
- options:
- Max-Land: 30 # The max land default players can claim.
- # Set to -1 for unlimited land claiming for default players)
- Max-Land-VIP: 60 # The max land VIP's can claim. Requires permission node land.claim.vip
- # Set to -1 for unlimited land claiming for VIP's)
- Max-Land-OP: -1 # The max land staff can claim. Requires permission node land.claim.op
- # Set to -1 for unlimited land claiming for staff)
- World: world # The world default players can claim.
- spawn_region : spawn_survie # If you have WorlGuard and you have a region 'Spawn', you can protect the region of command "/land"
- # ----------------------------------------------------------------------------------------------
- variables:
- {landclaims.%player%} = 0
- {claimedland.%player%} = 0
- on join:
- if {played.%player%} is not set:
- set {played.%player%} to true
- every 1 ticks in world "{@World}":
- loop all players:
- {chunk.%chunk at location of loop-player%} is not set:
- {landnotify.%loop-player%} is not "&6» The land is not claim.":
- send "&aThe land is free." to loop-player
- set {landnotify.%loop-player%} to "&6» The land is not claim."
- {landnotify.%loop-player%} is not {chunk.%chunk at location of loop-player%}:
- {chunk.%chunk at location of loop-player%} is not set:
- {landnotify.%loop-player%} is not "&6» The land is not claim.":
- send "&aThe land is free." to loop-player
- set {landnotify.%loop-player%} to "&6» The land is not claim."
- set {land.unclaim.%loop-player%} to true
- {chunk.%chunk at location of loop-player%} is set:
- send "&aThe land belongs to &e%{chunk.%chunk at location of loop-player%}%&a." to loop-player
- set {landnotify.%loop-player%} to {chunk.%chunk at location of loop-player%}
- {landnotify.%loop-player%} is not set:
- {chunk.%chunk at location of loop-player%} is not set:
- send "&aThe land is free." to loop-player
- set {landnotify.%loop-player%} to "&6» The land is not claim."
- set {land.unclaim.%loop-player%} to true
- on command "/land":
- wait 2 ticks
- if "%region at player%" contains "{@spawn_region}":
- cancel event
- message "LandClaim &9> &7Unable to claim this area !"
- #startfold
- command /land [<text>] [<offline player>]:
- description: For all land related commands
- usage: &c/land (claim, unclaim, add, remove)
- trigger:
- argument 1 is not set:
- message "-----------------------------------------------------"
- message "Number of claim &9> &7%{claimedland.%player%}%"
- message "-----------------------------------------------------"
- #subfold @help
- argument 1 is "help" or "h":
- message "-----------------------------------------------------"
- message "/land &9> &7To view the number of land claim"
- message "/land list &9> &7Affiche la liste de vos claim"
- message "/land claim &9> &7Displays your claim list"
- message "/land unclaim &9> &7For unclaim a field"
- message "/land info &9> &7Displays information about the field where you are"
- message "/land add <player> &9> &7Add a player to your claim"
- message "/land remove <player> &9> &7Delete a player from your claim"
- message "/land teleport &9> &7Teleport to your first claim"
- message "/land delhome &9> &7Delete your home"
- message "/land map &9> &7Displays a mini map"
- if player has permission "land.bypass":
- message "/land bypass &9> &7Access all claims"
- message "-----------------------------------------------------"
- #subfold @stats
- argument 1 is "info" or "i":
- if {chunk.%chunk at location of player%} is set:
- message "-----------------------------------------------------"
- message "Land Owner &9> &7 %{chunk.%chunk at location of player%}%"
- message "Authorized Member &9> &7 %{land.%chunk at location of player%::*}%"
- message "-----------------------------------------------------"
- stop
- message "&6This area currently owned by anyone.."
- stop
- #subfold @error
- argument 1 is "error":
- if player has permission "land.bypass":
- message "&cIncorrect use. Try '/land [info, list, teleport, delhome, claim, unclaim, add, remove, bypass, map] (player)'"
- else:
- message "&cIncorrect use. Try '/land [info, list, teleport, delhome, claim, unclaim, add, remove, bypass, map] (player)'"
- message "&7 ()'s = Options, []'s = Requis."
- stop
- #subfold @claim
- argument 1 is "claim" or "c":
- if {chunk.%chunk at location of player%} is set:
- message "&cThis area is already claim."
- stop
- if {@Max-Land} is -1:
- add name of player to {land.%chunk at location of player%::*}
- set {chunk.%chunk at location of player%} to name of player
- set {chunk.%chunk at location of player%.%player%} to true
- message "&6You now own the land."
- add 1 to {claimedland.%player%}
- log "%player% in the world %world% en %player's location%" to "LandClaim/Claim.log"
- if {home.%player%} is not set:
- set {home.%player%} to location of the player
- stop
- else:
- if {@Max-Land} is 0:
- if player has permission "land.claim.vip" or "land.claim.op":
- if {claimedland.%player%} is greater than {@Max-Land-VIP} -1:
- if player has permission "land.claim.op":
- if {claimedland.%player%} is greater than {@Max-Land-OP} -1:
- message "&cYou have reached your claim limit."
- stop
- else:
- message "&cYou have reached your claim limit."
- stop
- else:
- message "&cYou have reached your claim limit."
- stop
- if {claimedland.%player%} is greater than {@Max-Land} -1:
- if player has permission "land.claim.vip" or "land.claim.op":
- if {claimedland.%player%} is greater than {@Max-Land-VIP} -1:
- if player has permission "land.claim.op":
- if {claimedland.%player%} is greater than {@Max-Land-OP} -1:
- message "&cYou have reached your claim limit."
- stop
- else:
- message "&cYou have reached your claim limit."
- stop
- else:
- message "&cYou have reached your claim limit."
- stop
- add name of player to {land.%chunk at location of player%::*}
- set {chunk.%chunk at location of player%} to name of player
- set {chunk.%chunk at location of player%.%player%} to true
- set {loc.chunks.%player%::%chunk at location of player%} to location of player
- set {loc.chunks.%player%::%chunk at location of player%} to location of player
- message "&6You are now the owner of the area."
- add 1 to {claimedland.%player%}
- log "%player% in the world %world% en %player's location%" to "LandClaim/Claim.log"
- if {home.%player%} is not set:
- set {home.%player%} to location of the player
- stop
- stop
- #subfold @unclaim
- argument 1 is "unclaim" or "u":
- if {chunk.%chunk at location of player%} is not set:
- message "&cThe land is not claim."
- stop
- if {chunk.%chunk at location of player%} is not name of player:
- if {bypassland.%player%} is not true:
- message "&cYou do not own this land."
- stop
- else:
- if {bypassland.%player%} is true:
- remove 1 from {claimedland.%{chunk.%chunk at location of player%}%}
- clear {land.%chunk at location of player%::*}
- clear {chunk.%chunk at location of player%}
- delete {loc.chunks.%player%::%chunk at location of player%}
- message "&6You unclaim this land."
- stop
- message "&cYou do not own this land."
- message "&cThe land belongs to %{chunk.%chunk at location of player%}%"
- else:
- if {chunk.%chunk at location of player%} is name of player:
- remove 1 from {claimedland.%{chunk.%chunk at location of player%}%}
- clear {land.%chunk at location of player%::*}
- clear {chunk.%chunk at location of player%}
- delete {loc.chunks.%player%::%chunk at location of player%}
- message "&6You unclaim this land."
- if {home.%player%} is set:
- delete {home.%player%}
- stop
- # subfold @add
- argument 1 is "add":
- if {chunk.%chunk at location of player%} is not set:
- message "&cThe land is not claim"
- stop
- if {chunk.%chunk at location of player%} is not name of player:
- if {bypassland.%player%} is true:
- if {land.%chunk at location of player%::%{_playersearch}%} is argument 2:
- message "&cThis player is already a member of this land."
- stop
- else:
- add "%name of argument 2%" to {land.%chunk at location of player%::*}
- set {chunk.%chunk at location of player%.%argument 2%} to true
- message "&6%name of argument 2% can now build on this earth."
- stop
- else:
- message "&cYou do not own this land."
- stop
- if {played.%argument 2%} is not set:
- message "&cThis player does not exist."
- stop
- if {chunk.%chunk at location of player%} is argument 2:
- message "&cYou can not add to your own land."
- stop
- set {_playersearch} to 0
- loop 10000 times:
- if {land.%chunk at location of player%::%{_playersearch}%} is argument 2:
- message "&cThis player is already a member of this land."
- stop
- else:
- add 1 to {_playersearch}
- if {_playersearch} is 10000:
- message "&6%name of argument 2% can now build on this earth."
- add "%name of argument 2%" to {land.%chunk at location of player%::*}
- set {chunk.%chunk at location of player%.%argument 2%} to true
- stop
- #subfold @remove
- argument 1 is "remove" or "r":
- if argument 2 is not set:
- make player execute command "&cland error"
- stop
- if {chunk.%chunk at location of player%} is not set:
- message "&cThe land is not claim."
- stop
- if {chunk.%chunk at location of player%} is not name of player:
- if {bypassland.%player%} is not true:
- message "&cYou do not own this land."
- stop
- else:
- if {bypassland.%player%} is true:
- if {land.%chunk at location of player%::%{_playersearch}%} is argument 2:
- message "&cThis player is already a member of this land."
- stop
- else:
- add "%name of argument 2%" to {land.%chunk at location of player%::*}
- set {chunk.%chunk at location of player%.%argument 2%} to true
- message "&6%name of argument 2% can now build on this earth."
- stop
- if {played.%argument 2%} is not set:
- message "&cThis player does not exist."
- stop
- if {chunk.%chunk at location of player%} is argument 2:
- message "&cYou can not remove yourself from your own land."
- stop
- loop {land.%chunk at location of player%::*}:
- if loop-value is argument 2:
- clear {chunk.%chunk at location of player%.%argument 2%}
- delete {land.%chunk at location of player%::%loop-index%}
- exit loop
- clear {chunk.%chunk at location of player%.%argument 2%}
- message "&6%name of argument 2% can not build on this land."
- stop
- #subfold @bypass
- argument 1 is "bypass":
- player has permission "land.bypass":
- if {bypassland.%player%} is true:
- clear {bypassland.%player%}
- message "&6You can no longer access all lands."
- stop
- set {bypassland.%player%} to true
- message "&6You now have access to all land claim."
- stop
- message "&cYou do not have permission to use this command."
- stop
- #subfold @list
- argument 1 is "list" or "l":
- argument 2 is not set:
- loop {loc.chunks.%player%::*}:
- set {_loc} to {loc.chunks.%player%::%loop-index%}
- set {_chunk} to chunk at location of {_loc}
- set {_chunk.name} to {chunk.name.%{_chunk}%}
- {_count} is not set:
- set {_count} to 0
- add 1 to {_count}
- {chunk.name.%{_chunk}%} is not set:
- set {chunk.name.%{_chunk}%} to "%{_count}%"
- set {_chunk.name} to {chunk.name.%{_chunk}%}
- {_chunk.name} is not set:
- set {_chunk.name} to "&cNot Named"
- send "&a%{_count}% ------ %{_chunk}% ------ %{_chunk.name}%" to player
- stop
- argument 2 is set:
- loop {loc.chunks.%argument 2%::*}:
- set {_loc} to loop-value
- set {_chunk} to chunk at location of {_loc}
- set {_chunk.name} to {chunk.name.%{_chunk}%}
- {_count} is not set:
- set {_count} to 0
- {_chunk.name} is not set:
- set {_chunk.name} to "&cNot Named"
- {chunk.%{_chunk}%.%player%} is true:
- add 1 to {_count}
- send "&a%{_count}%----->%{_chunk}%---->%{_chunk.name}%" to player
- stop
- #subfold @map
- argument 1 is "map" or "m":
- message "------------ [ Mini Map ] ------------"
- set {_mapX} to 11
- set {_mapY} to 6
- set {_m} to ""
- loop 13 times:
- loop 23 times:
- set {_x} to {_mapX} * 16
- set {_y} to {_mapY} * 16
- set {_chunk2} to chunk at block {_y} blocks north {_x} blocks west of player
- if {loc.chunks::%{_chunk2}%} isn't set:
- set {_result} to ""
- else:
- set {_result} to {loc.chunks::%{_chunk2}%}
- # Position du joueur sur la mini-map
- if {_chunk2} is chunk at player:
- set {_m} to "%{_m}%&2█"
- # Claim du joueur
- else if {_result} is {loc.chunks.%player%::%{_chunk2}%}:
- set {_m} to "%{_m}%&a█"
- else if {_result} is "":
- set {_m} to "%{_m}%&7█"
- else:
- set {_m} to "%{_m}%&c█"
- add -1 to {_mapX}
- message "%{_m}%" to player
- set {_m} to ""
- add -1 to {_mapY}
- set {_mapX} to 11
- set {_n} to "N"
- set {_s} to "S"
- set {_e} to "E"
- set {_w} to "W"
- if facing of player is north:
- set {_n} to "&4N&6"
- else if facing of player is south:
- set {_s} to "&4S&6"
- else if facing of player is west:
- set {_w} to "&4W&6"
- else if facing of player is east:
- set {_e} to "&4E&6"
- message " "
- message "&a█&7 &aYour claim&2█&7 &2You &c█&7 &cOther player &6\%{_n}%/"
- message "&7█ Free Zone &6%{_w}%+%{_e}%"
- message "
- #subfold @tp
- argument 1 is "teleport" or "tp":
- if {home.%player%} is set:
- teleport player to {home.%player%}
- send "&aSuccessful teleportation !" to player
- stop
- else:
- send "&cNo home, you must claim at least once !"
- stop
- #subfold @delhomeclaim
- argument 1 is "delhome" or "dh":
- if {home.%player%} is set:
- delete {home.%player%}
- send "&cHome (land) deleted."
- stop
- else:
- send "&cNo home, you must claim at least once !"
- stop
- #endfold
- on quit:
- if {bypassland.%player%} is true:
- clear {bypassland.%player%}
- on place:
- if {bypassland.%player%} is true:
- stop
- if {chunk.%chunk at location of block%} is set:
- if {chunk.%chunk at location of block%.%player%} is true:
- stop
- message "&cThis land belongs to &7%{chunk.%chunk at location of block%}%&c."
- cancel event
- on break:
- if {bypassland.%player%} is true:
- stop
- if {chunk.%chunk at location of block%} is set:
- if {chunk.%chunk at location of block%.%player%} is true:
- stop
- message "&cThis land belongs to &7%{chunk.%chunk at location of block%}%&c."
- cancel event
- on right click:
- if {bypassland.%player%} is true:
- stop
- if {chunk.%chunk at location of block%} is set:
- if {chunk.%chunk at location of block%.%player%} is true:
- stop
- message "&cThis land belongs to &7%{chunk.%chunk at location of block%}%&c."
- cancel event
- on right click on horse:
- if {bypassland.%player%} is true:
- stop
- if {chunk.%chunk at location of event-player%} is set:
- {chunk.%chunk at location of event-player%} is not event-player:
- {chunk.%chunk at location of event-player%.%event-player%} is set:
- stop
- send "&cYou can not mount this animal !" to event-player
- cancel event
- stop trigger
- on place of tnt:
- if {bypassland.%player%} is true:
- stop
- loop blocks in radius 10 of block:
- if {chunk.%chunk at location of loop-block%} is set:
- if {chunk.%chunk at location of loop-block%.%player%} is true:
- exit loop
- else:
- cancel event
- message "&cYou can not use explosives here."
- stop
- on explode:
- entity is creeper
- loop blocks in radius 10 of entity:
- if {chunk.live.%chunk at location of loop-block%} is set:
- cancel event
- set {_safe} to true
- {_safe} is set:
- create safe explosion of force 3 at event-location
- on damage of a entity:
- victim is a chicken or a cow or a mooshroom or a horse or a sheep or a pig or a wolf or a ocelot or a villager or a squid or a item frame
- attacker is a player
- victim is a cow:
- attacker's tool is a empty bucket
- stop
- if {bypassland.%attacker%} is true:
- stop
- loop blocks in radius 3 of victim:
- if {chunk.%chunk at location of loop-block%} is set:
- if {chunk.%chunk at location of loop-block%.%attacker%} is true:
- stop
- send "&cYou can not kill the &7%victim% &c!" to attacker
- cancel event
- stop
- on break glass:
- if {bypassland.%player%} is true:
- stop
- if {chunk.%chunk at location of event-player%} is set:
- {chunk.%chunk at location of event-player%} is not event-player:
- {chunk.%chunk at location of event-player%.%event-player%} is set:
- stop
- send "&cThis land belongs to &7%{chunk.%chunk at location of block%}%&c." to event-player
- cancel event
- stop trigger
- on right click on lead:
- if {bypassland.%player%} is true:
- stop
- if {chunk.%chunk at location of event-player%} is set:
- {chunk.%chunk at location of event-player%} is not event-player:
- {chunk.%chunk at location of event-player%.%event-player%} is set:
- stop
- send "&cThis land belongs to &7%{chunk.%chunk at location of block%}%&c." to event-player
- cancel event
- stop trigger
- on enderman pickup:
- if {chunk.live.%chunk at location of block%} is set:
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment