- Fix other worlds

- Remove backslashes in escapeString too
- Remove unused import
This commit is contained in:
kaenganxt
2014-12-05 18:02:02 +01:00
parent 8ace34845d
commit e4be631f27
5 changed files with 4 additions and 5 deletions

View File

@@ -91,7 +91,7 @@ public class Core {
} else { } else {
chatColor = ChatColor.RED; chatColor = ChatColor.RED;
} }
P.sendMessage(ChatColor.GRAY + "[Anura] " + chatColor + Core.getl(id, Core.getPlayerLang(P))); statusMsg(P, id, chatColor);
} }
/** /**

View File

@@ -56,7 +56,7 @@ public class MySQL {
} }
public String escapeString(String text) { public String escapeString(String text) {
return text == null ? "" : text.replace("'", "\\'"); return text == null ? "" : text.replace("\\", "").replace("'", "\\'");
} }
private Boolean openConnection() { private Boolean openConnection() {

View File

@@ -224,7 +224,7 @@ public class Features implements Listener {
if (this.hasFeature(P, Feature.BOAT) && featureEnabled.get(P).get(Feature.BOAT)) { if (this.hasFeature(P, Feature.BOAT) && featureEnabled.get(P).get(Feature.BOAT)) {
if (P.getLocation().getBlock().getType().equals(Material.STATIONARY_WATER) && P.getVehicle() == null) { if (P.getLocation().getBlock().getType().equals(Material.STATIONARY_WATER) && P.getVehicle() == null) {
if (P.getLocation().distance(atwCenter) < 30) return; if (P.getWorld().equals(atwCenter.getWorld()) && P.getLocation().distance(atwCenter) < 30) return;
Boat b = (Boat) P.getWorld().spawnEntity(event.getTo(), EntityType.BOAT); Boat b = (Boat) P.getWorld().spawnEntity(event.getTo(), EntityType.BOAT);
b.setPassenger(P); b.setPassenger(P);
} }

View File

@@ -4,7 +4,6 @@ import de.anura.core.API.Core;
import de.anura.core.API.Errors; import de.anura.core.API.Errors;
import de.anura.core.AnuraCore; import de.anura.core.AnuraCore;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.UUID; import java.util.UUID;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;