Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide whitespace changes
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Text styles
Change appearance
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Untitled diff
Created
9 years ago
Diff never expires
Clear
Export
Share
Explain
50 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
50 lines
Copy
18 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
35 lines
Copy
if(sub.equalsIgnoreCase("spawn")){
if(sub.equalsIgnoreCase("spawn")){
if(p.hasPermission("potpvp.spawn")){
if(p.hasPermission("potpvp.spawn")){
Copy
Copied
Copy
Copied
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;
}
}
Copy
Copied
Copy
Copied
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(){
Copy
Copied
Copy
Copied
@EventHandler
public void onMove(PlayerMoveEvent e){
if(contadorempezado==true){
e.getPlayer().sendMessage(Main.instance.getConfig().getString("messages.spawn-cancel")
.replace('&', '§'));
this.cancel();
}
}
Copy
Copied
Copy
Copied
public void run(){
public void run(){
if(contador >
1
) {
if(contador >
0
) {
contador = contador-1;
contador = contador-1;
DecimalFormat df = new DecimalFormat("#.#");
DecimalFormat df = new DecimalFormat("#.#");
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()); //y haz esto en movimiento evento tambien
@Override
public void run() {
contadorempezado = false;
}
}, Main.instance.getConfig().getInt("spawn-cooldown")*20L);
}
}
}
}
}.runTaskTimer(Main.instance, 20L, 20L);
}.runTaskTimer(Main.instance, 20L, 20L);
Copy
Copied
Copy
Copied
}else if(contadorempezado == true){
Main.instance.getConfig().getString("messages.spawn-start-cooldown").replace("&", "§");
}
}
}
}
}
Saved diffs
Original text
Open file
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("&", "§"); } } }
Changed text
Open file
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(){ public void run(){ if(contador > 0) { contador = contador-1; DecimalFormat df = new DecimalFormat("#.#"); 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()); //y haz esto en movimiento evento tambien } } }.runTaskTimer(Main.instance, 20L, 20L); } }
Find difference