From 520be48198f21eb151cce64476302bc3e8441fb0 Mon Sep 17 00:00:00 2001 From: Leomixer17 Date: Sat, 6 Jul 2019 01:24:15 +0200 Subject: [PATCH] Create fixborders.js --- Core/src/main/resources/fixborders.js | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Core/src/main/resources/fixborders.js diff --git a/Core/src/main/resources/fixborders.js b/Core/src/main/resources/fixborders.js new file mode 100644 index 000000000..779b54c61 --- /dev/null +++ b/Core/src/main/resources/fixborders.js @@ -0,0 +1,35 @@ +/* +Need to script something quick with PlotSquared? +/plot debugexec runasync fixborder.js + + +The following utility classes are usable: + - PS + - TaskManager + - TitleManager + - ConsolePlayer + - SchematicHandler + - ChunkManager + - BlockManager + - SetupUtils + - EventUtil + - UUIDHandler + - DBFunc + - HybridUtils + - IMP ( BukkitMain or SpongeMain) + - MainCommand + - MainUtil + - Settings + - StringMan + - MathMan + - C ( use C_ ) + - Permissions ( use Permissions_ ) + + For more information see: https://github.com/IntellectualSites/PlotSquared/wiki/Scripting +*/ +var plots = PS.sortPlotsByTemp(PS.getPlots()); +PS.class.static.log("Attempting to fix border for " + plots.size() + " plots"); +for (var i = 0; i < plots.size(); i++) { + var plot = plots.get(i); + plot.setComponent("border", "%s0"); +}