mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
Super minor issues from previous merges
This commit is contained in:
parent
2a72f274c9
commit
22bd2eb238
@ -42,7 +42,6 @@ import com.plotsquared.core.util.PlayerManager;
|
|||||||
import com.plotsquared.core.util.RegionManager;
|
import com.plotsquared.core.util.RegionManager;
|
||||||
import com.plotsquared.core.util.SetupUtils;
|
import com.plotsquared.core.util.SetupUtils;
|
||||||
import com.plotsquared.core.util.WorldUtil;
|
import com.plotsquared.core.util.WorldUtil;
|
||||||
import com.plotsquared.core.util.logger.ILogger;
|
|
||||||
import net.kyori.adventure.audience.Audience;
|
import net.kyori.adventure.audience.Audience;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
@ -56,7 +55,7 @@ import java.util.Map;
|
|||||||
*
|
*
|
||||||
* @param <P> Player type
|
* @param <P> Player type
|
||||||
*/
|
*/
|
||||||
public interface PlotPlatform<P> extends ILogger {
|
public interface PlotPlatform<P> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs a message to console.
|
* Logs a message to console.
|
||||||
|
@ -65,7 +65,6 @@ import com.plotsquared.core.util.LegacyConverter;
|
|||||||
import com.plotsquared.core.util.MainUtil;
|
import com.plotsquared.core.util.MainUtil;
|
||||||
import com.plotsquared.core.util.MathMan;
|
import com.plotsquared.core.util.MathMan;
|
||||||
import com.plotsquared.core.util.ReflectionUtils;
|
import com.plotsquared.core.util.ReflectionUtils;
|
||||||
import com.plotsquared.core.util.logger.ILogger;
|
|
||||||
import com.plotsquared.core.util.query.PlotQuery;
|
import com.plotsquared.core.util.query.PlotQuery;
|
||||||
import com.plotsquared.core.util.task.TaskManager;
|
import com.plotsquared.core.util.task.TaskManager;
|
||||||
import com.plotsquared.core.uuid.UUIDPipeline;
|
import com.plotsquared.core.uuid.UUIDPipeline;
|
||||||
@ -143,8 +142,6 @@ public class PlotSquared {
|
|||||||
private YamlConfiguration config;
|
private YamlConfiguration config;
|
||||||
// Localization
|
// Localization
|
||||||
private CaptionMap captionMap;
|
private CaptionMap captionMap;
|
||||||
// Implementation logger
|
|
||||||
private ILogger logger;
|
|
||||||
// Platform / Version / Update URL
|
// Platform / Version / Update URL
|
||||||
private PlotVersion version;
|
private PlotVersion version;
|
||||||
// Files and configuration
|
// Files and configuration
|
||||||
@ -1475,10 +1472,6 @@ public class PlotSquared {
|
|||||||
return this.captionMap;
|
return this.captionMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ILogger getLogger() {
|
|
||||||
return this.logger;
|
|
||||||
}
|
|
||||||
|
|
||||||
public File getJarFile() {
|
public File getJarFile() {
|
||||||
return this.jarFile;
|
return this.jarFile;
|
||||||
}
|
}
|
||||||
@ -1491,10 +1484,6 @@ public class PlotSquared {
|
|||||||
return this.plotListener;
|
return this.plotListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLogger(ILogger logger) {
|
|
||||||
this.logger = logger;
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum SortType {
|
public enum SortType {
|
||||||
CREATION_DATE, CREATION_DATE_TIMESTAMP, LAST_MODIFIED, DISTANCE_FROM_ORIGIN
|
CREATION_DATE, CREATION_DATE_TIMESTAMP, LAST_MODIFIED, DISTANCE_FROM_ORIGIN
|
||||||
}
|
}
|
||||||
|
@ -244,9 +244,8 @@ public class Area extends SubCommand {
|
|||||||
PlotSquared.get().loadWorld(world, null);
|
PlotSquared.get().loadWorld(world, null);
|
||||||
player.sendMessage(TranslatableCaption.of("single.single_area_created"));
|
player.sendMessage(TranslatableCaption.of("single.single_area_created"));
|
||||||
} else {
|
} else {
|
||||||
MainUtil.sendMessage(player,
|
player.sendMessage(TranslatableCaption.of("errors.error_create",
|
||||||
"An error occurred while creating the world: " + hybridPlotWorld
|
Template.of("world", hybridPlotWorld.getWorldName())));
|
||||||
.getWorldName());
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
singleRun.run();
|
singleRun.run();
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
* _____ _ _ _____ _
|
|
||||||
* | __ \| | | | / ____| | |
|
|
||||||
* | |__) | | ___ | |_| (___ __ _ _ _ __ _ _ __ ___ __| |
|
|
||||||
* | ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` |
|
|
||||||
* | | | | (_) | |_ ____) | (_| | |_| | (_| | | | __/ (_| |
|
|
||||||
* |_| |_|\___/ \__|_____/ \__, |\__,_|\__,_|_| \___|\__,_|
|
|
||||||
* | |
|
|
||||||
* |_|
|
|
||||||
* PlotSquared plot management system for Minecraft
|
|
||||||
* Copyright (C) 2020 IntellectualSites
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.plotsquared.core.util.logger;
|
|
||||||
|
|
||||||
public class DelegateLogger implements ILogger {
|
|
||||||
|
|
||||||
private final ILogger parent;
|
|
||||||
|
|
||||||
public DelegateLogger(ILogger parent) {
|
|
||||||
this.parent = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ILogger getParent() {
|
|
||||||
return parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public void log(String message) {
|
|
||||||
parent.log(message);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* _____ _ _ _____ _
|
|
||||||
* | __ \| | | | / ____| | |
|
|
||||||
* | |__) | | ___ | |_| (___ __ _ _ _ __ _ _ __ ___ __| |
|
|
||||||
* | ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` |
|
|
||||||
* | | | | (_) | |_ ____) | (_| | |_| | (_| | | | __/ (_| |
|
|
||||||
* |_| |_|\___/ \__|_____/ \__, |\__,_|\__,_|_| \___|\__,_|
|
|
||||||
* | |
|
|
||||||
* |_|
|
|
||||||
* PlotSquared plot management system for Minecraft
|
|
||||||
* Copyright (C) 2020 IntellectualSites
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.plotsquared.core.util.logger;
|
|
||||||
|
|
||||||
@Deprecated public interface ILogger {
|
|
||||||
@Deprecated void log(String message);
|
|
||||||
}
|
|
@ -25,8 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.plotsquared.core.util.task;
|
package com.plotsquared.core.util.task;
|
||||||
|
|
||||||
import lombok.EqualsAndHashCode;
|
import com.google.common.base.Objects;
|
||||||
import lombok.ToString;
|
|
||||||
|
|
||||||
import javax.annotation.Nonnegative;
|
import javax.annotation.Nonnegative;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
@ -34,7 +33,6 @@ import javax.annotation.Nonnull;
|
|||||||
/**
|
/**
|
||||||
* Task timings
|
* Task timings
|
||||||
*/
|
*/
|
||||||
@EqualsAndHashCode @ToString @SuppressWarnings("unused")
|
|
||||||
public final class TaskTime {
|
public final class TaskTime {
|
||||||
|
|
||||||
private final long time;
|
private final long time;
|
||||||
@ -93,6 +91,21 @@ public final class TaskTime {
|
|||||||
return this.unit;
|
return this.unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override public boolean equals(final Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final TaskTime taskTime = (TaskTime) o;
|
||||||
|
return getTime() == taskTime.getTime() && getUnit() == taskTime.getUnit();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int hashCode() {
|
||||||
|
return Objects.hashCode(getTime(), getUnit());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public enum TaskUnit {
|
public enum TaskUnit {
|
||||||
TICKS, MILLISECONDS
|
TICKS, MILLISECONDS
|
||||||
|
@ -226,6 +226,7 @@
|
|||||||
"errors.invalid_player_offline": "<prefix><red>The player must be online: <gray><player></gray>.</red>",
|
"errors.invalid_player_offline": "<prefix><red>The player must be online: <gray><player></gray>.</red>",
|
||||||
"errors.invalid_command_flag": "<prefix><red>Invalid command flag: </red><value></gray>",
|
"errors.invalid_command_flag": "<prefix><red>Invalid command flag: </red><value></gray>",
|
||||||
"errors.error": "<prefix><red>An error occurred: </gray><value></gray></red>",
|
"errors.error": "<prefix><red>An error occurred: </gray><value></gray></red>",
|
||||||
|
"errors.error_create": "<prefix><red>An error occurred while creating the world: <gray><world></gray></red>",
|
||||||
"errors.error_console": "<prefix><red>An error occurred. See the console for more information.</red>",
|
"errors.error_console": "<prefix><red>An error occurred. See the console for more information.</red>",
|
||||||
"errors.command_went_wrong": "<prefix><red>Something went wrong when executing that command...</red>",
|
"errors.command_went_wrong": "<prefix><red>Something went wrong when executing that command...</red>",
|
||||||
"errors.no_free_plots": "<prefix><red>There are no free plots available.</red>",
|
"errors.no_free_plots": "<prefix><red>There are no free plots available.</red>",
|
||||||
|
Loading…
Reference in New Issue
Block a user