Skip to content

Instantly share code, notes, and snippets.

@eirikh1996
Created July 22, 2020 19:21
Show Gist options
  • Save eirikh1996/6cc18998a4620cbd11785324cbfa6373 to your computer and use it in GitHub Desktop.
Save eirikh1996/6cc18998a4620cbd11785324cbfa6373 to your computer and use it in GitHub Desktop.
//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(),
EventPriority.NORMAL,
new RedProtectFlagManager(),
this
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment