2011-07-16 02:38:22 +02:00
|
|
|
package com.earth2me.essentials;
|
|
|
|
|
2013-07-13 13:40:46 -04:00
|
|
|
import com.earth2me.essentials.commands.IEssentialsCommand;
|
|
|
|
import com.earth2me.essentials.signs.EssentialsSign;
|
|
|
|
import com.earth2me.essentials.textreader.IText;
|
2016-06-20 12:55:31 +01:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
import org.bukkit.ChatColor;
|
2017-12-12 22:06:25 -08:00
|
|
|
import org.bukkit.Material;
|
2015-04-14 23:06:16 -05:00
|
|
|
import org.bukkit.configuration.ConfigurationSection;
|
|
|
|
import org.bukkit.event.EventPriority;
|
|
|
|
|
2013-07-13 13:40:46 -04:00
|
|
|
import java.math.BigDecimal;
|
2016-06-19 20:03:54 +01:00
|
|
|
import java.text.NumberFormat;
|
2013-07-13 13:40:46 -04:00
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
2016-06-28 03:40:47 +01:00
|
|
|
import java.util.Map.Entry;
|
2013-07-13 13:40:46 -04:00
|
|
|
import java.util.Set;
|
2019-08-05 18:59:41 +01:00
|
|
|
import java.util.function.Predicate;
|
2016-06-28 03:40:47 +01:00
|
|
|
import java.util.regex.Pattern;
|
2011-07-16 02:38:22 +02:00
|
|
|
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
public interface ISettings extends IConf {
|
|
|
|
boolean areSignsDisabled();
|
|
|
|
|
|
|
|
IText getAnnounceNewPlayerFormat();
|
|
|
|
|
|
|
|
boolean getAnnounceNewPlayers();
|
|
|
|
|
|
|
|
String getNewPlayerKit();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
String getBackupCommand();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
long getBackupInterval();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
String getChatFormat(String group);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getChatRadius();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-05-16 19:36:57 -05:00
|
|
|
int getNearRadius();
|
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
char getChatShout();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
char getChatQuestion();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
BigDecimal getCommandCost(IEssentialsCommand cmd);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
BigDecimal getCommandCost(String label);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
String getCurrencySymbol();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getOversizedStackSize();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getDefaultStackSize();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
double getHealCooldown();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
Set<String> getSocialSpyCommands();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2017-08-04 01:04:42 +02:00
|
|
|
boolean getSocialSpyListenMutedPlayers();
|
|
|
|
|
2015-05-12 21:44:36 -05:00
|
|
|
Set<String> getMuteCommands();
|
|
|
|
|
2018-01-18 00:25:00 -08:00
|
|
|
/**
|
|
|
|
* @Deprecated in favor of {@link Kits#getKits()}
|
|
|
|
*/
|
|
|
|
@Deprecated
|
2015-04-14 23:06:16 -05:00
|
|
|
ConfigurationSection getKits();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2018-01-18 00:25:00 -08:00
|
|
|
/**
|
|
|
|
* @Deprecated in favor of {@link Kits#getKit(String)}
|
|
|
|
*/
|
|
|
|
@Deprecated
|
|
|
|
Map<String, Object> getKit(String kit);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Deprecated in favor of {@link Kits#addKit(String, List, long)}}
|
|
|
|
*/
|
|
|
|
@Deprecated
|
2015-04-20 10:56:45 -05:00
|
|
|
void addKit(String name, List<String> lines, long delay);
|
|
|
|
|
2018-01-18 00:25:00 -08:00
|
|
|
@Deprecated
|
|
|
|
ConfigurationSection getKitSection();
|
|
|
|
|
2015-10-27 23:20:27 -04:00
|
|
|
boolean isSkippingUsedOneTimeKitsFromKitList();
|
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
String getLocale();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
String getNewbieSpawn();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
String getNicknamePrefix();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
ChatColor getOperatorColor() throws Exception;
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean getPerWarpPermission();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean getProtectBoolean(final String configName, boolean def);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getProtectCreeperMaxHeight();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2017-12-12 22:06:25 -08:00
|
|
|
List<Material> getProtectList(final String configName);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean getProtectPreventSpawn(final String creatureName);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
String getProtectString(final String configName);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean getRespawnAtHome();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
Set getMultipleHomes();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getHomeLimit(String set);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getHomeLimit(User user);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getSpawnMobLimit();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
BigDecimal getStartingBalance();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isTeleportSafetyEnabled();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-06-01 09:32:37 -06:00
|
|
|
boolean isForceDisableTeleportSafety();
|
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
double getTeleportCooldown();
|
2013-12-12 22:03:15 -08:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
double getTeleportDelay();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean hidePermissionlessHelp();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isCommandDisabled(final IEssentialsCommand cmd);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isCommandDisabled(String label);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isCommandOverridden(String name);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isDebug();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isEcoDisabled();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2018-10-15 13:56:36 +01:00
|
|
|
@Deprecated
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isTradeInStacks(int id);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2018-10-15 13:56:36 +01:00
|
|
|
boolean isTradeInStacks(Material type);
|
|
|
|
|
2017-12-12 22:06:25 -08:00
|
|
|
List<Material> itemSpawnBlacklist();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
List<EssentialsSign> enabledSigns();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean permissionBasedItemSpawn();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean showNonEssCommandsInHelp();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean warnOnBuildDisallow();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean warnOnSmite();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
BigDecimal getMaxMoney();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
BigDecimal getMinMoney();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isEcoLogEnabled();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isEcoLogUpdateEnabled();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean removeGodOnDisconnect();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean changeDisplayName();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean changePlayerListName();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isPlayerCommand(String string);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean useBukkitPermissions();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean addPrefixSuffix();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean disablePrefix();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean disableSuffix();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
long getAutoAfk();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
long getAutoAfkKick();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean getFreezeAfkPlayers();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean cancelAfkOnMove();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean cancelAfkOnInteract();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2018-12-31 16:42:42 +11:00
|
|
|
boolean sleepIgnoresAfkPlayers();
|
2018-12-30 20:38:34 +11:00
|
|
|
|
2016-01-20 14:15:53 +00:00
|
|
|
boolean isAfkListName();
|
|
|
|
|
|
|
|
String getAfkListName();
|
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean areDeathMessagesEnabled();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
void setDebug(boolean debug);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
Set<String> getNoGodWorlds();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean getUpdateBedAtDaytime();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean allowUnsafeEnchantments();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean getRepairEnchanted();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isWorldTeleportPermissions();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isWorldHomePermissions();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean registerBackInListener();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean getDisableItemPickupWhileAfk();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
EventPriority getRespawnPriority();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2017-09-16 15:23:56 +01:00
|
|
|
EventPriority getSpawnJoinPriority();
|
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
long getTpaAcceptCancellation();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
long getTeleportInvulnerability();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isTeleportInvulnerability();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
long getLoginAttackDelay();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getSignUsePerSecond();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
double getMaxFlySpeed();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
double getMaxWalkSpeed();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getMailsPerMinute();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
long getEconomyLagWarning();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
long getPermissionsLagWarning();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
void setEssentialsChatActive(boolean b);
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
long getMaxTempban();
|
2013-07-13 13:40:46 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
Map<String, Object> getListGroupConfig();
|
2013-07-10 10:48:14 -04:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getMaxNickLength();
|
2013-11-14 20:28:47 -05:00
|
|
|
|
2015-10-27 22:37:33 -04:00
|
|
|
boolean ignoreColorsInMaxLength();
|
|
|
|
|
2018-12-09 06:02:45 -05:00
|
|
|
boolean hideDisplayNameInVanish();
|
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
int getMaxUserCacheCount();
|
2013-11-14 20:28:47 -05:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean allowSilentJoinQuit();
|
2013-11-14 20:28:47 -05:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isCustomJoinMessage();
|
2013-11-14 20:28:47 -05:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
String getCustomJoinMessage();
|
2013-12-02 02:47:39 +00:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
boolean isCustomQuitMessage();
|
2013-12-02 02:47:39 +00:00
|
|
|
|
2015-04-14 23:06:16 -05:00
|
|
|
String getCustomQuitMessage();
|
2015-04-16 09:25:29 -05:00
|
|
|
|
|
|
|
boolean isNotifyNoNewMail();
|
2015-06-28 10:28:55 -05:00
|
|
|
|
|
|
|
boolean isDropItemsIfFull();
|
2016-07-10 17:58:15 +01:00
|
|
|
|
2015-10-27 17:34:59 +00:00
|
|
|
boolean isLastMessageReplyRecipient();
|
2016-07-10 17:58:15 +01:00
|
|
|
|
2015-11-07 17:23:40 +00:00
|
|
|
BigDecimal getMinimumPayAmount();
|
2018-01-18 00:25:00 -08:00
|
|
|
|
2015-11-24 22:09:59 +00:00
|
|
|
long getLastMessageReplyRecipientTimeout();
|
2015-12-01 17:41:56 -07:00
|
|
|
|
|
|
|
boolean isMilkBucketEasterEggEnabled();
|
2016-01-18 19:21:29 -07:00
|
|
|
|
|
|
|
boolean isSendFlyEnableOnJoin();
|
2016-06-20 12:55:31 +01:00
|
|
|
|
2016-01-20 11:46:37 +00:00
|
|
|
boolean isWorldTimePermissions();
|
2016-06-20 12:55:31 +01:00
|
|
|
|
2016-06-19 21:07:45 +01:00
|
|
|
boolean isSpawnOnJoin();
|
2016-07-10 17:58:15 +01:00
|
|
|
|
2016-10-30 13:29:21 +00:00
|
|
|
List<String> getSpawnOnJoinGroups();
|
2018-01-18 00:25:00 -08:00
|
|
|
|
2016-10-30 13:29:21 +00:00
|
|
|
boolean isUserInSpawnOnJoinGroup(IUser user);
|
|
|
|
|
2016-06-26 15:21:35 +01:00
|
|
|
boolean isTeleportToCenterLocation();
|
2016-07-10 17:58:15 +01:00
|
|
|
|
2016-06-28 03:40:47 +01:00
|
|
|
boolean isCommandCooldownsEnabled();
|
2018-01-18 00:25:00 -08:00
|
|
|
|
2016-06-28 03:40:47 +01:00
|
|
|
long getCommandCooldownMs(String label);
|
|
|
|
|
|
|
|
Entry<Pattern, Long> getCommandCooldownEntry(String label);
|
2016-07-10 17:58:15 +01:00
|
|
|
|
2016-06-28 03:40:47 +01:00
|
|
|
boolean isCommandCooldownPersistent(String label);
|
2016-06-20 12:55:31 +01:00
|
|
|
|
2016-07-06 19:34:25 +01:00
|
|
|
boolean isNpcsInBalanceRanking();
|
2016-07-06 21:21:24 +01:00
|
|
|
|
2016-06-19 20:03:54 +01:00
|
|
|
NumberFormat getCurrencyFormat();
|
2016-07-10 17:58:15 +01:00
|
|
|
|
2016-07-01 16:23:54 +01:00
|
|
|
List<EssentialsSign> getUnprotectedSignNames();
|
2018-01-18 00:25:00 -08:00
|
|
|
|
2016-07-13 23:25:20 +01:00
|
|
|
boolean isPastebinCreateKit();
|
2018-01-18 00:25:00 -08:00
|
|
|
|
2016-07-26 12:25:20 +01:00
|
|
|
boolean isAllowBulkBuySell();
|
2018-01-18 00:25:00 -08:00
|
|
|
|
2016-07-28 17:17:26 +01:00
|
|
|
boolean isAddingPrefixInPlayerlist();
|
|
|
|
|
|
|
|
boolean isAddingSuffixInPlayerlist();
|
2017-06-22 22:54:51 +01:00
|
|
|
|
|
|
|
int getNotifyPlayerOfMailCooldown();
|
2017-07-28 19:20:44 +01:00
|
|
|
|
|
|
|
int getMotdDelay();
|
2016-11-06 10:54:49 +00:00
|
|
|
|
|
|
|
boolean isDirectHatAllowed();
|
2018-01-28 16:47:17 +00:00
|
|
|
|
2018-03-26 00:24:10 -07:00
|
|
|
List<String> getDefaultEnabledConfirmCommands();
|
2018-01-28 16:47:17 +00:00
|
|
|
|
|
|
|
boolean isConfirmCommandEnabledByDefault(String commandName);
|
2018-06-15 19:20:06 +01:00
|
|
|
|
2018-04-01 22:37:19 -04:00
|
|
|
boolean isTeleportBackWhenFreedFromJail();
|
2018-10-28 18:46:53 +00:00
|
|
|
|
2018-06-15 19:20:06 +01:00
|
|
|
boolean isCompassTowardsHomePerm();
|
2018-08-27 10:19:46 +01:00
|
|
|
|
|
|
|
boolean isAllowWorldInBroadcastworld();
|
2018-11-19 14:13:05 +00:00
|
|
|
|
|
|
|
String getItemDbType();
|
2018-12-08 16:41:09 +00:00
|
|
|
|
|
|
|
boolean isForceEnableRecipe();
|
2018-12-23 23:02:36 +00:00
|
|
|
|
|
|
|
boolean allowOldIdSigns();
|
2019-05-30 18:50:51 +01:00
|
|
|
|
Fixes #2121 - Allow players to teleport into a location with water if configured (#2520)
# Description of #2520
This is a continuation of #2457, accidentally hit rebase and recommitted a load of commits from the 2.x log into my repo...
I've reverted the code and added the configuration option, modifying the `LocationUtil#HOLLOW_MATERIALS` as necessary when the config is loaded.
New demo: streamable.com/pm50r
```
[16:01:00 INFO]: Server version: 1.13.2-R0.1-SNAPSHOT git-Spigot-3cb9dcb-77ca7ca (MC: 1.13.2)
[16:01:00 INFO]: EssentialsX version: 2.16.1.154
[16:01:00 INFO]: Vault is not installed. Chat and permissions may not work.
```
# Description of #2457
Fixes #2121.
Prior to the addition of this patch, teleporting from another world through commands such as `/spawn` and `/home` would cause players to be teleported to the surface of the water. After this patch, using the same command will correctly teleport them to the original location.
In seeing that the addition of water would cause the `HOLLOW_MATERIALS` set to be identical to the `TRANSPARENT_MATERIALS`, I have removed the latter's usage and simply added water to the former.
I'm not exactly sure if adding water to `HOLLOW_MATERIALS` is the right decision, but it fixes the issue, and I personally don't really see any point in not having water in the list. I imagine some people might use this as a way to drop players on the surface of the water, but they can fix that issue quite easily by actually going to the surface and setting the location there. I also can see that water is not necessarily a "safe" location because players can drown, but I really see no other alternative.
The only reason it works like normal in the same world is because the safe location method exempts locations in the same world as the teleporting player, and thus this check is never even performed in the first place for those players anyway.
**Demo**
```
[16:22:49 INFO]: CONSOLE issued server command: /ess version
[16:22:49 INFO]: Server version: 1.13.2-R0.1-SNAPSHOT git-Paper-"16db0e6a" (MC: 1.13.2)
[16:22:49 INFO]: EssentialsX version: 2.16.1.9
[16:22:49 INFO]: LuckPerms version: 4.3.73
[16:22:49 INFO]: Vault is not installed. Chat and permissions may not work.
```
https://streamable.com/71072
2019-06-17 03:28:12 -07:00
|
|
|
boolean isWaterSafe();
|
|
|
|
|
2019-05-30 18:50:51 +01:00
|
|
|
boolean isSafeUsermap();
|
2019-08-06 01:17:22 +10:00
|
|
|
|
|
|
|
boolean logCommandBlockCommands();
|
2019-08-05 18:59:41 +01:00
|
|
|
|
|
|
|
Set<Predicate<String>> getNickBlacklist();
|
2019-08-05 19:56:25 +01:00
|
|
|
|
|
|
|
double getMaxProjectileSpeed();
|
2019-10-20 03:12:53 -05:00
|
|
|
|
|
|
|
boolean isSpawnIfNoHome();
|
2011-07-16 02:38:22 +02:00
|
|
|
}
|