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
//Check for RedProtect | |
Plugin rp = getServer().getPluginManager().getPlugin("RedProtect"); | |
if (rp instanceof RedProtect){ | |
getLogger().info(I18nSupport.getInternationalisedString("Startup - RedProtect detected")); | |
redProtectPlugin = (RedProtect) rp; | |
foundRegionProvider = true; | |
redProtectPlugin.getAPI().addFlag("structurebox", false, true); | |
getServer().getPluginManager().registerEvent( | |
BlockPlaceEvent.class, | |
new br.net.fabiozumbi12.RedProtect.Bukkit.listeners.BlockListener(), |
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
[21:16:15 INFO]: [RedProtect] Enabling RedProtect v7.7.2 | |
[21:16:15 INFO]: [RedProtect] Server version: 1.15.2-R0.1-SNAPSHOT | |
[21:16:15 INFO]: [RedProtect] All configurations loaded! | |
[21:16:15 INFO]: [RedProtect] Language file loaded - Using: NO-NO | |
[21:16:15 INFO]: [RedProtect] Registering commands... | |
[21:16:15 INFO]: [RedProtect] Registering listeners... | |
[21:16:15 INFO]: [RedProtect] Essentials found. Hooked. | |
[21:16:15 INFO]: [RedProtect] WorldEdit found. Hooked. | |
[21:16:15 INFO]: [RedProtect] WorldGuard version 6 found. Hooked. | |
[21:16:15 INFO]: [RedProtect] Factions found. Hooked. |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<parent> | |
<artifactId>NationCraftGUI</artifactId> | |
<groupId>io.github.eirikh1996</groupId> | |
<version>parent</version> | |
</parent> | |
<modelVersion>4.0.0</modelVersion> |
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
public CommandResult execute(CommandSource src, CommandContext args) throws CommandException { | |
if (!(src instanceof Player)) { | |
src.sendMessage(Text.of(COMMAND_PREFIX + I18nSupport.getInternationalisedString("Command - Must be player"))); | |
return CommandResult.empty(); | |
} | |
String arg = args.<String>getOne(Text.of()).get(); | |
final Player player = (Player) src; | |
@NotNull final WorldEditHandler weHandler = StructureBoxes.getInstance().getWorldEditHandler(); | |
@Nullable Clipboard clipboard = weHandler.loadClipboardFromSchematic(StructureBoxes.getInstance().getWorldEditPlugin().getWorld(player.getLocation().getExtent()), arg); | |
if (clipboard == null) { |