gucandong
这个插件粗略看了下,很难相信是外国友人的作品,崩服神器。
内容如下:(致命部分红色)
public void PlayerJoin(PlayerJoinEvent e)
{
for (final Player p : Bukkit.getOnlinePlayers())
{
final String me = getConfig().getString("Disabled world 1");
final String me1 = getConfig().getString("Disabled world 2");
final String me2 = getConfig().getString("Disabled world 3");
final String me3 = getConfig().getString("Disabled world 4");
final String me4 = getConfig().getString("Disabled world 5");
final String me5 = getConfig().getString("Disabled world 6");
final String me6 = getConfig().getString("Disabled world 7");
final String me7 = getConfig().getString("Disabled world 8");
final String me8 = getConfig().getString("Disabled world 9");
final String me9 = getConfig().getString("Disabled world 10");
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable()
{
public void run() {
if (p.getWorld().getName().equals(me)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
}
else if (p.getWorld().getName().equals(me1)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
} else if (p.getWorld().getName().equals(me1)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
} else if (p.getWorld().getName().equals(me2)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
} else if (p.getWorld().getName().equals(me3)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
} else if (p.getWorld().getName().equals(me4)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
} else if (p.getWorld().getName().equals(me5)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
} else if (p.getWorld().getName().equals(me6)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
} else if (p.getWorld().getName().equals(me7)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
} else if (p.getWorld().getName().equals(me8)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
} else if (p.getWorld().getName().equals(me9)) {
p.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getNewScoreboard());
}
else {
p.getWorld();
ScoreboardBuilder.buildScoreboard(p);
}
}
}
, 0L, 200L);
}
}
总结:
没什么好总结的
2017-09-25 00:28:00