Update Bukkit Interfaces to allow for compilation

This commit is contained in:
MattBDev 2020-04-10 13:21:13 -04:00
parent 092bf98ea5
commit 8d1efcfb21
2 changed files with 117 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.world.block.BlockTypesCache;
import java.util.Collections;
import org.bukkit.FluidCollisionMode;
import org.bukkit.Location;
import org.bukkit.Material;
@ -20,6 +21,7 @@ import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.PistonMoveReaction;
import org.bukkit.block.data.BlockData;
import org.bukkit.entity.Entity;
import org.bukkit.inventory.ItemStack;
import org.bukkit.metadata.MetadataValue;
import org.bukkit.plugin.Plugin;
@ -30,6 +32,7 @@ import org.jetbrains.annotations.NotNull;
import java.util.Collection;
import java.util.List;
import org.jetbrains.annotations.Nullable;
public class AsyncBlock implements Block {
@ -386,4 +389,9 @@ public class AsyncBlock implements Block {
public @NotNull BlockSoundGroup getSoundGroup() {
return TaskManager.IMP.sync(() -> getUnsafeBlock().getSoundGroup());
}
public Collection<ItemStack> getDrops(ItemStack tool, Entity entity) {
return Collections.emptyList(); //todo
}
}

View File

@ -20,7 +20,10 @@
package com.sk89q.wepif;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
import org.bukkit.Statistic;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.permissions.Permissible;
import org.bukkit.permissions.Permission;
@ -34,6 +37,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import org.jetbrains.annotations.NotNull;
public class TestOfflinePermissible implements OfflinePlayer, Permissible {
private boolean op;
@ -195,4 +199,109 @@ public class TestOfflinePermissible implements OfflinePlayer, Permissible {
public long getLastSeen() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void incrementStatistic(@NotNull Statistic statistic) throws IllegalArgumentException {
}
@Override
public void decrementStatistic(@NotNull Statistic statistic) throws IllegalArgumentException {
}
@Override
public void incrementStatistic(@NotNull Statistic statistic, int amount)
throws IllegalArgumentException {
}
@Override
public void decrementStatistic(@NotNull Statistic statistic, int amount)
throws IllegalArgumentException {
}
@Override
public void setStatistic(@NotNull Statistic statistic, int newValue)
throws IllegalArgumentException {
}
@Override
public int getStatistic(@NotNull Statistic statistic) throws IllegalArgumentException {
return 0;
}
@Override
public void incrementStatistic(@NotNull Statistic statistic, @NotNull Material material)
throws IllegalArgumentException {
}
@Override
public void decrementStatistic(@NotNull Statistic statistic, @NotNull Material material)
throws IllegalArgumentException {
}
@Override
public int getStatistic(@NotNull Statistic statistic, @NotNull Material material)
throws IllegalArgumentException {
return 0;
}
@Override
public void incrementStatistic(@NotNull Statistic statistic, @NotNull Material material,
int amount) throws IllegalArgumentException {
}
@Override
public void decrementStatistic(@NotNull Statistic statistic, @NotNull Material material,
int amount) throws IllegalArgumentException {
}
@Override
public void setStatistic(@NotNull Statistic statistic, @NotNull Material material, int newValue)
throws IllegalArgumentException {
}
@Override
public void incrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType)
throws IllegalArgumentException {
}
@Override
public void decrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType)
throws IllegalArgumentException {
}
@Override
public int getStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType)
throws IllegalArgumentException {
return 0;
}
@Override
public void incrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType,
int amount) throws IllegalArgumentException {
}
@Override
public void decrementStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType,
int amount) {
}
@Override
public void setStatistic(@NotNull Statistic statistic, @NotNull EntityType entityType,
int newValue) {
}
}