mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-02-18 04:31:40 +01:00
Merge branch 'development'
This commit is contained in:
commit
33482e5ccb
32
pom.xml
32
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>skyblock</artifactId>
|
||||
<version>2.3.12</version>
|
||||
<version>2.3.13</version>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@ -105,11 +105,6 @@
|
||||
</plugins>
|
||||
</build>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>mvdw-software</id>
|
||||
<name>MVdW Public Repositories</name>
|
||||
<url>http://repo.mvdw-software.be/content/groups/public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||
@ -140,7 +135,7 @@
|
||||
</repository>
|
||||
<repository>
|
||||
<id>public</id>
|
||||
<url>http://repo.songoda.com/repository/public/</url>
|
||||
<url>https://repo.songoda.com/repository/public/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
@ -165,8 +160,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.16.1</version>
|
||||
<scope>provided</scope>
|
||||
<version>1.16.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.MilkBowl</groupId>
|
||||
@ -218,7 +212,7 @@
|
||||
<dependency>
|
||||
<groupId>com.sk89q</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>7.1.0</version>
|
||||
<version>7.1.0R1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>io.papermc</groupId>
|
||||
@ -232,23 +226,17 @@
|
||||
<version>LATEST</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.Zrips</groupId>
|
||||
<artifactId>Residence</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>4.9.0.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net</groupId>
|
||||
<artifactId>coreprotect</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>2.18.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.eatthepath</groupId>
|
||||
<artifactId>fast-uuid</artifactId>
|
||||
<version>0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.Zrips</groupId>
|
||||
<artifactId>Residence</artifactId>
|
||||
<scope>provided</scope>
|
||||
<version>4.9.0.6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@ -7,6 +7,7 @@ import com.songoda.core.compatibility.ServerProject;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.core.configuration.Config;
|
||||
import com.songoda.core.gui.GuiManager;
|
||||
import com.songoda.core.hooks.LogManager;
|
||||
import com.songoda.skyblock.api.SkyBlockAPI;
|
||||
import com.songoda.skyblock.ban.BanManager;
|
||||
import com.songoda.skyblock.bank.BankManager;
|
||||
@ -48,19 +49,12 @@ import com.songoda.skyblock.usercache.UserCacheManager;
|
||||
import com.songoda.skyblock.visit.VisitManager;
|
||||
import com.songoda.skyblock.visit.VisitTask;
|
||||
import com.songoda.skyblock.world.WorldManager;
|
||||
import com.songoda.skyblock.world.generator.VoidGenerator;
|
||||
import net.coreprotect.CoreProtect;
|
||||
import net.coreprotect.CoreProtectAPI;
|
||||
import net.milkbowl.vault.permission.Permission;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.WorldCreator;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
import java.io.File;
|
||||
@ -101,7 +95,6 @@ public class SkyBlock extends SongodaPlugin {
|
||||
private BankManager bankManager;
|
||||
private PermissionManager permissionManager;
|
||||
|
||||
private CoreProtectAPI coreProtectAPI;
|
||||
private Permission vaultPermission;
|
||||
|
||||
private boolean paper;
|
||||
@ -284,7 +277,7 @@ public class SkyBlock extends SongodaPlugin {
|
||||
this.getLogger().warning("EconomyManager is default");
|
||||
}
|
||||
|
||||
this.coreProtectAPI = loadCoreProtect();
|
||||
LogManager.load();
|
||||
|
||||
SkyBlockAPI.setImplementation(INSTANCE);
|
||||
}
|
||||
@ -319,21 +312,6 @@ public class SkyBlock extends SongodaPlugin {
|
||||
public void onDataLoad() {
|
||||
}
|
||||
|
||||
private CoreProtectAPI loadCoreProtect() {
|
||||
Plugin plugin = getServer().getPluginManager().getPlugin("CoreProtect");
|
||||
|
||||
if (plugin != null) { // Check before loading classes
|
||||
if (plugin instanceof CoreProtect) { // Check that CoreProtect is loaded
|
||||
CoreProtectAPI CoreProtect = ((CoreProtect) plugin).getAPI();
|
||||
// Check that the API is enabled and Check that a compatible version of the API is loaded
|
||||
if (CoreProtect.isEnabled() && CoreProtect.APIVersion() >= 6) {
|
||||
return CoreProtect;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigReload() {
|
||||
if (!loadConfigs()) this.getLogger().warning("Config are not reload !");
|
||||
@ -363,8 +341,7 @@ public class SkyBlock extends SongodaPlugin {
|
||||
stackables = this.getFileManager().getConfig(new File(this.getDataFolder(), "stackables.yml")).getFileConfiguration();
|
||||
upgrades = this.getFileManager().getConfig(new File(this.getDataFolder(), "upgrades.yml")).getFileConfiguration();
|
||||
return true;
|
||||
}
|
||||
catch (Exception exception) {
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
@ -507,10 +484,6 @@ public class SkyBlock extends SongodaPlugin {
|
||||
return guiManager;
|
||||
}
|
||||
|
||||
public CoreProtectAPI getCoreProtectAPI() {
|
||||
return coreProtectAPI;
|
||||
}
|
||||
|
||||
public boolean isPaper() {
|
||||
return paper;
|
||||
}
|
||||
@ -528,32 +501,60 @@ public class SkyBlock extends SongodaPlugin {
|
||||
}
|
||||
|
||||
|
||||
public FileConfiguration getBiomes() { return biomes; }
|
||||
public FileConfiguration getBiomes() {
|
||||
return biomes;
|
||||
}
|
||||
|
||||
public FileConfiguration getChallenges() { return challenges; }
|
||||
public FileConfiguration getChallenges() {
|
||||
return challenges;
|
||||
}
|
||||
|
||||
public FileConfiguration getConfiguration() { return config; }
|
||||
public FileConfiguration getConfiguration() {
|
||||
return config;
|
||||
}
|
||||
|
||||
public FileConfiguration getGenerators() { return generators; }
|
||||
public FileConfiguration getGenerators() {
|
||||
return generators;
|
||||
}
|
||||
|
||||
public FileConfiguration getLanguage() { return language; }
|
||||
public FileConfiguration getLanguage() {
|
||||
return language;
|
||||
}
|
||||
|
||||
public FileConfiguration getLevelling() { return levelling; }
|
||||
public FileConfiguration getLevelling() {
|
||||
return levelling;
|
||||
}
|
||||
|
||||
public FileConfiguration getLimits() { return limits; }
|
||||
public FileConfiguration getLimits() {
|
||||
return limits;
|
||||
}
|
||||
|
||||
public FileConfiguration getMenus() { return menus; }
|
||||
public FileConfiguration getMenus() {
|
||||
return menus;
|
||||
}
|
||||
|
||||
public FileConfiguration getPlaceholders() { return placeholders; }
|
||||
public FileConfiguration getPlaceholders() {
|
||||
return placeholders;
|
||||
}
|
||||
|
||||
public FileConfiguration getRewards() { return rewards; }
|
||||
public FileConfiguration getRewards() {
|
||||
return rewards;
|
||||
}
|
||||
|
||||
public FileConfiguration getSettings() { return settings; }
|
||||
public FileConfiguration getSettings() {
|
||||
return settings;
|
||||
}
|
||||
|
||||
public FileConfiguration getStackables() { return stackables; }
|
||||
public FileConfiguration getStackables() {
|
||||
return stackables;
|
||||
}
|
||||
|
||||
public FileConfiguration getUpgrades() { return upgrades; }
|
||||
public FileConfiguration getUpgrades() {
|
||||
return upgrades;
|
||||
}
|
||||
|
||||
public FileConfiguration getScoreboard() { return scoreboard; }
|
||||
public FileConfiguration getScoreboard() {
|
||||
return scoreboard;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package com.songoda.skyblock.challenge.challenge;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.hooks.economies.Economy;
|
||||
import com.songoda.core.utils.ItemUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.bank.BankManager;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
@ -21,7 +20,11 @@ import org.bukkit.potion.PotionData;
|
||||
import org.bukkit.potion.PotionType;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class Challenge {
|
||||
@ -121,7 +124,6 @@ public class Challenge {
|
||||
public enum Type {
|
||||
|
||||
CHALLENGE {
|
||||
|
||||
@Override
|
||||
public Object convert(String value) throws IllegalArgumentException {
|
||||
if (value == null || "".equalsIgnoreCase(value)) {
|
||||
@ -216,18 +218,25 @@ public class Challenge {
|
||||
if (obj instanceof ItemStack) {
|
||||
// Check if player has specific item in his inventory
|
||||
ItemStack is = (ItemStack) obj;
|
||||
if(ignoreLore){
|
||||
return p.getInventory().contains(is, is.getAmount());
|
||||
}
|
||||
CompatibleMaterial material = CompatibleMaterial.getMaterial(is);
|
||||
if (ignoreLore)
|
||||
return findSimilar(p, material) >= is.getAmount();
|
||||
return p.getInventory().containsAtLeast(is, is.getAmount());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private int findSimilar(Player p, CompatibleMaterial material) {
|
||||
int amountFound = 0;
|
||||
for (ItemStack item : p.getInventory().getContents())
|
||||
if (CompatibleMaterial.getMaterial(item) == material)
|
||||
amountFound += item.getAmount();
|
||||
return amountFound;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeRequire(Player p, Object obj) {
|
||||
boolean ignoreLore = SkyBlock.getInstance().getConfig().getBoolean("Island.Challenge.IgnoreItemLore", false);
|
||||
boolean ignoreLore = SkyBlock.getInstance().getConfiguration().getBoolean("Island.Challenge.IgnoreItemLore", false);
|
||||
|
||||
if (obj instanceof ItemStack) {
|
||||
// Remove specific item in player's inventory
|
||||
@ -235,7 +244,7 @@ public class Challenge {
|
||||
int toRemove = is.getAmount();
|
||||
for (ItemStack jis : p.getInventory().getContents()) {
|
||||
if (jis == null) continue;
|
||||
if (ignoreLore ? ItemUtils.isSimilarMaterial(is, jis) : jis.isSimilar(is)) {
|
||||
if (ignoreLore ? CompatibleMaterial.getMaterial(jis) == CompatibleMaterial.getMaterial(is) : jis.isSimilar(is)) {
|
||||
if (jis.getAmount() <= toRemove) {
|
||||
toRemove -= jis.getAmount();
|
||||
p.getInventory().removeItem(jis);
|
||||
@ -330,7 +339,6 @@ public class Challenge {
|
||||
}
|
||||
},
|
||||
NEAR {
|
||||
|
||||
@Override
|
||||
public Peer<EntityType, Integer> convert(String value) throws IllegalArgumentException {
|
||||
// We returns the entity type and the number of entity required
|
||||
@ -612,8 +620,7 @@ public class Challenge {
|
||||
/**
|
||||
* Try to convert the value to a useable object used later
|
||||
*
|
||||
* @param value
|
||||
* The value to convert
|
||||
* @param value The value to convert
|
||||
* @return A useable object required
|
||||
*/
|
||||
public abstract Object convert(String value) throws IllegalArgumentException;
|
||||
@ -621,10 +628,8 @@ public class Challenge {
|
||||
/**
|
||||
* Check if specific player has requirement for specific object
|
||||
*
|
||||
* @param p
|
||||
* The player
|
||||
* @param obj
|
||||
* The object
|
||||
* @param p The player
|
||||
* @param obj The object
|
||||
* @return true if specific player has requirement for this object
|
||||
*/
|
||||
public abstract boolean has(Player p, Object obj);
|
||||
@ -632,20 +637,16 @@ public class Challenge {
|
||||
/**
|
||||
* Execute an action associated with specific object for specific player
|
||||
*
|
||||
* @param p
|
||||
* The player
|
||||
* @param obj
|
||||
* The object
|
||||
* @param p The player
|
||||
* @param obj The object
|
||||
*/
|
||||
public abstract void executeRequire(Player p, Object obj);
|
||||
|
||||
/**
|
||||
* Give a reward to specific player for specific object
|
||||
*
|
||||
* @param p
|
||||
* The player
|
||||
* @param obj
|
||||
* The object
|
||||
* @param p The player
|
||||
* @param obj The object
|
||||
*/
|
||||
public abstract void executeReward(Player p, Object obj);
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ public class Island {
|
||||
playerData.save();
|
||||
}
|
||||
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, this::save);
|
||||
save();
|
||||
|
||||
if (!mainConfigLoad.getBoolean("Island.Coop.Unload")) {
|
||||
File coopDataFile = new File(plugin.getDataFolder().toString() + "/coop-data",
|
||||
@ -554,12 +554,12 @@ public class Island {
|
||||
|
||||
public void addCoopPlayer(UUID uuid, IslandCoop islandCoop) {
|
||||
coopPlayers.put(uuid, islandCoop);
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, this::save);
|
||||
save();
|
||||
}
|
||||
|
||||
public void removeCoopPlayer(UUID uuid) {
|
||||
coopPlayers.remove(uuid);
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, this::save);
|
||||
save();
|
||||
}
|
||||
|
||||
public boolean isCoopPlayer(UUID uuid) {
|
||||
@ -793,7 +793,7 @@ public class Island {
|
||||
if(!islandStatusChangeEvent.isCancelled()) {
|
||||
this.status = status;
|
||||
getVisit().setStatus(status);
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, this::save);
|
||||
save();
|
||||
}
|
||||
}
|
||||
|
||||
@ -973,9 +973,10 @@ public class Island {
|
||||
return apiWrapper;
|
||||
}
|
||||
|
||||
|
||||
public void addWhitelistedPlayer(UUID uuid) {
|
||||
this.whitelistedPlayers.add(uuid);
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, this::save);
|
||||
save();
|
||||
}
|
||||
|
||||
public boolean isPlayerWhitelisted(UUID uuid) {
|
||||
@ -984,7 +985,7 @@ public class Island {
|
||||
|
||||
public void removeWhitelistedPlayer(UUID uuid) {
|
||||
this.whitelistedPlayers.remove(uuid);
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, this::save);
|
||||
save();
|
||||
}
|
||||
|
||||
public Set<UUID> getWhitelistedPlayers() {
|
||||
|
@ -4,6 +4,7 @@ import com.google.common.collect.Lists;
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.compatibility.CompatibleSound;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.core.hooks.LogManager;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.generator.Generator;
|
||||
import com.songoda.skyblock.generator.GeneratorManager;
|
||||
@ -122,9 +123,8 @@ public class BlockListeners implements Listener {
|
||||
droppedAmount = 1;
|
||||
}
|
||||
|
||||
if (plugin.getCoreProtectAPI() != null) {
|
||||
plugin.getCoreProtectAPI().logRemoval(player.getName(), block.getLocation(), material.getMaterial(), null);
|
||||
}
|
||||
if (LogManager.isEnabled())
|
||||
LogManager.logRemoval(player, block);
|
||||
|
||||
if (stackable.getSize() <= 1) {
|
||||
stackableManager.removeStack(stackable);
|
||||
|
@ -3,9 +3,11 @@ package com.songoda.skyblock.listeners;
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.compatibility.ServerVersion;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
import com.songoda.skyblock.config.FileManager.Config;
|
||||
import com.songoda.skyblock.island.*;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
import com.songoda.skyblock.island.IslandEnvironment;
|
||||
import com.songoda.skyblock.island.IslandLevel;
|
||||
import com.songoda.skyblock.island.IslandManager;
|
||||
import com.songoda.skyblock.island.IslandWorld;
|
||||
import com.songoda.skyblock.limit.impl.EntityLimitation;
|
||||
import com.songoda.skyblock.stackable.Stackable;
|
||||
import com.songoda.skyblock.stackable.StackableManager;
|
||||
@ -18,7 +20,6 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -36,10 +37,14 @@ import org.bukkit.event.vehicle.VehicleDestroyEvent;
|
||||
import org.bukkit.inventory.EntityEquipment;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
public class EntityListeners implements Listener {
|
||||
|
||||
@ -113,22 +118,19 @@ public class EntityListeners implements Listener {
|
||||
} else {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
else if(victim instanceof Player) { // EVP
|
||||
} else if (victim instanceof Player) { // EVP
|
||||
if (configLoad.getBoolean("Island.Entity_Damage.EVP")) {
|
||||
plugin.getPermissionManager()
|
||||
.processPermission(event, (Player) victim, island, true);
|
||||
}
|
||||
|
||||
}
|
||||
else if(attacker instanceof Player) { // PVE
|
||||
} else if (attacker instanceof Player) { // PVE
|
||||
if (configLoad.getBoolean("Island.Entity_Damage.PVE")) {
|
||||
plugin.getPermissionManager()
|
||||
.processPermission(event, (Player) attacker, island);
|
||||
}
|
||||
|
||||
}
|
||||
else { // EVE
|
||||
} else { // EVE
|
||||
if (configLoad.getBoolean("Island.Entity_Damage.PVE")) {
|
||||
plugin.getPermissionManager()
|
||||
.processPermission(event, island);
|
||||
@ -299,9 +301,12 @@ public class EntityListeners implements Listener {
|
||||
if ((LocationUtil.isLocationLocation(block.getLocation(), island.getLocation(world, IslandEnvironment.Main).clone().subtract(0, 1, 0))
|
||||
|| LocationUtil.isLocationLocation(block.getLocation(),
|
||||
island.getLocation(world, IslandEnvironment.Visitor).clone().subtract(0, 1, 0)))
|
||||
&& this.plugin.getConfiguration()
|
||||
.getBoolean("Island.Spawn.Protection")) {
|
||||
event.setCancelled(true);
|
||||
&& this.plugin.getConfiguration().getBoolean("Island.Spawn.Protection")) {
|
||||
CompatibleMaterial material = CompatibleMaterial.getMaterial(block);
|
||||
Bukkit.getScheduler().runTaskLater(plugin, () -> {
|
||||
event.getEntity().remove();
|
||||
event.getBlock().setType(material.getBlockMaterial());
|
||||
}, 1L);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -420,10 +425,6 @@ public class EntityListeners implements Listener {
|
||||
removeBlockFromLevel(island, block);
|
||||
}
|
||||
|
||||
if(plugin.getCoreProtectAPI() != null) {
|
||||
plugin.getCoreProtectAPI().logRemoval("#" + entity.getType().toString().toLowerCase(), block.getLocation(), material.getMaterial(), null);
|
||||
}
|
||||
|
||||
it.remove();
|
||||
if (!removed) {
|
||||
removed = true;
|
||||
@ -516,12 +517,14 @@ public class EntityListeners implements Listener {
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)) {
|
||||
if (livingEntity instanceof Steerable) {
|
||||
Steerable steerable = (Steerable) livingEntity;
|
||||
if (steerable.hasSaddle()) dontMultiply.add(new ItemStack(CompatibleMaterial.SADDLE.getMaterial(), 1));
|
||||
if (steerable.hasSaddle())
|
||||
dontMultiply.add(new ItemStack(CompatibleMaterial.SADDLE.getMaterial(), 1));
|
||||
}
|
||||
} else {
|
||||
if (livingEntity instanceof Pig) {
|
||||
Pig pig = (Pig) livingEntity;
|
||||
if (pig.hasSaddle()) dontMultiply.add(new ItemStack(CompatibleMaterial.SADDLE.getMaterial(), 1));
|
||||
if (pig.hasSaddle())
|
||||
dontMultiply.add(new ItemStack(CompatibleMaterial.SADDLE.getMaterial(), 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,9 @@ package com.songoda.skyblock.listeners;
|
||||
import com.songoda.core.compatibility.CompatibleHand;
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.compatibility.CompatibleSound;
|
||||
import com.songoda.core.hooks.LogManager;
|
||||
import com.songoda.core.utils.ItemUtils;
|
||||
import com.songoda.core.utils.NumberUtils;
|
||||
import com.songoda.skyblock.SkyBlock;
|
||||
import com.songoda.skyblock.config.FileManager;
|
||||
import com.songoda.skyblock.island.Island;
|
||||
@ -16,7 +18,6 @@ import com.songoda.skyblock.message.MessageManager;
|
||||
import com.songoda.skyblock.sound.SoundManager;
|
||||
import com.songoda.skyblock.stackable.Stackable;
|
||||
import com.songoda.skyblock.stackable.StackableManager;
|
||||
import com.songoda.core.utils.NumberUtils;
|
||||
import com.songoda.skyblock.utils.structure.StructureUtil;
|
||||
import com.songoda.skyblock.utils.world.LocationUtil;
|
||||
import com.songoda.skyblock.world.WorldManager;
|
||||
@ -245,9 +246,8 @@ public class InteractListeners implements Listener {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
if(plugin.getCoreProtectAPI() != null && material != null) {
|
||||
plugin.getCoreProtectAPI().logPlacement(player.getName(), location, material.getMaterial(), null);
|
||||
}
|
||||
if (LogManager.isEnabled() && material != null)
|
||||
LogManager.logPlacement(player, block);
|
||||
|
||||
if (player.getGameMode() != GameMode.CREATIVE)
|
||||
ItemUtils.takeActiveItem(player, CompatibleHand.getHand(event), itemAmount);
|
||||
|
Loading…
Reference in New Issue
Block a user