- 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 {
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) {
return text == null ? "" : text.replace("'", "\\'");
return text == null ? "" : text.replace("\\", "").replace("'", "\\'");
}
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 (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);
b.setPassenger(P);
}

View File

@@ -32,7 +32,7 @@ public class FlowerPots {
}
return false;
}
private int getPotWaitTime(Integer pot) {
if (AnuraCore.getInstance().flowerPots.containsKey(pot)) {
if (AnuraCore.getInstance().flowerPotsWait.containsKey(pot)) {

View File

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