# Conflicts:
#	src/main/java/com/intellectualcrafters/plot/config/C.java
This commit is contained in:
Jesse Boyd 2015-11-28 22:49:42 +11:00
commit d1ac355e58
8 changed files with 196 additions and 198 deletions

View File

@ -13,12 +13,12 @@ is to provide a lag-free and smooth experience.
* [Spigot Page](https://www.spigotmc.org/resources/plotsquared.1177/) * [Spigot Page](https://www.spigotmc.org/resources/plotsquared.1177/)
* [WebChat/IRC](http://webchat.esper.net/?nick=&channels=IntellectualCrafters&fg_color=000&fg_sec_color=000&bg_color=FFF) * [WebChat/IRC](http://webchat.esper.net/?nick=&channels=IntellectualCrafters&fg_color=000&fg_sec_color=000&bg_color=FFF)
* [Wiki](https://github.com/intellectualcrafters/plotsquared/wiki) * [Wiki](https://github.com/intellectualcrafters/plotsquared/wiki)
* [Website](http://plotsquared.com) * [~~Website~~](http://plotsquared.com)
### Developer Resources ### Developer Resources
* *Outdated* [JavaDocs](http://empcraft.com/plotsquared/doc/) * *Outdated* [JavaDocs](http://empcraft.com/plotsquared/doc/)
* [Build Server](http://ci.intellectualsites.com/job/PlotSquared/) * [~~Build Server~~](http://ci.intellectualsites.com/job/PlotSquared/)
* [Maven Repo](http://mvn.intellectualsites.com/content/repositories/intellectualsites/) * [~~Maven Repo~~](http://mvn.intellectualsites.com/content/repositories/intellectualsites/)
# Maven # Maven

View File

@ -4,6 +4,7 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.PS;
@ -34,7 +35,7 @@ public class DebugPaste extends SubCommand {
try { try {
latestLOG = HastebinUtility.upload(new File(BukkitMain.THIS.getDirectory(), "../../logs/latest.log")); latestLOG = HastebinUtility.upload(new File(BukkitMain.THIS.getDirectory(), "../../logs/latest.log"));
} catch (final Exception e) { } catch (final Exception e) {
plr.sendMessage("&clatest.log is too big to be pasted, will ignore"); plr.sendMessage(ChatColor.RED + "latest.log is too big to be pasted, will ignore");
latestLOG = "too big :("; latestLOG = "too big :(";
} }
final StringBuilder b = new StringBuilder(); final StringBuilder b = new StringBuilder();

View File

@ -374,7 +374,7 @@ public enum C {
* Player not found * Player not found
*/ */
INVALID_PLAYER_WAIT("$2Player not found: $1%s$2, fetching it. Try again soon.", "Errors"), INVALID_PLAYER_WAIT("$2Player not found: $1%s$2, fetching it. Try again soon.", "Errors"),
INVALID_PLAYER("$2Player not found: $1%s.", "Errors"), INVALID_PLAYER("$2Player not found: $1%s$2.", "Errors"),
INVALID_PLAYER_OFFLINE("$2The player must be online: $1%s.", "Errors"), INVALID_PLAYER_OFFLINE("$2The player must be online: $1%s.", "Errors"),
// SETTINGS_PASTE_UPLOADED("$2settings.yml was uploaded to: $1%url%", "Paste"), // SETTINGS_PASTE_UPLOADED("$2settings.yml was uploaded to: $1%url%", "Paste"),
// LATEST_LOG_UPLOADED("$2latest.log was uploaded to: $1%url%", "Paste"), // LATEST_LOG_UPLOADED("$2latest.log was uploaded to: $1%url%", "Paste"),

View File

@ -80,6 +80,7 @@ import com.plotsquared.sponge.util.SpongeUtil;
import com.plotsquared.sponge.uuid.SpongeLowerOfflineUUIDWrapper; import com.plotsquared.sponge.uuid.SpongeLowerOfflineUUIDWrapper;
import com.plotsquared.sponge.uuid.SpongeOnlineUUIDWrapper; import com.plotsquared.sponge.uuid.SpongeOnlineUUIDWrapper;
import com.plotsquared.sponge.uuid.SpongeUUIDHandler; import com.plotsquared.sponge.uuid.SpongeUUIDHandler;
import org.spongepowered.api.world.WorldBuilder;
/** /**
* Created by robin on 01/11/2014 * Created by robin on 01/11/2014
@ -263,7 +264,7 @@ public class SpongeMain implements IPlotMain, PluginContainer {
case 0: { case 0: {
modify = new WorldModify(generator, false); modify = new WorldModify(generator, false);
game.getRegistry().registerWorldGeneratorModifier(modify); game.getRegistry().registerWorldGeneratorModifier(modify);
final Optional<World> builder = game.getRegistry().createWorldBuilder().name(world).enabled(true).loadsOnStartup(true).keepsSpawnLoaded(true).dimensionType(DimensionTypes.OVERWORLD) final Optional<World> builder = game.getRegistry().createBuilder(WorldBuilder.class).name(world).enabled(true).loadsOnStartup(true).keepsSpawnLoaded(true).dimensionType(DimensionTypes.OVERWORLD)
.generator(GeneratorTypes.FLAT).usesMapFeatures(false).generatorModifiers(modify).build(); .generator(GeneratorTypes.FLAT).usesMapFeatures(false).generatorModifiers(modify).build();
return builder.get(); return builder.get();
} }
@ -271,7 +272,7 @@ public class SpongeMain implements IPlotMain, PluginContainer {
default: { default: {
modify = new WorldModify(generator, true); modify = new WorldModify(generator, true);
game.getRegistry().registerWorldGeneratorModifier(modify); game.getRegistry().registerWorldGeneratorModifier(modify);
final Optional<World> builder = game.getRegistry().createWorldBuilder().name(world).enabled(true).loadsOnStartup(true).keepsSpawnLoaded(true).dimensionType(DimensionTypes.OVERWORLD) final Optional<World> builder = game.getRegistry().createBuilder(WorldBuilder.class).name(world).enabled(true).loadsOnStartup(true).keepsSpawnLoaded(true).dimensionType(DimensionTypes.OVERWORLD)
.generator(GeneratorTypes.OVERWORLD).usesMapFeatures(false).generatorModifiers(modify).build(); .generator(GeneratorTypes.OVERWORLD).usesMapFeatures(false).generatorModifiers(modify).build();
return builder.get(); return builder.get();
} }

View File

@ -6,9 +6,7 @@ import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.item.ItemType; import org.spongepowered.api.item.ItemType;
import org.spongepowered.api.item.ItemTypes; import org.spongepowered.api.item.ItemTypes;
import org.spongepowered.api.item.inventory.Carrier; import org.spongepowered.api.item.inventory.Carrier;
import org.spongepowered.api.item.inventory.Inventories;
import org.spongepowered.api.item.inventory.ItemStack; import org.spongepowered.api.item.inventory.ItemStack;
import org.spongepowered.api.item.inventory.ItemStackBuilder;
import org.spongepowered.api.item.inventory.custom.CustomInventory; import org.spongepowered.api.item.inventory.custom.CustomInventory;
import org.spongepowered.api.item.inventory.property.SlotIndex; import org.spongepowered.api.item.inventory.property.SlotIndex;
import org.spongepowered.api.item.inventory.type.CarriedInventory; import org.spongepowered.api.item.inventory.type.CarriedInventory;
@ -22,10 +20,10 @@ import com.plotsquared.sponge.object.SpongePlayer;
public class SpongeInventoryUtil extends InventoryUtil { public class SpongeInventoryUtil extends InventoryUtil {
public ItemStackBuilder builder; public ItemStack.Builder builder;
public SpongeInventoryUtil() { public SpongeInventoryUtil() {
builder = SpongeMain.THIS.getGame().getRegistry().createItemBuilder(); builder = SpongeMain.THIS.getGame().getRegistry().createBuilder(ItemStack.Builder.class);
} }
@Override @Override
@ -34,7 +32,7 @@ public class SpongeInventoryUtil extends InventoryUtil {
final SpongePlayer sp = (SpongePlayer) inv.player; final SpongePlayer sp = (SpongePlayer) inv.player;
final Player player = sp.player; final Player player = sp.player;
final CustomInventory inventory = Inventories.customInventoryBuilder().name(SpongeMain.THIS.getTranslation(inv.getTitle())).size(inv.size).build(); final CustomInventory inventory = SpongeMain.THIS.getGame().getRegistry().createBuilder(CustomInventory.Builder.class).name(SpongeMain.THIS.getTranslation(inv.getTitle()).getTranslation()).size(inv.size).build();
final PlotItemStack[] items = inv.getItems(); final PlotItemStack[] items = inv.getItems();
for (int i = 0; i < (inv.size * 9); i++) { for (int i = 0; i < (inv.size * 9); i++) {
final PlotItemStack item = items[i]; final PlotItemStack item = items[i];

View File

@ -52,7 +52,6 @@ import ninja.leaping.configurate.loader.ConfigurationLoader;
import org.spongepowered.api.Game; import org.spongepowered.api.Game;
import org.spongepowered.api.plugin.PluginContainer; import org.spongepowered.api.plugin.PluginContainer;
import org.spongepowered.api.service.scheduler.Task; import org.spongepowered.api.service.scheduler.Task;
import org.spongepowered.api.service.scheduler.TaskBuilder;
import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.PS;
@ -184,7 +183,7 @@ public class SpongeMetrics {
} }
// Begin hitting the server with glorious data // Begin hitting the server with glorious data
final TaskBuilder builder = game.getScheduler().createTaskBuilder(); final Task.Builder builder = game.getScheduler().createTaskBuilder();
builder.async().interval(PING_INTERVAL, TimeUnit.MINUTES).execute(new Runnable() { builder.async().interval(PING_INTERVAL, TimeUnit.MINUTES).execute(new Runnable() {
private boolean firstPost = true; private boolean firstPost = true;

View File

@ -4,7 +4,6 @@ import java.util.HashMap;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import org.spongepowered.api.service.scheduler.Task; import org.spongepowered.api.service.scheduler.Task;
import org.spongepowered.api.service.scheduler.TaskBuilder;
import com.intellectualcrafters.plot.util.TaskManager; import com.intellectualcrafters.plot.util.TaskManager;
import com.plotsquared.sponge.SpongeMain; import com.plotsquared.sponge.SpongeMain;
@ -18,8 +17,8 @@ public class SpongeTaskManager extends TaskManager {
@Override @Override
public int taskRepeat(final Runnable r, final int interval) { public int taskRepeat(final Runnable r, final int interval) {
final int val = i.incrementAndGet(); final int val = i.incrementAndGet();
final TaskBuilder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder(); final Task.Builder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder();
final TaskBuilder built = builder.delayTicks(interval).intervalTicks(interval).execute(r); final Task.Builder built = builder.delayTicks(interval).intervalTicks(interval).execute(r);
final Task task = built.submit(SpongeMain.THIS.getPlugin()); final Task task = built.submit(SpongeMain.THIS.getPlugin());
tasks.put(val, task); tasks.put(val, task);
return val; return val;
@ -28,8 +27,8 @@ public class SpongeTaskManager extends TaskManager {
@Override @Override
public int taskRepeatAsync(final Runnable r, final int interval) { public int taskRepeatAsync(final Runnable r, final int interval) {
final int val = i.incrementAndGet(); final int val = i.incrementAndGet();
final TaskBuilder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder(); final Task.Builder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder();
final TaskBuilder built = builder.delayTicks(interval).async().intervalTicks(interval).execute(r); final Task.Builder built = builder.delayTicks(interval).async().intervalTicks(interval).execute(r);
final Task task = built.submit(SpongeMain.THIS.getPlugin()); final Task task = built.submit(SpongeMain.THIS.getPlugin());
tasks.put(val, task); tasks.put(val, task);
return val; return val;
@ -37,25 +36,25 @@ public class SpongeTaskManager extends TaskManager {
@Override @Override
public void taskAsync(final Runnable r) { public void taskAsync(final Runnable r) {
final TaskBuilder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder(); final Task.Builder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder();
builder.async().execute(r).submit(SpongeMain.THIS.getPlugin()); builder.async().execute(r).submit(SpongeMain.THIS.getPlugin());
} }
@Override @Override
public void task(final Runnable r) { public void task(final Runnable r) {
final TaskBuilder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder(); final Task.Builder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder();
builder.execute(r).submit(SpongeMain.THIS.getPlugin()); builder.execute(r).submit(SpongeMain.THIS.getPlugin());
} }
@Override @Override
public void taskLater(final Runnable r, final int delay) { public void taskLater(final Runnable r, final int delay) {
final TaskBuilder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder(); final Task.Builder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder();
builder.delayTicks(delay).execute(r).submit(SpongeMain.THIS.getPlugin()); builder.delayTicks(delay).execute(r).submit(SpongeMain.THIS.getPlugin());
} }
@Override @Override
public void taskLaterAsync(final Runnable r, final int delay) { public void taskLaterAsync(final Runnable r, final int delay) {
final TaskBuilder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder(); final Task.Builder builder = SpongeMain.THIS.getGame().getScheduler().createTaskBuilder();
builder.async().delayTicks(delay).execute(r).submit(SpongeMain.THIS.getPlugin()); builder.async().delayTicks(delay).execute(r).submit(SpongeMain.THIS.getPlugin());
} }

View File

@ -138,7 +138,7 @@ NAME_LITTLE: "$2%s Name ist zu kurz, $1%s$2<$1%s"
NO_COMMANDS: "$2Du hast für keinen Befehl eine Berechtigung." NO_COMMANDS: "$2Du hast für keinen Befehl eine Berechtigung."
SUBCOMMAND_SET_OPTIONS_HEADER: "$2Mögliche Werte: " SUBCOMMAND_SET_OPTIONS_HEADER: "$2Mögliche Werte: "
COMMAND_SYNTAX: "$1Verwendung: $2%s" COMMAND_SYNTAX: "$1Verwendung: $2%s"
INVALID_PLAYER: "$2Spieler nicht gefunden: $1%s." INVALID_PLAYER: "$2Spieler nicht gefunden: $1%s$2."
COMMAND_WENT_WRONG: "$2Beim ausführen des Befehls ging etwas schief..." COMMAND_WENT_WRONG: "$2Beim ausführen des Befehls ging etwas schief..."
PURGE_SYNTAX: "Verwende /plot purge <x;z|player|unowned|unknown|all> <world>" PURGE_SYNTAX: "Verwende /plot purge <x;z|player|unowned|unknown|all> <world>"
PURGE_SUCCESS: "$4%s Plots erfolgreich gelöscht." PURGE_SUCCESS: "$4%s Plots erfolgreich gelöscht."