Update Bukkit Interfaces to allow for compilation

Dieser Commit ist enthalten in:
MattBDev 2020-04-10 13:21:13 -04:00
Ursprung 092bf98ea5
Commit 8d1efcfb21
2 geänderte Dateien mit 117 neuen und 0 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

@ -20,7 +20,10 @@
package com.sk89q.wepif; package com.sk89q.wepif;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer; import org.bukkit.OfflinePlayer;
import org.bukkit.Statistic;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.permissions.Permissible; import org.bukkit.permissions.Permissible;
import org.bukkit.permissions.Permission; import org.bukkit.permissions.Permission;
@ -34,6 +37,7 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import org.jetbrains.annotations.NotNull;
public class TestOfflinePermissible implements OfflinePlayer, Permissible { public class TestOfflinePermissible implements OfflinePlayer, Permissible {
private boolean op; private boolean op;
@ -195,4 +199,109 @@ public class TestOfflinePermissible implements OfflinePlayer, Permissible {
public long getLastSeen() { public long getLastSeen() {
throw new UnsupportedOperationException("Not supported yet."); 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) {
}
} }