Deprecate a method

This commit is contained in:
Fabrizio La Rosa 2020-07-12 17:40:25 +02:00
parent b71a5e79e9
commit b48ad78471
3 changed files with 3 additions and 2 deletions

View File

@ -56,6 +56,7 @@ public final class BlockLimitation extends EnumLimitation<CompatibleMaterial> {
}
@Deprecated
public long getBlockLimit(Player player, Block block) {
return this.getBlockLimit(player, block.getType());
}

View File

@ -302,7 +302,7 @@ public class Block implements Listener {
BlockLimitation limits = plugin.getLimitationHandler().getInstance(BlockLimitation.class);
long limit = limits.getBlockLimit(player, block);
long limit = limits.getBlockLimit(player, block.getType());
if (limits.isBlockLimitExceeded(block, limit)) {
CompatibleMaterial material = null;

View File

@ -188,7 +188,7 @@ public class Interact implements Listener {
BlockLimitation limits = plugin.getLimitationHandler().getInstance(BlockLimitation.class);
long limit = limits.getBlockLimit(player, block);
long limit = limits.getBlockLimit(player, block.getType());
if (limits.isBlockLimitExceeded(block, limit)) {
plugin.getMessageManager().sendMessage(player,