Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
function MoonMC_PlotAPI_RandxWand(p: player, mat: material, type: text):
if {_p} is set:
set {_Player} to {_p}
set {_PlotAPI} to new PlotAPI()
set {_PlotPlayer} to PlotPlayer.from({_Player})
set {_Plot} to {_PlotPlayer}.getCurrentPlot()
set {_newPlot} to new Plot()
set {_Material} to {_mat}
set {_Pattern} to ConfigurationUtil.BLOCK_BUCKET.parseString({_Material}.toString()).toPattern()
if {_Plot}.isOwner({_Player}.getUniqueId()):
send "ja" to {_p}
else:
send "nein" to {_p}
if {_Plot}.getConnectedPlots().size() > 1:
set {_list} to Arrays.asList({_Plot}.getConnectedPlots().toArray())
send "list object: %{_list}%" to players # delete this in future...
send "list size: %{_list}.length%" to players # delete this in future...
send "index 0: %{_list}[0]%" to players # delete this in future...
set {_i} to 0
while {_i} < {_list}.size():
add {_list}.get({_i}) to {_skriptList::*}
send "%{_skriptList::*}%" to {_p}
add 1 to {_i}
#set {_ConnectedPlots} to {_Plot}.getConnectedPlots()
#{_ConnectedPlots}.getPlotModificationManager().setComponent("border", {_Pattern}, null, null)
else:
{_Plot}.getPlotModificationManager().setComponent("border", {_Pattern}, null, null)
It workedddd!!!View attachment 9190View attachment 9191Code:function MoonMC_PlotAPI_RandxWand(p: player, mat: material, type: text): if {_p} is set: set {_Player} to {_p} set {_PlotAPI} to new PlotAPI() set {_PlotPlayer} to PlotPlayer.from({_Player}) set {_Plot} to {_PlotPlayer}.getCurrentPlot() set {_newPlot} to new Plot() set {_Material} to {_mat} set {_Pattern} to ConfigurationUtil.BLOCK_BUCKET.parseString({_Material}.toString()).toPattern() if {_Plot}.isOwner({_Player}.getUniqueId()): send "ja" to {_p} else: send "nein" to {_p} if {_Plot}.getConnectedPlots().size() > 1: set {_list} to Arrays.asList({_Plot}.getConnectedPlots().toArray()) send "list object: %{_list}%" to players # delete this in future... send "list size: %{_list}.length%" to players # delete this in future... send "index 0: %{_list}[0]%" to players # delete this in future... set {_i} to 0 while {_i} < {_list}.size(): add {_list}.get({_i}) to {_skriptList::*} send "%{_skriptList::*}%" to {_p} add 1 to {_i} #set {_ConnectedPlots} to {_Plot}.getConnectedPlots() #{_ConnectedPlots}.getPlotModificationManager().setComponent("border", {_Pattern}, null, null) else: {_Plot}.getPlotModificationManager().setComponent("border", {_Pattern}, null, null)
Can you send me the class of it?bro but i cant change the border with the plot id hahah
i has do be parsed as plot cause its not "CB;1;0.getPlotModificationManager().setComponent("border", {_Pattern}, null, null)"
it wont work
Can you send me the class of it?
Use this:
send {_skriptList::1}.getClass() to players
Place it after the while loop.