Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
实时编辑器
折叠未更改行
关闭换行
视图
拆分
统一
比对精度
智能
单词
字符
语法高亮
选择语法
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
Untitled diff
创建于
8年前
差异永不过期
清除
导出
分享
解释
44 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
50 行
全部复制
35 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
41 行
全部复制
if(sub.equalsIgnoreCase("spawn")){
if(sub.equalsIgnoreCase("spawn")){
if(p.hasPermission("potpvp.spawn")){
if(p.hasPermission("potpvp.spawn")){
复制
已复制
复制
已复制
if (
Main.instance.getConfig()
.getConfigurationSection("spawn") == null) {
FileConfiguration conf =
Main.instance.getConfig()
;
if (conf
.getConfigurationSection("spawn") == null) {
p.getPlayer().sendMessage("§cThe spawn has not yet been set!");
p.getPlayer().sendMessage("§cThe spawn has not yet been set!");
return true;
return true;
}
}
复制
已复制
复制
已复制
if(contadorempezado == false) {
if(listaDePlayersTeletransportando.contains(p.getUniqueId())){
contadorempezado = true;
conf
.getString("messages.spawn-start-cooldown").replace(
"&", "§"); //Que es esto, no mensaje de "ya estas teletransportando"?
Main.instance.getConfig()
.getString("messages.spawn-start-cooldown").replace(
'&', '§');
return true;
new BukkitRunnable(){
}
@EventHandler
listaDePlayersTeletransportando.add(p.getUniqueId());
public void onMove(PlayerMoveEvent e){
conf
.getString("messages.spawn-
start-cooldown")
.replace('&', '§')
;
if(contadorempezado==true){
new BukkitRunnable
(){
e.getPlayer().sendMessage(Main.instance.getConfig()
.getString("messages.spawn-
cancel")
Location stored = p.getLocation().clone();
.replace('&', '§')
)
;
public void run() {
this.cancel();
if(contador > 0) {
}
Location current = p.getLocation();
}
if(current.getX() != stored.getX() && current.getZ() != stored.getZ()) {
public void run
(){
cancel(); //envia mensaje 'countdown cancelled'
if(contador > 1) {
return;
contador = contador-1;
DecimalFormat df = new DecimalFormat("#.#");
p.sendMessage(Bukkit.getPluginManager().getPlugin("PotPvP").getConfig()
.getString("messages.spawn-cooldown").replace('&', '§')
.replace("{time}", df.format(contador)));
} else {
this.cancel();
Main.instance.getConfig().getString("messages.spawn").replace("&", "§");
contador = Main.instance.getConfig().getInt("spawn-cooldown");
World w = Bukkit.getWorld(Main.instance.getConfig().getString("spawn.world"));
double x = Main.instance.getConfig().getDouble("spawn.x");
double y = Main.instance.getConfig().getDouble("spawn.y");
double z = Main.instance.getConfig().getDouble("spawn.z");
p.teleport(new Location(w,x,y,z));
Bukkit.getScheduler().runTaskLater(Main.instance, new Runnable(){
@Override
public void run() {
contadorempezado = false;
}
}, Main.instance.getConfig().getInt("spawn-cooldown")*20L);
}
}
复制
已复制
复制
已复制
contador = contador-1;
DecimalFormat df = new DecimalFormat("#.#"); //si contador es un integer, no es necessario..
p.sendMessage(conf.getString("messages.spawn-cooldown").replace('&', '§')
.replace("{time}", df.format(contador)));
} else {
this.cancel();
conf.getString("messages.spawn").replace("&", "§");
contador = conf.getInt("spawn-cooldown");
World w = Bukkit.getWorld(conf.getString("spawn.world"));
double x = conf.getDouble("spawn.x");
double y = conf.getDouble("spawn.y");
double z = conf.getDouble("spawn.z");
p.teleport(new Location(w,x,y,z));
listaDePlayersTeletransportando.remove(p.getUniqueId());
}
}
复制
已复制
复制
已复制
}
.runTaskTimer(Main.instance, 20L, 20L);
}
}
.runTaskTimer(Main.instance, 20L, 20L);
}else if(contadorempezado == true){
Main.instance.getConfig().getString("messages.spawn-start-cooldown").replace("&", "§");
}
}
}
}
}
已保存差异
原始文本
打开文件
if(sub.equalsIgnoreCase("spawn")){ if(p.hasPermission("potpvp.spawn")){ if (Main.instance.getConfig().getConfigurationSection("spawn") == null) { p.getPlayer().sendMessage("§cThe spawn has not yet been set!"); return true; } if(contadorempezado == false) { contadorempezado = true; Main.instance.getConfig().getString("messages.spawn-start-cooldown").replace('&', '§'); new BukkitRunnable(){ @EventHandler public void onMove(PlayerMoveEvent e){ if(contadorempezado==true){ e.getPlayer().sendMessage(Main.instance.getConfig().getString("messages.spawn-cancel") .replace('&', '§')); this.cancel(); } } public void run(){ if(contador > 1) { contador = contador-1; DecimalFormat df = new DecimalFormat("#.#"); p.sendMessage(Bukkit.getPluginManager().getPlugin("PotPvP").getConfig() .getString("messages.spawn-cooldown").replace('&', '§') .replace("{time}", df.format(contador))); } else { this.cancel(); Main.instance.getConfig().getString("messages.spawn").replace("&", "§"); contador = Main.instance.getConfig().getInt("spawn-cooldown"); World w = Bukkit.getWorld(Main.instance.getConfig().getString("spawn.world")); double x = Main.instance.getConfig().getDouble("spawn.x"); double y = Main.instance.getConfig().getDouble("spawn.y"); double z = Main.instance.getConfig().getDouble("spawn.z"); p.teleport(new Location(w,x,y,z)); Bukkit.getScheduler().runTaskLater(Main.instance, new Runnable(){ @Override public void run() { contadorempezado = false; } }, Main.instance.getConfig().getInt("spawn-cooldown")*20L); } } }.runTaskTimer(Main.instance, 20L, 20L); }else if(contadorempezado == true){ Main.instance.getConfig().getString("messages.spawn-start-cooldown").replace("&", "§"); } } }
更改后文本
打开文件
if(sub.equalsIgnoreCase("spawn")){ if(p.hasPermission("potpvp.spawn")){ FileConfiguration conf = Main.instance.getConfig(); if (conf.getConfigurationSection("spawn") == null) { p.getPlayer().sendMessage("§cThe spawn has not yet been set!"); return true; } if(listaDePlayersTeletransportando.contains(p.getUniqueId())){ conf.getString("messages.spawn-start-cooldown").replace("&", "§"); //Que es esto, no mensaje de "ya estas teletransportando"? return true; } listaDePlayersTeletransportando.add(p.getUniqueId()); conf.getString("messages.spawn-start-cooldown").replace('&', '§'); new BukkitRunnable(){ Location stored = p.getLocation().clone(); public void run() { if(contador > 0) { Location current = p.getLocation(); if(current.getX() != stored.getX() && current.getZ() != stored.getZ()) { cancel(); //envia mensaje 'countdown cancelled' return; } contador = contador-1; DecimalFormat df = new DecimalFormat("#.#"); //si contador es un integer, no es necessario.. p.sendMessage(conf.getString("messages.spawn-cooldown").replace('&', '§') .replace("{time}", df.format(contador))); } else { this.cancel(); conf.getString("messages.spawn").replace("&", "§"); contador = conf.getInt("spawn-cooldown"); World w = Bukkit.getWorld(conf.getString("spawn.world")); double x = conf.getDouble("spawn.x"); double y = conf.getDouble("spawn.y"); double z = conf.getDouble("spawn.z"); p.teleport(new Location(w,x,y,z)); listaDePlayersTeletransportando.remove(p.getUniqueId()); } } }.runTaskTimer(Main.instance, 20L, 20L); } }
查找差异