Minor fixes

Fixes #797
Fixes #794
This commit is contained in:
Jesse Boyd 2016-01-12 23:13:47 +11:00
parent af79100f7d
commit ad1272b0e5
11 changed files with 38 additions and 51 deletions

View File

@ -8,7 +8,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<artifactId>PlotSquared</artifactId> <artifactId>PlotSquared</artifactId>
<version>3.2.25</version> <version>3.2.26</version>
<name>PlotSquared</name> <name>PlotSquared</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<build> <build>

View File

@ -393,10 +393,8 @@ public class PS {
map = new ConcurrentHashMap<PlotId, Plot>(); map = new ConcurrentHashMap<PlotId, Plot>();
map.put(plot.id, plot); map.put(plot.id, plot);
plots.put(plot.world, map); plots.put(plot.world, map);
System.out.println("UPDATING PLOT 2!: " + plot);
return true; return true;
} else { } else {
System.out.println("UPDATING PLOT!: " + plot);
return map.put(plot.id, plot) == null; return map.put(plot.id, plot) == null;
} }
} }

View File

@ -640,7 +640,6 @@ public class SQLManager implements AbstractDB {
if (last == -1) { if (last == -1) {
last = subList.size(); last = subList.size();
statement = mod.getCreateMySQL(subList.size()); statement = mod.getCreateMySQL(subList.size());
System.out.print(statement);
preparedStmt = connection.prepareStatement(statement); preparedStmt = connection.prepareStatement(statement);
} }
if ((subList.size() != last) || (((count % 5000) == 0) && (count > 0))) { if ((subList.size() != last) || (((count % 5000) == 0) && (count > 0))) {

View File

@ -1482,11 +1482,9 @@ public class MainUtil {
* Create a plot and notify the world border and plot merger * Create a plot and notify the world border and plot merger
*/ */
public static Plot createPlot(final UUID uuid, final Plot plot) { public static Plot createPlot(final UUID uuid, final Plot plot) {
System.out.println("CLAIMING PLOT 1");
if (uuid == null) { if (uuid == null) {
return null; return null;
} }
System.out.println("CLAIMING PLOT 2");
Plot existing = PS.get().getPlot(plot.world, plot.id); Plot existing = PS.get().getPlot(plot.world, plot.id);
if (existing != null) { if (existing != null) {
return existing; return existing;

View File

@ -1,30 +1,5 @@
package com.intellectualcrafters.plot.util; package com.intellectualcrafters.plot.util;
import com.google.common.collect.Lists;
import com.intellectualcrafters.jnbt.ByteArrayTag;
import com.intellectualcrafters.jnbt.CompoundTag;
import com.intellectualcrafters.jnbt.IntTag;
import com.intellectualcrafters.jnbt.ListTag;
import com.intellectualcrafters.jnbt.NBTInputStream;
import com.intellectualcrafters.jnbt.NBTOutputStream;
import com.intellectualcrafters.jnbt.ShortTag;
import com.intellectualcrafters.jnbt.StringTag;
import com.intellectualcrafters.jnbt.Tag;
import com.intellectualcrafters.json.JSONArray;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.generator.ClassicPlotWorld;
import com.intellectualcrafters.plot.object.ChunkLoc;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotBlock;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.object.RegionWrapper;
import com.intellectualcrafters.plot.object.RunnableVal;
import com.intellectualcrafters.plot.object.schematic.PlotItem;
import com.plotsquared.object.schematic.StateWrapper;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
@ -54,6 +29,31 @@ import java.util.UUID;
import java.util.zip.GZIPInputStream; import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream; import java.util.zip.GZIPOutputStream;
import com.google.common.collect.Lists;
import com.intellectualcrafters.jnbt.ByteArrayTag;
import com.intellectualcrafters.jnbt.CompoundTag;
import com.intellectualcrafters.jnbt.IntTag;
import com.intellectualcrafters.jnbt.ListTag;
import com.intellectualcrafters.jnbt.NBTInputStream;
import com.intellectualcrafters.jnbt.NBTOutputStream;
import com.intellectualcrafters.jnbt.ShortTag;
import com.intellectualcrafters.jnbt.StringTag;
import com.intellectualcrafters.jnbt.Tag;
import com.intellectualcrafters.json.JSONArray;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.Settings;
import com.intellectualcrafters.plot.generator.ClassicPlotWorld;
import com.intellectualcrafters.plot.object.ChunkLoc;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotBlock;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotWorld;
import com.intellectualcrafters.plot.object.RegionWrapper;
import com.intellectualcrafters.plot.object.RunnableVal;
import com.intellectualcrafters.plot.object.schematic.PlotItem;
import com.plotsquared.object.schematic.StateWrapper;
public abstract class SchematicHandler { public abstract class SchematicHandler {
public static SchematicHandler manager; public static SchematicHandler manager;
@ -262,7 +262,6 @@ public abstract class SchematicHandler {
case 47: case 47:
case 48: case 48:
case 49: case 49:
case 50:
case 51: case 51:
case 55: case 55:
case 56: case 56:
@ -276,8 +275,6 @@ public abstract class SchematicHandler {
case 11: case 11:
case 73: case 73:
case 74: case 74:
case 75:
case 76:
case 78: case 78:
case 79: case 79:
case 80: case 80:

View File

@ -451,7 +451,12 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
MainUtil.sendMessage(pp, "&6An update for PlotSquared is available: &7/plot update"); MainUtil.sendMessage(pp, "&6An update for PlotSquared is available: &7/plot update");
} }
if (Settings.TELEPORT_ON_LOGIN && plot != null) { if (Settings.TELEPORT_ON_LOGIN && plot != null) {
MainUtil.teleportPlayer(pp, pp.getLocation(), plot); TaskManager.runTask(new Runnable() {
@Override
public void run() {
MainUtil.teleportPlayer(pp, pp.getLocation(), plot);
}
});
MainUtil.sendMessage(pp, C.TELEPORTED_TO_ROAD); MainUtil.sendMessage(pp, C.TELEPORTED_TO_ROAD);
} }
} }
@ -467,6 +472,9 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
final Player player = event.getPlayer(); final Player player = event.getPlayer();
final PlotPlayer pp = BukkitUtil.getPlayer(player); final PlotPlayer pp = BukkitUtil.getPlayer(player);
// Cancel teleport
TaskManager.TELEPORT_QUEUE.remove(pp.getName());
// Set last location // Set last location
Location loc = BukkitUtil.getLocation(to); Location loc = BukkitUtil.getLocation(to);
pp.setMeta("location", loc); pp.setMeta("location", loc);
@ -524,6 +532,9 @@ public class PlayerEvents extends com.plotsquared.listener.PlotListener implemen
final Player player = event.getPlayer(); final Player player = event.getPlayer();
final PlotPlayer pp = BukkitUtil.getPlayer(player); final PlotPlayer pp = BukkitUtil.getPlayer(player);
// Cancel teleport
TaskManager.TELEPORT_QUEUE.remove(pp.getName());
// Set last location // Set last location
Location loc = BukkitUtil.getLocation(to); Location loc = BukkitUtil.getLocation(to);
pp.setMeta("location", loc); pp.setMeta("location", loc);

View File

@ -58,7 +58,6 @@ public class BukkitLazyBlock extends LazyBlock {
case 47: case 47:
case 48: case 48:
case 49: case 49:
case 50:
case 51: case 51:
case 52: case 52:
case 54: case 54:
@ -76,8 +75,6 @@ public class BukkitLazyBlock extends LazyBlock {
case 11: case 11:
case 73: case 73:
case 74: case 74:
case 75:
case 76:
case 78: case 78:
case 79: case 79:
case 80: case 80:

View File

@ -23,7 +23,6 @@ package com.plotsquared.bukkit.util;
import java.util.ArrayDeque; import java.util.ArrayDeque;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
@ -44,13 +43,10 @@ import com.intellectualcrafters.jnbt.StringTag;
import com.intellectualcrafters.jnbt.Tag; import com.intellectualcrafters.jnbt.Tag;
import com.intellectualcrafters.plot.object.ChunkLoc; import com.intellectualcrafters.plot.object.ChunkLoc;
import com.intellectualcrafters.plot.object.Location; import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.Plot;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.RegionWrapper; import com.intellectualcrafters.plot.object.RegionWrapper;
import com.intellectualcrafters.plot.object.RunnableVal; import com.intellectualcrafters.plot.object.RunnableVal;
import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.SchematicHandler; import com.intellectualcrafters.plot.util.SchematicHandler;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.util.TaskManager; import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.object.schematic.StateWrapper; import com.plotsquared.object.schematic.StateWrapper;
@ -200,7 +196,6 @@ public class BukkitSchematicHandler extends SchematicHandler {
case 47: case 47:
case 48: case 48:
case 49: case 49:
case 50:
case 51: case 51:
case 55: case 55:
case 56: case 56:
@ -214,8 +209,6 @@ public class BukkitSchematicHandler extends SchematicHandler {
case 11: case 11:
case 73: case 73:
case 74: case 74:
case 75:
case 76:
case 78: case 78:
case 79: case 79:
case 80: case 80:

View File

@ -149,7 +149,6 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
case 47: case 47:
case 48: case 48:
case 49: case 49:
case 50:
case 51: case 51:
case 52: case 52:
case 54: case 54:
@ -167,8 +166,6 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
case 11: case 11:
case 73: case 73:
case 74: case 74:
case 75:
case 76:
case 78: case 78:
case 79: case 79:
case 80: case 80:

View File

@ -173,7 +173,6 @@ public class SpongeSchematicHandler extends SchematicHandler {
case 47: case 47:
case 48: case 48:
case 49: case 49:
case 50:
case 51: case 51:
case 55: case 55:
case 56: case 56:
@ -187,8 +186,6 @@ public class SpongeSchematicHandler extends SchematicHandler {
case 11: case 11:
case 73: case 73:
case 74: case 74:
case 75:
case 76:
case 78: case 78:
case 79: case 79:
case 80: case 80:

Binary file not shown.