Diff
checker
텍스트
텍스트
이미지
문서
Excel
폴더
Legal
Enterprise
데스크톱
요금제
로그인
데스크톱 앱 다운로드
텍스트 비교
두 텍스트 파일의 차이점을 찾아보세요
도구
기록
실시간 편집
공백 변경 숨기기
변경 없는 행 숨기기
줄바꿈 비활성화
레이아웃
나란히 보기
합쳐 보기
비교 단위
스마트
단어
글자
텍스트 스타일
모양 변경
구문 강조
언어 선택
제외
텍스트 변환
첫 변경으로
수정
Diffchecker Desktop
가장 안전하게 Diffchecker를 사용하는 방법. 데스크톱 앱을 사용하면 비교 데이터가 외부로 전송되지 않습니다!
데스크톱 앱 받기
Untitled diff
생성일
9년 전
비교 결과 만료 없음
초기화
내보내기
공유
설명
49 삭제
행
총
삭제
글자
총
삭제
이 기능을 계속 사용하려면 업그레이드해 주세요
Diff
checker
Pro
요금제 보기
50 행
복사
26 추가
행
총
추가
글자
총
추가
이 기능을 계속 사용하려면 업그레이드해 주세요
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;
}
listaDePlayersTeletransportando.add(p.getUniqueId());
conf
.getString("messages.spawn-start-cooldown").replace('&', '§');
new BukkitRunnable(){
new BukkitRunnable(){
@EventHandler
Location stored = p.getLocation().clone();
public void onMove(PlayerMoveEvent e){
public void run() {
if(contadorempezado==true){
if(contador > 0) {
e.getPlayer().sendMessage(Main.instance.getConfig().getString("messages.spawn-cancel")
Location current = p.getLocation();
.replace('&', '§'));
if(current.getX() != stored.getX() && current.getZ() != stored.getZ()) {
this.cancel();
cancel(); //envia mensaje 'countdown cancelled'
return;
}
}
복사
복사됨
복사
복사됨
}
public void run(){
if(contador > 1) {
복사
복사됨
복사
복사됨
contador = contador-1;
contador = contador-1;
DecimalFormat df = new DecimalFormat("#.#");
DecimalFormat df = new DecimalFormat("#.#");
//si contador es un integer, no es necessario..
p.sendMessage(
Bukkit.getPluginManager().getPlugin("PotPvP").getConfig()
p.sendMessage(
conf
.getString("messages.spawn-cooldown").replace('&', '§')
.getString("messages.spawn-cooldown").replace('&', '§')
.replace("{time}", df.format(contador)));
.replace("{time}", df.format(contador)));
} else {
} else {
this.cancel();
this.cancel();
Main.instance.getConfig()
.getString("messages.spawn").replace("&", "§");
conf
.getString("messages.spawn").replace("&", "§");
contador =
Main.instance.getConfig()
.getInt("spawn-cooldown");
contador =
conf
.getInt("spawn-cooldown");
World w = Bukkit.getWorld(
Main.instance.getConfig()
.getString("spawn.world"));
World w = Bukkit.getWorld(
conf
.getString("spawn.world"));
double x =
Main.instance.getConfig()
.getDouble("spawn.x");
double x =
conf
.getDouble("spawn.x");
double y =
Main.instance.getConfig()
.getDouble("spawn.y");
double y =
conf
.getDouble("spawn.y");
double z =
Main.instance.getConfig()
.getDouble("spawn.z");
double z =
conf
.getDouble("spawn.z");
p.teleport(new Location(w,x,y,z));
p.teleport(new Location(w,x,y,z));
Bukkit.getScheduler().runTaskLater(Main.instance, new Runnable(){
listaDePlayersTeletransportando.remove(p.getUniqueId());
@Override
public void run() {
contadorempezado = false;
}
}, Main.instance.getConfig().getInt("spawn-cooldown")*20L);
}
}
}
}
}.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); } }
비교하기