Essentials/Essentials/src/main/java/com/earth2me/essentials/ISettings.java

387 lines
7.5 KiB
Java
Raw Normal View History

2011-07-16 02:38:22 +02:00
package com.earth2me.essentials;
import com.earth2me.essentials.commands.IEssentialsCommand;
import com.earth2me.essentials.signs.EssentialsSign;
import com.earth2me.essentials.textreader.IText;
import org.bukkit.Material;
2015-04-15 06:06:16 +02:00
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.event.EventPriority;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.function.Predicate;
import java.util.regex.Pattern;
2011-07-16 02:38:22 +02:00
2015-04-15 06:06:16 +02:00
public interface ISettings extends IConf {
boolean areSignsDisabled();
IText getAnnounceNewPlayerFormat();
boolean getAnnounceNewPlayers();
String getNewPlayerKit();
2015-04-15 06:06:16 +02:00
String getBackupCommand();
2015-04-15 06:06:16 +02:00
long getBackupInterval();
boolean isAlwaysRunBackup();
2015-04-15 06:06:16 +02:00
String getChatFormat(String group);
2015-04-15 06:06:16 +02:00
int getChatRadius();
int getNearRadius();
2015-04-15 06:06:16 +02:00
char getChatShout();
2015-04-15 06:06:16 +02:00
char getChatQuestion();
2015-04-15 06:06:16 +02:00
BigDecimal getCommandCost(IEssentialsCommand cmd);
2015-04-15 06:06:16 +02:00
BigDecimal getCommandCost(String label);
2015-04-15 06:06:16 +02:00
String getCurrencySymbol();
boolean isCurrencySymbolSuffixed();
2015-04-15 06:06:16 +02:00
int getOversizedStackSize();
2015-04-15 06:06:16 +02:00
int getDefaultStackSize();
2015-04-15 06:06:16 +02:00
double getHealCooldown();
2015-04-15 06:06:16 +02:00
Set<String> getSocialSpyCommands();
boolean getSocialSpyListenMutedPlayers();
Set<String> getMuteCommands();
/**
* @Deprecated in favor of {@link Kits#getKits()}
*/
@Deprecated
2015-04-15 06:06:16 +02:00
ConfigurationSection getKits();
/**
* @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
void addKit(String name, List<String> lines, long delay);
@Deprecated
ConfigurationSection getKitSection();
boolean isSkippingUsedOneTimeKitsFromKitList();
2015-04-15 06:06:16 +02:00
String getLocale();
2015-04-15 06:06:16 +02:00
String getNewbieSpawn();
2015-04-15 06:06:16 +02:00
String getNicknamePrefix();
String getOperatorColor() throws Exception;
2015-04-15 06:06:16 +02:00
boolean getPerWarpPermission();
2015-04-15 06:06:16 +02:00
boolean getProtectBoolean(final String configName, boolean def);
2015-04-15 06:06:16 +02:00
int getProtectCreeperMaxHeight();
List<Material> getProtectList(final String configName);
2015-04-15 06:06:16 +02:00
boolean getProtectPreventSpawn(final String creatureName);
2015-04-15 06:06:16 +02:00
String getProtectString(final String configName);
2015-04-15 06:06:16 +02:00
boolean getRespawnAtHome();
boolean isRespawnAtAnchor();
2015-04-15 06:06:16 +02:00
Set getMultipleHomes();
2015-04-15 06:06:16 +02:00
int getHomeLimit(String set);
2015-04-15 06:06:16 +02:00
int getHomeLimit(User user);
2015-04-15 06:06:16 +02:00
int getSpawnMobLimit();
2015-04-15 06:06:16 +02:00
BigDecimal getStartingBalance();
2015-04-15 06:06:16 +02:00
boolean isTeleportSafetyEnabled();
boolean isForceDisableTeleportSafety();
boolean isAlwaysTeleportSafety();
boolean isTeleportPassengerDismount();
boolean isForcePassengerTeleport();
2015-04-15 06:06:16 +02:00
double getTeleportCooldown();
2015-04-15 06:06:16 +02:00
double getTeleportDelay();
2015-04-15 06:06:16 +02:00
boolean hidePermissionlessHelp();
2015-04-15 06:06:16 +02:00
boolean isCommandDisabled(final IEssentialsCommand cmd);
2015-04-15 06:06:16 +02:00
boolean isCommandDisabled(String label);
2015-04-15 06:06:16 +02:00
boolean isCommandOverridden(String name);
2015-04-15 06:06:16 +02:00
boolean isDebug();
2020-10-03 19:46:05 +02:00
void setDebug(boolean debug);
2015-04-15 06:06:16 +02:00
boolean isEcoDisabled();
2018-10-15 14:56:36 +02:00
@Deprecated
2015-04-15 06:06:16 +02:00
boolean isTradeInStacks(int id);
2018-10-15 14:56:36 +02:00
boolean isTradeInStacks(Material type);
List<Material> itemSpawnBlacklist();
2015-04-15 06:06:16 +02:00
List<EssentialsSign> enabledSigns();
2015-04-15 06:06:16 +02:00
boolean permissionBasedItemSpawn();
2015-04-15 06:06:16 +02:00
boolean showNonEssCommandsInHelp();
2015-04-15 06:06:16 +02:00
boolean warnOnBuildDisallow();
2015-04-15 06:06:16 +02:00
boolean warnOnSmite();
2015-04-15 06:06:16 +02:00
BigDecimal getMaxMoney();
2015-04-15 06:06:16 +02:00
BigDecimal getMinMoney();
2015-04-15 06:06:16 +02:00
boolean isEcoLogEnabled();
2015-04-15 06:06:16 +02:00
boolean isEcoLogUpdateEnabled();
boolean realNamesOnList();
2015-04-15 06:06:16 +02:00
boolean removeGodOnDisconnect();
2015-04-15 06:06:16 +02:00
boolean changeDisplayName();
2015-04-15 06:06:16 +02:00
boolean changePlayerListName();
2015-04-15 06:06:16 +02:00
boolean isPlayerCommand(String string);
2015-04-15 06:06:16 +02:00
boolean useBukkitPermissions();
2015-04-15 06:06:16 +02:00
boolean addPrefixSuffix();
2015-04-15 06:06:16 +02:00
boolean disablePrefix();
2015-04-15 06:06:16 +02:00
boolean disableSuffix();
2015-04-15 06:06:16 +02:00
long getAutoAfk();
2015-04-15 06:06:16 +02:00
long getAutoAfkKick();
2015-04-15 06:06:16 +02:00
boolean getFreezeAfkPlayers();
2015-04-15 06:06:16 +02:00
boolean cancelAfkOnMove();
2015-04-15 06:06:16 +02:00
boolean cancelAfkOnInteract();
2018-12-31 06:42:42 +01:00
boolean sleepIgnoresAfkPlayers();
boolean isAfkListName();
String getAfkListName();
boolean broadcastAfkMessage();
2015-04-15 06:06:16 +02:00
boolean areDeathMessagesEnabled();
KeepInvPolicy getVanishingItemsPolicy();
KeepInvPolicy getBindingItemsPolicy();
int getJoinQuitMessagePlayerCount();
boolean hasJoinQuitMessagePlayerCount();
2015-04-15 06:06:16 +02:00
Set<String> getNoGodWorlds();
2015-04-15 06:06:16 +02:00
boolean getUpdateBedAtDaytime();
2015-04-15 06:06:16 +02:00
boolean allowUnsafeEnchantments();
2015-04-15 06:06:16 +02:00
boolean getRepairEnchanted();
2015-04-15 06:06:16 +02:00
boolean isWorldTeleportPermissions();
2015-04-15 06:06:16 +02:00
boolean isWorldHomePermissions();
2015-04-15 06:06:16 +02:00
boolean registerBackInListener();
2015-04-15 06:06:16 +02:00
boolean getDisableItemPickupWhileAfk();
2015-04-15 06:06:16 +02:00
EventPriority getRespawnPriority();
EventPriority getSpawnJoinPriority();
2015-04-15 06:06:16 +02:00
long getTpaAcceptCancellation();
2015-04-15 06:06:16 +02:00
long getTeleportInvulnerability();
2015-04-15 06:06:16 +02:00
boolean isTeleportInvulnerability();
2015-04-15 06:06:16 +02:00
long getLoginAttackDelay();
2015-04-15 06:06:16 +02:00
int getSignUsePerSecond();
2015-04-15 06:06:16 +02:00
double getMaxFlySpeed();
2015-04-15 06:06:16 +02:00
double getMaxWalkSpeed();
2015-04-15 06:06:16 +02:00
int getMailsPerMinute();
2015-04-15 06:06:16 +02:00
long getEconomyLagWarning();
2015-04-15 06:06:16 +02:00
long getPermissionsLagWarning();
2015-04-15 06:06:16 +02:00
void setEssentialsChatActive(boolean b);
long getMaxMute();
2015-04-15 06:06:16 +02:00
long getMaxTempban();
2015-04-15 06:06:16 +02:00
Map<String, Object> getListGroupConfig();
2015-04-15 06:06:16 +02:00
int getMaxNickLength();
boolean ignoreColorsInMaxLength();
boolean hideDisplayNameInVanish();
2015-04-15 06:06:16 +02:00
int getMaxUserCacheCount();
2015-04-15 06:06:16 +02:00
boolean allowSilentJoinQuit();
2015-04-15 06:06:16 +02:00
boolean isCustomJoinMessage();
2015-04-15 06:06:16 +02:00
String getCustomJoinMessage();
2013-12-02 03:47:39 +01:00
2015-04-15 06:06:16 +02:00
boolean isCustomQuitMessage();
2013-12-02 03:47:39 +01:00
2015-04-15 06:06:16 +02:00
String getCustomQuitMessage();
boolean isNotifyNoNewMail();
boolean isDropItemsIfFull();
boolean isLastMessageReplyRecipient();
boolean isReplyToVanished();
BigDecimal getMinimumPayAmount();
boolean isPayExcludesIgnoreList();
long getLastMessageReplyRecipientTimeout();
boolean isMilkBucketEasterEggEnabled();
boolean isSendFlyEnableOnJoin();
boolean isWorldTimePermissions();
boolean isSpawnOnJoin();
List<String> getSpawnOnJoinGroups();
boolean isUserInSpawnOnJoinGroup(IUser user);
boolean isTeleportToCenterLocation();
boolean isCommandCooldownsEnabled();
boolean isWorldChangeFlyResetEnabled();
boolean isWorldChangeSpeedResetEnabled();
long getCommandCooldownMs(String label);
Entry<Pattern, Long> getCommandCooldownEntry(String label);
boolean isCommandCooldownPersistent(String label);
boolean isNpcsInBalanceRanking();
NumberFormat getCurrencyFormat();
List<EssentialsSign> getUnprotectedSignNames();
boolean isPastebinCreateKit();
boolean isAllowBulkBuySell();
boolean isAllowSellNamedItems();
boolean isAddingPrefixInPlayerlist();
boolean isAddingSuffixInPlayerlist();
int getNotifyPlayerOfMailCooldown();
int getMotdDelay();
boolean isDirectHatAllowed();
List<String> getDefaultEnabledConfirmCommands();
boolean isConfirmCommandEnabledByDefault(String commandName);
boolean isTeleportBackWhenFreedFromJail();
boolean isCompassTowardsHomePerm();
boolean isAllowWorldInBroadcastworld();
2018-11-19 15:13:05 +01:00
String getItemDbType();
boolean allowOldIdSigns();
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 12:28:12 +02:00
boolean isWaterSafe();
2020-10-03 19:46:05 +02:00
boolean isSafeUsermap();
boolean logCommandBlockCommands();
Set<Predicate<String>> getNickBlacklist();
double getMaxProjectileSpeed();
boolean isRemovingEffectsOnHeal();
boolean isSpawnIfNoHome();
boolean isConfirmHomeOverwrite();
boolean infoAfterDeath();
2020-10-03 19:46:05 +02:00
enum KeepInvPolicy {
KEEP,
DELETE,
DROP
}
2011-07-16 02:38:22 +02:00
}