Removed extraneous settings. Cleaned up config.yml.

Added admin delete command.
This commit is contained in:
tastybento 2018-08-17 22:02:59 -07:00
parent 069e7dea87
commit acd9849003
3 changed files with 32 additions and 216 deletions

View File

@ -1,7 +1,6 @@
package bentobox.addon.bskyblock;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@ -37,29 +36,6 @@ import world.bentobox.bentobox.database.objects.adapters.FlagSerializer2;
@ConfigComment("")
public class Settings implements DataObject, WorldSettings {
@ConfigComment("Use economy or not. If true, an economy plugin is required. If false, no money is used or give.")
@ConfigComment("If there is no economy plugin present anyway, money will be automatically disabled.")
@ConfigEntry(path = "general.use-economy")
private boolean useEconomy = true;
@ConfigComment("Starting money - this is how much money new players will have as their")
@ConfigComment("balance at the start of an island.")
@ConfigEntry(path = "general.starting-money")
private double startingMoney = 10.0;
@ConfigComment("Allow obsidian to be scooped up with an empty bucket back into lava")
@ConfigComment("This only works if there is a single block of obsidian (no obsidian within 10 blocks)")
@ConfigComment("Recommendation is to keep this true so that newbies don't bother you or reset their")
@ConfigComment("island unnecessarily.")
@ConfigEntry(path = "general.allow-obsidian-scooping")
private boolean allowObsidianScooping = true;
@ConfigComment("Time in seconds that players have to confirm sensitive commands, e.g. island reset")
@ConfigEntry(path = "general.confirmation-time")
private int confirmationTime = 20;
// ---------------------------------------------
/* WORLD */
@ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word")
@ConfigEntry(path = "world.friendly-name")
@ -130,7 +106,7 @@ public class Settings implements DataObject, WorldSettings {
@ConfigComment("a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR")
@ConfigEntry(path = "world.default-game-mode")
private GameMode defaultGameMode = GameMode.SURVIVAL;
@ConfigComment("The default biome for the overworld")
@ConfigEntry(path = "world.default-biome")
private Biome defaultBiome = Biome.PLAINS;
@ -196,7 +172,7 @@ public class Settings implements DataObject, WorldSettings {
@Adapter(FlagSerializer2.class)
private Map<Flag, Integer> defaultIslandSettings = new HashMap<>();
@ConfigComment("These are the settings visible to users.")
@ConfigComment("These are the settings visible to users. (Not implemented yet)")
@ConfigEntry(path = "world.visible-settings")
private List<String> visibleSettings = new ArrayList<>();
@ -207,12 +183,6 @@ public class Settings implements DataObject, WorldSettings {
// ---------------------------------------------
/* ISLAND */
// Entities
@ConfigEntry(path = "island.limits.entities")
private Map<EntityType, Integer> entityLimits = new EnumMap<>(EntityType.class);
@ConfigEntry(path = "island.limits.tile-entities")
private Map<String, Integer> tileEntityLimits = new HashMap<>();
@ConfigComment("Default max team size")
@ConfigComment("Use this permission to set for specific user groups: askyblock.team.maxsize.<number>")
@ConfigComment("Permission size cannot be less than the default below. ")
@ -299,7 +269,6 @@ public class Settings implements DataObject, WorldSettings {
private boolean teamJoinDeathReset = true;
// ---------------------------------------------
/* PROTECTION */
private int togglePvPCooldown;
@ -326,34 +295,6 @@ public class Settings implements DataObject, WorldSettings {
private String uniqueId = "config";
/**
* @return the useEconomy
*/
public boolean isUseEconomy() {
return useEconomy;
}
/**
* @return the startingMoney
*/
public double getStartingMoney() {
return startingMoney;
}
/**
* @return the allowObsidianScooping
*/
public boolean isAllowObsidianScooping() {
return allowObsidianScooping;
}
/**
* @return the confirmationTime
*/
public int getConfirmationTime() {
return confirmationTime;
}
/**
* @return the friendlyName
*/
@ -577,22 +518,6 @@ public class Settings implements DataObject, WorldSettings {
return visitorBannedCommands;
}
/**
* @return the entityLimits
*/
@Override
public Map<EntityType, Integer> getEntityLimits() {
return entityLimits;
}
/**
* @return the tileEntityLimits
*/
@Override
public Map<String, Integer> getTileEntityLimits() {
return tileEntityLimits;
}
/**
* @return the maxTeamSize
*/
@ -762,34 +687,6 @@ public class Settings implements DataObject, WorldSettings {
return uniqueId;
}
/**
* @param useEconomy the useEconomy to set
*/
public void setUseEconomy(boolean useEconomy) {
this.useEconomy = useEconomy;
}
/**
* @param startingMoney the startingMoney to set
*/
public void setStartingMoney(double startingMoney) {
this.startingMoney = startingMoney;
}
/**
* @param allowObsidianScooping the allowObsidianScooping to set
*/
public void setAllowObsidianScooping(boolean allowObsidianScooping) {
this.allowObsidianScooping = allowObsidianScooping;
}
/**
* @param confirmationTime the confirmationTime to set
*/
public void setConfirmationTime(int confirmationTime) {
this.confirmationTime = confirmationTime;
}
/**
* @param friendlyName the friendlyName to set
*/
@ -987,20 +884,6 @@ public class Settings implements DataObject, WorldSettings {
this.visitorBannedCommands = visitorBannedCommands;
}
/**
* @param entityLimits the entityLimits to set
*/
public void setEntityLimits(Map<EntityType, Integer> entityLimits) {
this.entityLimits = entityLimits;
}
/**
* @param tileEntityLimits the tileEntityLimits to set
*/
public void setTileEntityLimits(Map<String, Integer> tileEntityLimits) {
this.tileEntityLimits = tileEntityLimits;
}
/**
* @param maxTeamSize the maxTeamSize to set
*/

View File

@ -6,6 +6,7 @@ import bentobox.addon.bskyblock.BSkyBlock;
import world.bentobox.bentobox.api.commands.CompositeCommand;
import world.bentobox.bentobox.api.commands.admin.AdminClearResetsAllCommand;
import world.bentobox.bentobox.api.commands.admin.AdminClearResetsCommand;
import world.bentobox.bentobox.api.commands.admin.AdminDeleteCommand;
import world.bentobox.bentobox.api.commands.admin.AdminGetRankCommand;
import world.bentobox.bentobox.api.commands.admin.AdminInfoCommand;
import world.bentobox.bentobox.api.commands.admin.AdminRegisterCommand;
@ -58,6 +59,8 @@ public class AdminCommand extends CompositeCommand {
// Resets
new AdminClearResetsCommand(this);
new AdminClearResetsAllCommand(this);
// Delete
new AdminDeleteCommand(this);
}
@Override

View File

@ -1,67 +1,8 @@
# BSkyBlock Configuration FC-0.7
# BSkyBlock Configuration FC-1
# This config file is dynamic and saved when the server is shutdown.
# You cannot edit it while the server is running because changes will
# be lost! Use in-game settings GUI or edit when server is offline.
#
general:
# BSkyBlock uses bStats.org to get global data about the plugin to help improving it.
# bStats has nearly no effect on your server's performance and the sent data is completely
# anonymous so please consider twice if you really want to disable it.
metrics: true
# Check for updates - this will tell Ops and the console if there is a new
# version available. It contacts dev.bukkit.org to request the latest version
# info. It does not download the latest version or change any files
check-updates: true
# Default language for new players.
# This is the filename in the locale folder without .yml.
# If this does not exist, the default en-US will be used.
default-language: en-US
# Use economy or not. If true, an economy plugin is required. If false, no money is used or give.
# If there is no economy plugin present anyway, money will be automatically disabled.
use-economy: true
# Starting money - this is how much money new players will have as their
# balance at the start of an island.
starting-money: 10.0
purge:
# Only islands below this level will be removed if they are abandoned and admins issue the purge command
max-island-level: 50
# Remove user data when its island gets purged.
# Helps a lot to avoid huge backups and can save some performance on startup,
# but the player settings and data will be reset.
remove-user-data: false
database:
# FLATFILE, MYSQL, MONGO
# if you use MONGO, you must also run the BSBMongo plugin (not addon)
# See https://github.com/tastybento/bsbMongo/releases/
type: FLATFILE
host: localhost
# Port 3306 is MySQL's default. Port 27017 is MongoDB's default.
port: 3306
name: BSkyBlock
username: username
password: password
# How often the data will be saved to file in mins. Default is 5 minutes.
# This helps prevent issues if the server crashes.
# Data is also saved at important points in the game.
backup-period: 5
# Recover super flat - if the generator does not run for some reason, you can get
# super flat chunks (grass). To remove automatically, select this option. Turn off
# if there are no more because it may cause lag.
# This will regenerate any chunks with bedrock at y=0 when they are loaded
recover-super-flat: false
# Mute death messages
mute-death-messages: false
# Allow FTB Autonomous Activator to work (will allow a pseudo player [CoFH] to place and break blocks and hang items)
# Add other fake player names here if required
fakeplayers:
- '[CoFH]'
# Allow obsidian to be scooped up with an empty bucket back into lava
# This only works if there is a single block of obsidian (no obsidian within 10 blocks)
# Recommendation is to keep this true so that newbies don't bother you or reset their
# island unnecessarily.
allow-obsidian-scooping: true
# Time in seconds that players have to confirm sensitive commands, e.g. island reset
confirmation-time: 20
world:
# Friendly name for this world. Used in admin commands. Must be a single word
friendly-name: BSkyBlock
@ -106,6 +47,8 @@ world:
# The default game mode for this world. Players will be set to this mode when they create
# a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR
default-game-mode: SURVIVAL
# The default biome for the overworld
default-biome: PLAINS
nether:
# Generate Nether - if this is false, the nether world will not be made and access to
# the nether will not occur. Other plugins may still enable portal usage.
@ -131,21 +74,27 @@ world:
generate: true
islands: true
dragon-spawn: false
# Removing mobs - this kills all monsters in the vicinity. Benefit is that it helps
# players return to their island if the island has been overrun by monsters.
# This setting is toggled in world flags and set by the settings GUI.
# Mob white list - these mobs will NOT be removed when logging in or doing /island
remove-mobs-whitelist:
- ZOMBIE_VILLAGER
- WITHER
- PIG_ZOMBIE
- ENDERMAN
- WITHER
- ZOMBIE_VILLAGER
# World flags. These are boolean settings for various flags for this world
flags:
ENTER_EXIT_MESSAGES: true
CREEPER_DAMAGE: true
PISTON_PUSH: true
ISLAND_RESPAWN: true
CREEPER_GRIEFING: false
ENDERMAN_GRIEFING: true
CLEAN_SUPER_FLAT: false
CHEST_DAMAGE: false
ENTER_EXIT_MESSAGES: true
ENDERMAN_DEATH_DROP: true
OFFLINE_REDSTONE: true
REMOVE_MOBS: true
ENDER_CHEST: false
ITEM_FRAME_DAMAGE: false
# These are the default protection settings for new islands.
# The value is the minimum island rank required allowed to do the action
# Ranks are: Visitor = 0, Member = 900, Owner = 1000
@ -153,8 +102,8 @@ world:
HURT_ANIMALS: 900
COLLECT_WATER: 900
REDSTONE: 900
BUCKET: 900
BUTTON: 900
BUCKET: 900
LOCK: 0
FIRE_EXTINGUISH: 900
ENDER_PEARL: 900
@ -168,11 +117,12 @@ world:
FIRE: 900
CRAFTING: 900
BREEDING: 900
SHEARING: 900
TNT: 900
ENCHANTING: 900
SHEARING: 900
HURT_VILLAGERS: 900
SPAWN_EGGS: 900
BED: 900
SPAWN_EGGS: 900
COLLECT_LAVA: 900
MILKING: 900
LEVER: 900
@ -182,17 +132,17 @@ world:
GATE: 900
TRADING: 900
EGGS: 900
ITEM_DROP: 900
PORTAL: 900
ITEM_DROP: 900
CHEST: 900
NOTE_BLOCK: 900
LEASH: 900
MOUNT_INVENTORY: 900
BREAK_BLOCKS: 900
MOUNT_INVENTORY: 900
CHORUS_FRUIT: 900
ITEM_PICKUP: 900
CROP_TRAMPLE: 900
JUKEBOX: 900
ITEM_PICKUP: 900
BREWING: 900
# These are the default settings for new islands
default-island-settings:
@ -202,16 +152,13 @@ world:
MONSTER_SPAWN: true
FIRE_SPREAD: true
PVP_OVERWORLD: false
# These are the settings visible to users.
# These are the settings visible to users. (Not implemented yet)
visible-settings: []
# Visitor banned commands - Visitors to islands cannot use these commands in this world
visitor-banned-commands:
- spawner
- spawnmob
island:
limits:
entities: {}
tile-entities: {}
# Default max team size
# Use this permission to set for specific user groups: askyblock.team.maxsize.<number>
# Permission size cannot be less than the default below.
@ -220,14 +167,6 @@ island:
# Accessed via sethome <number> or go <number>
# Use this permission to set for specific user groups: askyblock.island.maxhomes.<number>
max-homes: 1
name:
# Island naming
# Only players with the TODO can name their island
# It is displayed in the top ten and enter and exit announcements
# It replaces the owner's name. Players can use & for color coding if they have the TODO permission
# These set the minimum and maximum size of a name.
min-length: 0
max-length: 20
reset:
# How many resets a player is allowed (override with /asadmin clearreset <player>)
# Value of -1 means unlimited, 0 means hardcore - no resets.
@ -269,17 +208,6 @@ island:
ender-chest: false
require-confirmation:
reset: true
# Ask the player to confirm the command he is using by typing it again.
# The 'wait' value is the number of seconds to wait for confirmation.
kick: true
kick-wait: 10
leave: true
leave-wait: 10
# How long a player must wait before they can reset their island again in second
reset-wait: 300
make-island-if-none: false
# Immediately teleport player to their island (home 1 if it exists) when entering the world
immediate-teleport-on-island: false
# Have player's respawn on their island if they die
respawn-on-island: false
deaths:
@ -288,7 +216,7 @@ island:
sum-team: false
# When a player joins a team, reset their death count
team-join-reset: true
customranks: {}
togglePvPCooldown: 0
protection:
# Geo restrict mobs.
# Mobs that exit the island space where they were spawned will be removed.
@ -323,7 +251,9 @@ protection:
- HOT_FLOOR
- CRAMMING
- VOID
togglePvPCooldown: 0
panel:
close-on-click-outside: true
do-not-edit-these-settings:
# These settings should not be edited
reset-epoch: 0
uniqueId: config