Created
December 1, 2019 21:44
-
-
Save Amejonah1200/8e5885ddc46d14822730cea67430b6da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.bukkit.entity.Player; | |
import com.github.intellectualsites.plotsquared.api.PlotAPI; | |
import com.github.intellectualsites.plotsquared.plot.object.Plot; | |
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer; | |
import net.minecraft.server.v1_8_R3.Material; | |
public static void setRand(Player player, Material material) { | |
PlotPlayer plotPlayer = new PlotAPI().wrapPlayer(player.getUniqueId()); | |
Plot plot = plotPlayer.getCurrentPlot(); | |
if (plot == null) return; | |
for (Plot connectedPlot : plot.getConnectedPlots()) { | |
connectedPlot.setComponent("border", material.toString()); // Deprecated: use Configuration.BLOCK_BUCKET.parseString(material.toString()).toPattern() if you have the WorldEdit dependency. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"setRand"