Implement missing FakeWorld and OfflinePlayer methods

This commit is contained in:
md678685 2018-10-13 15:26:58 +01:00
parent e9b1511117
commit 18feb7967a
2 changed files with 37 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import org.bukkit.advancement.AdvancementProgress;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.PistonMoveReaction;
import org.bukkit.block.data.BlockData;
import org.bukkit.conversations.Conversation;
@ -956,6 +957,26 @@ public class OfflinePlayer implements Player {
return 0;
}
@Override
public boolean discoverRecipe(NamespacedKey recipe) {
return false;
}
@Override
public int discoverRecipes(Collection<NamespacedKey> recipes) {
return 0;
}
@Override
public boolean undiscoverRecipe(NamespacedKey recipe) {
return false;
}
@Override
public int undiscoverRecipes(Collection<NamespacedKey> recipes) {
return 0;
}
@Override
public boolean hasLineOfSight(Entity entity) {
return false;
@ -1530,7 +1551,12 @@ public class OfflinePlayer implements Player {
return null;
}
@Override
@Override
public BlockFace getFacing() {
return null;
}
@Override
public void updateCommands() {
}
}

View File

@ -84,6 +84,11 @@ public class FakeWorld implements World {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean isChunkGenerated(int x, int z) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void loadChunk(int i, int i1) {
throw new UnsupportedOperationException("Not supported yet.");
@ -714,6 +719,11 @@ public class FakeWorld implements World {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Location locateNearestStructure(Location origin, StructureType structureType, int radius, boolean findUnexplored) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<Entity> getNearbyEntities(Location loc, double x, double y, double z) {
throw new UnsupportedOperationException("Not supported yet.");