You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.3 KiB
54 lines
1.3 KiB
package cx.sfy.TheBridge.nms;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.Random;
|
|
|
|
import org.bukkit.Location;
|
|
import org.bukkit.World;
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.generator.BlockPopulator;
|
|
import org.bukkit.generator.ChunkGenerator;
|
|
|
|
import cx.sfy.TheBridge.packets.Reflection;
|
|
|
|
public class GenericNMS implements NMS {
|
|
|
|
@Override
|
|
public ChunkGenerator getChunkGenerator() {
|
|
return new ChunkGenerator() {
|
|
@Override
|
|
public List<BlockPopulator> getDefaultPopulators(World world) {
|
|
return Arrays.asList(new BlockPopulator[0]);
|
|
}
|
|
|
|
@Override
|
|
public boolean canSpawn(World world, int x, int z) {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public byte[] generate(World world, Random random, int x, int z) {
|
|
return new byte[32768];
|
|
}
|
|
|
|
@Override
|
|
public Location getFixedSpawnLocation(World world, Random random) {
|
|
return new Location(world, 0.0D, 64.0D, 0.0D);
|
|
}
|
|
};
|
|
}
|
|
|
|
@Override
|
|
public void sendTitle(Player player, int fadein, int stay, int fadeout, String title, String subtitle) {
|
|
Reflection.sendTitle(player, fadein, stay, fadeout, title, subtitle);
|
|
|
|
}
|
|
|
|
@Override
|
|
public void sendActionBar(Player player, String s) {
|
|
Reflection.sendAction(player, s);
|
|
|
|
}
|
|
|
|
}
|