Skip to content

Instantly share code, notes, and snippets.

@Amejonah1200
Created December 1, 2019 21:44
Show Gist options
  • Save Amejonah1200/8e5885ddc46d14822730cea67430b6da to your computer and use it in GitHub Desktop.
Save Amejonah1200/8e5885ddc46d14822730cea67430b6da to your computer and use it in GitHub Desktop.
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.
}
}
@richardwhateverr
Copy link

"setRand"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment