mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Manually resolve a bunch of merge issues
This commit is contained in:
parent
97fed21811
commit
0294397021
@ -59,8 +59,8 @@ import com.plotsquared.bukkit.uuid.SquirrelIdUUIDService;
|
||||
import com.plotsquared.core.PlotPlatform;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.backup.BackupManager;
|
||||
import com.plotsquared.core.backup.NullBackupManager;
|
||||
import com.plotsquared.core.backup.SimpleBackupManager;
|
||||
import com.plotsquared.core.command.WE_Anywhere;
|
||||
import com.plotsquared.core.components.ComponentPresetManager;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.ChatFormatter;
|
||||
import com.plotsquared.core.configuration.ConfigurationNode;
|
||||
@ -79,7 +79,6 @@ import com.plotsquared.core.inject.annotations.WorldFile;
|
||||
import com.plotsquared.core.inject.modules.PlotSquaredModule;
|
||||
import com.plotsquared.core.listener.PlotListener;
|
||||
import com.plotsquared.core.listener.WESubscriber;
|
||||
import com.plotsquared.core.player.ConsolePlayer;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
@ -95,7 +94,6 @@ import com.plotsquared.core.queue.GlobalBlockQueue;
|
||||
import com.plotsquared.core.setup.PlotAreaBuilder;
|
||||
import com.plotsquared.core.setup.SettingsNodesWrapper;
|
||||
import com.plotsquared.core.util.ChatManager;
|
||||
import com.plotsquared.core.util.ChunkManager;
|
||||
import com.plotsquared.core.util.ConsoleColors;
|
||||
import com.plotsquared.core.util.EconHandler;
|
||||
import com.plotsquared.core.util.EventDispatcher;
|
||||
@ -113,7 +111,6 @@ import com.plotsquared.core.uuid.offline.OfflineModeUUIDService;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import io.papermc.lib.PaperLib;
|
||||
import lombok.Getter;
|
||||
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -131,11 +128,11 @@ import org.bukkit.metadata.FixedMetadataValue;
|
||||
import org.bukkit.metadata.MetadataValue;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.AbstractMap;
|
||||
@ -161,7 +158,7 @@ import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
|
||||
|
||||
@SuppressWarnings("unused") public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPlatform<Player> {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger("P2/" + BukkitMain.class.getSimpleName());
|
||||
private static final Logger logger = LoggerFactory.getLogger("P2/" + BukkitPlatform.class.getSimpleName());
|
||||
private static final int BSTATS_ID = 1404;
|
||||
|
||||
static {
|
||||
@ -290,15 +287,13 @@ import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
|
||||
// WorldEdit
|
||||
if (Settings.Enabled_Components.WORLDEDIT_RESTRICTIONS) {
|
||||
try {
|
||||
PlotSquared.log(Captions.PREFIX.getTranslated() + "&6" + this.getPluginName()
|
||||
+ " hooked into WorldEdit.");
|
||||
logger.info("[P2] {} hooked into WorldEdit", this.getPluginName());
|
||||
WorldEdit.getInstance().getEventBus().register(this.getInjector().getInstance(WESubscriber.class));
|
||||
if (Settings.Enabled_Components.COMMANDS) {
|
||||
new WE_Anywhere();
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
PlotSquared.debug(
|
||||
"Incompatible version of WorldEdit, please upgrade: http://builds.enginehub.org/job/worldedit?branch=master");
|
||||
logger.error("[P2] Incompatible version of WorldEdit, please upgrade: http://builds.enginehub.org/job/worldedit?branch=master");
|
||||
}
|
||||
}
|
||||
|
||||
@ -344,8 +339,7 @@ import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
|
||||
try {
|
||||
getInjector().getInstance(ComponentPresetManager.class);
|
||||
} catch (final Exception e) {
|
||||
PlotSquared.log(Captions.PREFIX + "Failed to initialize the preset system");
|
||||
e.printStackTrace();
|
||||
logger.error("[P2] Failed to initialize the preset system", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -368,14 +362,11 @@ import static com.plotsquared.core.util.ReflectionUtils.getRefClass;
|
||||
continue;
|
||||
}
|
||||
if (!worldUtil.isWorld(world) && !world.equals("*")) {
|
||||
PlotSquared.debug("`" + world + "` was not properly loaded - " + this.getPluginName()
|
||||
+ " will now try to load it properly: ");
|
||||
PlotSquared.debug(
|
||||
" - Are you trying to delete this world? Remember to remove it from the worlds.yml, bukkit.yml and multiverse worlds.yml");
|
||||
PlotSquared.debug(
|
||||
" - Your world management plugin may be faulty (or non existent)");
|
||||
PlotSquared.debug(
|
||||
" This message may also be a false positive and could be ignored.");
|
||||
logger.warn("[P2] `{}` was not properly loaded - {} will now try to load it properly",
|
||||
world, this.getPluginName());
|
||||
logger.warn("[P2] - Are you trying to delete this world? Remember to remove it from the worlds.yml, bukkit.yml and multiverse worlds.yml");
|
||||
logger.warn("[P2] - Your world management plugin may be faulty (or non existent)");
|
||||
logger.warn("[P2] This message may also be a false positive and could be ignored.");
|
||||
this.setGenerator(world);
|
||||
}
|
||||
}
|
||||
|
@ -27,26 +27,27 @@ package com.plotsquared.bukkit.inject;
|
||||
|
||||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.assistedinject.FactoryModuleBuilder;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.backup.BackupManager;
|
||||
import com.plotsquared.core.backup.BackupProfile;
|
||||
import com.plotsquared.core.backup.NullBackupManager;
|
||||
import com.plotsquared.core.backup.PlayerBackupProfile;
|
||||
import com.plotsquared.core.backup.SimpleBackupManager;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.inject.factory.PlayerBackupProfileFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class BackupModule extends AbstractModule {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger("P2/" + BackupModule.class.getSimpleName());
|
||||
|
||||
@Override protected void configure() {
|
||||
try {
|
||||
install(new FactoryModuleBuilder()
|
||||
.implement(BackupProfile.class, PlayerBackupProfile.class).build(PlayerBackupProfileFactory.class));
|
||||
bind(BackupManager.class).to(SimpleBackupManager.class);
|
||||
} catch (final Exception e) {
|
||||
PlotSquared.log(Captions.PREFIX + "&6Failed to initialize backup manager");
|
||||
e.printStackTrace();
|
||||
PlotSquared.log(Captions.PREFIX + "&6Backup features will be disabled");
|
||||
logger.error("[P2] Failed to initialize backup manager", e);
|
||||
logger.error("[P2] Backup features will be disabled");
|
||||
bind(BackupManager.class).to(NullBackupManager.class);
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import com.plotsquared.bukkit.BukkitPlatform;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.bukkit.BukkitMain;
|
||||
import com.plotsquared.core.generator.AugmentedUtils;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.location.PlotLoc;
|
||||
@ -58,10 +57,10 @@ import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import javax.annotation.Nonnull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
|
@ -25,9 +25,6 @@
|
||||
*/
|
||||
package com.plotsquared.core;
|
||||
|
||||
import com.plotsquared.core.configuration.Caption;
|
||||
import com.plotsquared.core.command.WE_Anywhere;
|
||||
import com.plotsquared.core.components.ComponentPresetManager;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.ConfigurationSection;
|
||||
import com.plotsquared.core.configuration.ConfigurationUtil;
|
||||
@ -48,7 +45,6 @@ import com.plotsquared.core.generator.IndependentPlotGenerator;
|
||||
import com.plotsquared.core.inject.factory.HybridPlotWorldFactory;
|
||||
import com.plotsquared.core.listener.PlotListener;
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.BlockBucket;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
@ -67,20 +63,12 @@ import com.plotsquared.core.util.LegacyConverter;
|
||||
import com.plotsquared.core.util.MainUtil;
|
||||
import com.plotsquared.core.util.MathMan;
|
||||
import com.plotsquared.core.util.ReflectionUtils;
|
||||
import com.plotsquared.core.util.StringMan;
|
||||
import com.plotsquared.core.util.logger.ILogger;
|
||||
import com.plotsquared.core.util.WorldUtil;
|
||||
import com.plotsquared.core.util.query.PlotQuery;
|
||||
import com.plotsquared.core.util.task.TaskManager;
|
||||
import com.plotsquared.core.uuid.UUIDPipeline;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import javax.annotation.Nullable;
|
||||
import lombok.NonNull;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -267,7 +255,6 @@ public class PlotSquared {
|
||||
}
|
||||
|
||||
public void startExpiryTasks() {
|
||||
private void startExpiryTasks() {
|
||||
if (Settings.Enabled_Components.PLOT_EXPIRY) {
|
||||
ExpireManager.IMP = new ExpireManager(this.eventDispatcher);
|
||||
ExpireManager.IMP.runAutomatedTask();
|
||||
@ -811,9 +798,9 @@ public class PlotSquared {
|
||||
logger.info("[P2] - generator: {}>{}", baseGenerator, plotGenerator);
|
||||
logger.info("[P2] - plot world: {}", plotArea.getClass().getCanonicalName());
|
||||
logger.info("[P2] - plot area manager: {}", plotManager.getClass().getCanonicalName());
|
||||
if (!this.worlds.contains(path)) {
|
||||
this.worlds.createSection(path);
|
||||
worldSection = this.worlds.getConfigurationSection(path);
|
||||
if (!this.worldConfiguration.contains(path)) {
|
||||
this.worldConfiguration.createSection(path);
|
||||
worldSection = this.worldConfiguration.getConfigurationSection(path);
|
||||
}
|
||||
plotArea.saveConfiguration(worldSection);
|
||||
plotArea.loadDefaultConfiguration(worldSection);
|
||||
@ -1264,8 +1251,8 @@ public class PlotSquared {
|
||||
e.printStackTrace();
|
||||
logger.error("[P2] &d==== End of stacktrace ====");
|
||||
logger.error("[P2] &6Please go to the {} 'storage.yml' and configure the database correctly",
|
||||
imp().getPluginName());
|
||||
this.IMP.shutdown(); //shutdown used instead of disable because of database error
|
||||
platform.getPluginName());
|
||||
this.platform.shutdown(); //shutdown used instead of disable because of database error
|
||||
}
|
||||
}
|
||||
|
||||
@ -1399,11 +1386,6 @@ public class PlotSquared {
|
||||
} catch (IOException ignored) {
|
||||
logger.error("[P2] Failed to save storage.yml");
|
||||
}
|
||||
try {
|
||||
this.style.save(this.styleFile);
|
||||
} catch (IOException e) {
|
||||
logger.error("[P2] Configuration file saving failed", e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,6 @@ import java.util.Set;
|
||||
public class Trim extends SubCommand {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger("P2/" + Trim.class.getSimpleName());
|
||||
public static ArrayList<Plot> expired = null;
|
||||
private static volatile boolean TASK = false;
|
||||
|
||||
private final PlotAreaManager plotAreaManager;
|
||||
|
@ -29,8 +29,6 @@ import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Setter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -42,7 +42,8 @@ public class PlotMessage {
|
||||
try {
|
||||
reset(ChatManager.manager);
|
||||
} catch (Throwable e) {
|
||||
logger.error("[P2] {} doesn't support fancy chat for {}", PlotSquared.imp().getPluginName(), PlotSquared.get().IMP.getServerVersion());
|
||||
logger.error("[P2] {} doesn't support fancy chat for {}", PlotSquared.platform().getPluginName(),
|
||||
PlotSquared.platform().getServerVersion());
|
||||
ChatManager.manager = new PlainChatManager();
|
||||
reset(ChatManager.manager);
|
||||
}
|
||||
|
@ -25,16 +25,17 @@
|
||||
*/
|
||||
package com.plotsquared.core.util;
|
||||
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.CaptionUtility;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.ConfigurationSection;
|
||||
import com.plotsquared.core.player.ConsolePlayer;
|
||||
import com.plotsquared.core.plot.BlockBucket;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import javax.annotation.Nonnull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
Loading…
Reference in New Issue
Block a user