mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Added CoreProtect logging for the Explosive Pickaxe
This commit is contained in:
parent
de4f779a64
commit
0d2ff61387
@ -2008,6 +2008,7 @@ public class SlimefunSetup {
|
||||
Block b = e.getBlock().getRelative(x, y, z);
|
||||
if (b.getType() != Material.AIR && !StringUtils.equals(b.getType().toString(), explosiveblacklist)) {
|
||||
if (CSCoreLib.getLib().getProtectionManager().canBuild(e.getPlayer().getUniqueId(), b)) {
|
||||
if (SlimefunStartup.instance.isCoreProtectInstalled()) SlimefunStartup.instance.getCoreProtectAPI().logRemoval(e.getPlayer().getName(), b.getLocation(), b.getType(), b.getData());
|
||||
b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, b.getType());
|
||||
SlimefunItem sfItem = BlockStorage.check(b);
|
||||
boolean allow = true;
|
||||
|
@ -16,6 +16,8 @@ import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.machines.AutoEnchanter;
|
||||
import net.coreprotect.CoreProtect;
|
||||
import net.coreprotect.CoreProtectAPI;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
@ -100,8 +102,11 @@ public class SlimefunStartup extends JavaPlugin {
|
||||
|
||||
public static TickerTask ticker;
|
||||
|
||||
private CoreProtectAPI coreProtectAPI;
|
||||
|
||||
private boolean clearlag = false;
|
||||
private boolean exoticGarden = false;
|
||||
private boolean coreProtect = false;
|
||||
|
||||
// Supported Versions of Minecraft
|
||||
final String[] supported = {"v1_9_", "v1_10_", "v1_11_", "PluginBukkitBridge"};
|
||||
@ -376,6 +381,8 @@ public class SlimefunStartup extends JavaPlugin {
|
||||
|
||||
clearlag = getServer().getPluginManager().isPluginEnabled("ClearLag");
|
||||
|
||||
coreProtect = getServer().getPluginManager().isPluginEnabled("CoreProtect");
|
||||
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(this, new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -385,6 +392,9 @@ public class SlimefunStartup extends JavaPlugin {
|
||||
|
||||
if (clearlag) new ClearLaggIntegration(this);
|
||||
|
||||
if (coreProtect) coreProtectAPI = ((CoreProtect)getServer().getPluginManager().getPlugin("CoreProtect")).getAPI();
|
||||
|
||||
|
||||
SlimefunGuide.creative_research = config.getBoolean("options.allow-free-creative-research");
|
||||
|
||||
AutoEnchanter.max_emerald_enchantments = config.getInt("options.emerald-enchantment-limit");
|
||||
@ -598,4 +608,12 @@ public class SlimefunStartup extends JavaPlugin {
|
||||
public boolean isExoticGardenInstalled () {
|
||||
return exoticGarden;
|
||||
}
|
||||
|
||||
public boolean isCoreProtectInstalled() {
|
||||
return coreProtect;
|
||||
}
|
||||
|
||||
public CoreProtectAPI getCoreProtectAPI() {
|
||||
return coreProtectAPI;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user