本帖最后由 583736449 于 2018-7-19 00:59 编辑
本插件适用于派系生存,原创生存等需要占领土地的生存服务器。我之前用过几款占领土地的插件如 LandLord,MassiveFaction 等,在区块的显示上都很不如意。大多都是不能自定义的问题,有些客户端的材质甚至根本看不到。我两年前开过的一个生存服,在区块的显示上用的是站内的一款 ChunkFinder... 我不多说,自行下载尝试。
本插件的粒子及显示坐标均可自定义
你甚至可以自定义粒子显示在什么位置,以什么样的形式显示。
复制代码

本插件需要 TabooLib 才可运行, 下载地址见个人签名档
配置文件比较飘逸,具体意义稍后更新,突然懒惰...
ChunkView.jar
(6.04 KB, 下载次数: 19)
复制代码
插件代码全部原创不存在抄袭/借鉴
来自群组: PluginsCDTribe
ChunkView
高自定义的区块查看器
当前版本 1.0-SNAPSHOT
当前版本 1.0-SNAPSHOT
功能
本插件适用于派系生存,原创生存等需要占领土地的生存服务器。我之前用过几款占领土地的插件如 LandLord,MassiveFaction 等,在区块的显示上都很不如意。大多都是不能自定义的问题,有些客户端的材质甚至根本看不到。我两年前开过的一个生存服,在区块的显示上用的是站内的一款 ChunkFinder... 我不多说,自行下载尝试。
本插件的粒子及显示坐标均可自定义
你甚至可以自定义粒子显示在什么位置,以什么样的形式显示。
命令
|
配置
- # 启用世界
- EnableWorld:
- - 'world'
- # 粒子类型
- ParticleType: FLAME
- # 粒子效果
- ParticleLine:
- - '0 0.2 0 0 5 6'
- - '0 0.2 0 0 5 5'
- - '0 0.2 0 0 5 4'
- - '0 0.2 0 0 5 3'
- - '0 0.2 0 0 5 2'
- - '0 0.2 0 0 5 1'
- - '0 0.2 0 0 5 0'
- - '0 0.2 0 0 5 -1'
- - '0 0.2 0 0 5 -2'
- # 粒子范围
- ParticleRange:
- - '# 0 # 0 # # 0 # # 0 # # 0 # 0 #'
- - '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
- - '# 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #'
- - '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
- - '# 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #'
- - '# 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #'
- - '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
- - '# 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #'
- - '# 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #'
- - '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
- - '# 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #'
- - '# 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #'
- - '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
- - '# 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #'
- - '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
- - '# 0 # 0 # # 0 # # 0 # # 0 # 0 #'
截图

下载
本插件需要 TabooLib 才可运行, 下载地址见个人签名档
配置文件比较飘逸,具体意义稍后更新,突然懒惰...

开源
- package me.skymc.chunkview;
- import com.ilummc.tlib.resources.TLocale;
- import me.skymc.taboolib.entity.EntityTag;
- import me.skymc.taboolib.fileutils.ConfigUtils;
- import me.skymc.taboolib.particle.EffLib;
- import org.bukkit.Bukkit;
- import org.bukkit.block.Block;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.command.ConsoleCommandSender;
- import org.bukkit.configuration.file.FileConfiguration;
- import org.bukkit.entity.Entity;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- import org.bukkit.scheduler.BukkitRunnable;
- import org.bukkit.util.NumberConversions;
- import java.util.List;
- /**
- * @author sky
- * @Since 2018-07-18 11:06
- */
- public class ChunkView extends JavaPlugin {
- private FileConfiguration conf;
- private EffLib particleType;
- private Boolean[][] particleRange;
- private ParticleLine[] particleLine;
- private BukkitRunnable displayRunnable = new BukkitRunnable() {
- @Override
- public void run() {
- List<String> enableWorld = conf.getStringList("EnableWorld");
- Bukkit.getOnlinePlayers().stream().filter(player -> enableWorld.contains(player.getWorld().getName()) && EntityTag.getInst().getBoolean("chunkView", player)).forEach(player -> displayPlayerChunk(player));
- }
- };
- @Override
- public void onEnable() {
- reloadConfig();
- displayRunnable.runTaskTimerAsynchronously(this, 0, conf.getInt("ParticleDelay", 10));
- }
- @Override
- public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
- if (sender instanceof ConsoleCommandSender) {
- sender.sendMessage("this command disabled on console.");
- return false;
- }
- if (args.length == 0) {
- if (EntityTag.getInst().getBoolean("chunkView", (Entity) sender)) {
- TLocale.sendTo("view-disable", sender);
- EntityTag.getInst().set("chunkView", false, (Entity) sender);
- } else {
- TLocale.sendTo("view-enable", sender);
- EntityTag.getInst().set("chunkView", true, (Entity) sender);
- }
- } else if (sender.hasPermission("*")) {
- reloadConfig();
- sender.sendMessage("reload successfully.");
- }
- return true;
- }
- @Override
- public void reloadConfig() {
- conf = ConfigUtils.saveDefaultConfig(this, "config.yml");
- List<String> particleLine = conf.getStringList("ParticleLine");
- this.particleLine = new ParticleLine[particleLine.size()];
- for (int i = 0; i < particleLine.size(); i++) {
- String[] split = particleLine.get(i).split(" ");
- this.particleLine[i] = new ParticleLine(
- NumberConversions.toFloat(split[0]),
- NumberConversions.toFloat(split[1]),
- NumberConversions.toFloat(split[2]),
- NumberConversions.toInt(split[3]),
- NumberConversions.toInt(split[4]),
- NumberConversions.toDouble(split[5]));
- }
- List<String> particleRange = conf.getStringList("ParticleRange");
- this.particleRange = new Boolean[16][];
- for (int i = 0; i < particleRange.size(); i++) {
- String[] split = particleRange.get(i).split(" ");
- Boolean[] range = new Boolean[16];
- for (int j = 0; j < 16; j++) {
- range[j] = split[j].equals("#");
- }
- this.particleRange[i] = range;
- }
- particleType = EffLib.fromName(conf.getString("ParticleType", "CLOUD"));
- }
- public void displayPlayerChunk(Player player) {
- Block blockStart = player.getLocation().getChunk().getBlock(16, player.getLocation().getBlockY(), 0);
- for (int x = 0; x < 16; x++) {
- for (int z = 0; z < 16; z++) {
- if (particleRange[x][z]) {
- Block block = blockStart.getLocation().add(x, 0, z).getBlock();
- for (ParticleLine particle : particleLine) {
- particleType.display(particle.getOffsetX(), particle.getOffsetY(), particle.getOffsetZ(), particle.getSpeed(), particle.getAmount(), block.getLocation().add(0.5, particle.getOffsetLocation(), 0.5), player);
- }
- }
- }
- }
- }
- class ParticleLine {
- private float offsetX;
- private float offsetY;
- private float offsetZ;
- private int speed;
- private int amount;
- private double offsetLocation;
- public ParticleLine(float offsetX, float offsetY, float offsetZ, int speed, int amount, double offsetLocation) {
- this.offsetX = offsetX;
- this.offsetY = offsetY;
- this.offsetZ = offsetZ;
- this.speed = speed;
- this.amount = amount;
- this.offsetLocation = offsetLocation;
- }
- public float getOffsetX() {
- return offsetX;
- }
- public float getOffsetY() {
- return offsetY;
- }
- public float getOffsetZ() {
- return offsetZ;
- }
- public int getSpeed() {
- return speed;
- }
- public int getAmount() {
- return amount;
- }
- public double getOffsetLocation() {
- return offsetLocation;
- }
- }
- }
插件代码全部原创不存在抄袭/借鉴
来自群组: PluginsCDTribe
沙发,支持原创~
支持原创 很有逼格
很强。支持原创!
挺不错的插件,支持作者 希望能有更棒的作品