Finished several core parts of the sponge port

Mass block changes / chunk packet sending
AsyncWorldEdit (buggy)
Fixed world ground cover layers being generated
Fixed tab completion
Fixed plot title color
Fixed worlds unloading when no players are present
Fixed falling blocks not falling where they should
Fixed console color
Fixed chunk regeneration on full plot worlds
Other stuff
This commit is contained in:
Jesse Boyd
2016-02-25 20:13:07 +11:00
parent d3465b7bde
commit efae2c2e63
23 changed files with 1051 additions and 493 deletions

View File

@ -1,10 +1,5 @@
package com.intellectualcrafters.plot.commands;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Objects;
import java.util.Set;
import com.intellectualcrafters.configuration.ConfigurationSection;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.config.C;
@ -12,26 +7,15 @@ import com.intellectualcrafters.plot.config.Configuration;
import com.intellectualcrafters.plot.generator.AugmentedUtils;
import com.intellectualcrafters.plot.generator.HybridGen;
import com.intellectualcrafters.plot.generator.HybridPlotWorld;
import com.intellectualcrafters.plot.object.ChunkLoc;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.PlotArea;
import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotMessage;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.RegionWrapper;
import com.intellectualcrafters.plot.object.RunnableVal;
import com.intellectualcrafters.plot.object.RunnableVal3;
import com.intellectualcrafters.plot.object.SetupObject;
import com.intellectualcrafters.plot.util.ChunkManager;
import com.intellectualcrafters.plot.util.CmdConfirm;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.MathMan;
import com.intellectualcrafters.plot.util.Permissions;
import com.intellectualcrafters.plot.util.SetupUtils;
import com.intellectualcrafters.plot.util.StringMan;
import com.intellectualcrafters.plot.util.WorldUtil;
import com.intellectualcrafters.plot.object.*;
import com.intellectualcrafters.plot.util.*;
import com.plotsquared.general.commands.CommandDeclaration;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Objects;
import java.util.Set;
@CommandDeclaration(
command = "area",
permission = "plots.area",
@ -166,6 +150,7 @@ public class Area extends SubCommand {
PlotArea area = areas.iterator().next();
pa.TYPE = area.TYPE;
}
pa.SIZE = (short) (pa.PLOT_WIDTH + pa.ROAD_WIDTH);
for (int i = 2; i < args.length; i++) {
String[] pair = args[i].split("=");
if (pair.length != 2) {

View File

@ -31,9 +31,6 @@ public class Middle extends SubCommand {
if (!plot.hasOwner()) {
return sendMessage(player, C.PLOT_UNOWNED);
}
if (!player.hasPermission("plots.middle")) {
return sendMessage(player, C.NO_PERMISSION, "plots.middle");
}
player.teleport(plot.getCenter());
return true;
}

View File

@ -21,7 +21,9 @@
package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PS;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.ChunkManager;
import com.intellectualcrafters.plot.util.MainUtil;
import com.intellectualcrafters.plot.util.StringMan;
import com.plotsquared.general.commands.CommandDeclaration;

View File

@ -5,10 +5,10 @@ import com.intellectualcrafters.plot.util.ChatManager;
public class PlotMessage {
private final Object builder;
private Object builder;
public PlotMessage() {
builder = ChatManager.manager.builder();
reset(ChatManager.manager);
}
public <T> T $(final ChatManager<T> manager) {
@ -19,6 +19,10 @@ public class PlotMessage {
this();
text(text);
}
public <T> T reset(ChatManager<T> manager) {
return (T) (builder = manager.builder());
}
public PlotMessage text(final String text) {
ChatManager.manager.text(this, text);

View File

@ -53,7 +53,6 @@ public class ReflectionUtils {
}
public static Method findMethod(Class<?> clazz, boolean isStatic, Class<?> returnType, Class... types) {
System.out.println("CLASS: " + clazz + " | " + isStatic + " | " + returnType + " | " + types.length);
loop: for (Method method : clazz.getMethods()) {
Class<?> result = method.getReturnType();
Class<?>[] param = method.getParameterTypes();