mirror of
https://github.com/BentoBoxWorld/CaveBlock.git
synced 2024-11-26 12:15:14 +01:00
Initial CaveBlock addon.
This commit is contained in:
parent
3a4b9ff157
commit
0b79dcc503
226
pom.xml
Normal file
226
pom.xml
Normal file
@ -0,0 +1,226 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>caveblock</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<name>CaveBlock</name>
|
||||
<description>CaveBlock is an add-on for BentoBox, an expandable Minecraft Bukkit plugin for island-type games like SkyBlock or AcidIsland.</description>
|
||||
<url>https://github.com/BentoBoxWorld/CaveBlock</url>
|
||||
<inceptionYear>2019</inceptionYear>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/BentoBoxWorld/CaveBlock.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:BentoBoxWorld/CaveBlock.git</developerConnection>
|
||||
<url>https://github.com/BentoBoxWorld/CaveBlock</url>
|
||||
</scm>
|
||||
|
||||
<ciManagement>
|
||||
<system>jenkins</system>
|
||||
<url>http://ci.codemc.org/job/BentoBoxWorld/job/CaveBlock</url>
|
||||
</ciManagement>
|
||||
|
||||
<issueManagement>
|
||||
<system>GitHub</system>
|
||||
<url>https://github.com/BentoBoxWorld/CaveBlock/issues</url>
|
||||
</issueManagement>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>codemc-snapshots</id>
|
||||
<url>https://repo.codemc.org/repository/maven-snapshots</url>
|
||||
</snapshotRepository>
|
||||
<repository>
|
||||
<id>codemc-releases</id>
|
||||
<url>https://repo.codemc.org/repository/maven-releases</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<powermock.version>1.7.4</powermock.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>codemc-repo</id>
|
||||
<url>https://repo.codemc.org/repository/maven-public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.13.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<version>1.10.19</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-module-junit4</artifactId>
|
||||
<version>${powermock.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-api-mockito</artifactId>
|
||||
<version>${powermock.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>bentobox</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<defaultGoal>clean package</defaultGoal>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources/locales</directory>
|
||||
<targetPath>./locales</targetPath>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>*.yml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources/schems</directory>
|
||||
<targetPath>./schems</targetPath>
|
||||
<filtering>false</filtering>
|
||||
<includes>
|
||||
<include>*.schem</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<nonFilteredFileExtensions>
|
||||
<nonFilteredFileExtension>schem</nonFilteredFileExtension>
|
||||
</nonFilteredFileExtensions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.7.0</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<configuration>
|
||||
<show>public</show>
|
||||
<failOnError>false</failOnError>
|
||||
<additionalJOption>-Xdoclint:none</additionalJOption>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<configuration>
|
||||
<minimizeJar>false</minimizeJar>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.1</version>
|
||||
<configuration>
|
||||
<append>true</append>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>pre-unit-test</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>post-unit-test</id>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
234
src/main/java/world/bentobox/caveblock/CaveBlock.java
Normal file
234
src/main/java/world/bentobox/caveblock/CaveBlock.java
Normal file
@ -0,0 +1,234 @@
|
||||
package world.bentobox.caveblock;
|
||||
|
||||
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.WorldCreator;
|
||||
import org.bukkit.WorldType;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
|
||||
import world.bentobox.bentobox.api.addons.GameModeAddon;
|
||||
import world.bentobox.bentobox.api.configuration.Config;
|
||||
import world.bentobox.bentobox.api.configuration.WorldSettings;
|
||||
import world.bentobox.caveblock.commands.AdminCommand;
|
||||
import world.bentobox.caveblock.commands.IslandCommand;
|
||||
import world.bentobox.caveblock.generators.ChunkGeneratorWorld;
|
||||
|
||||
|
||||
public class CaveBlock extends GameModeAddon
|
||||
{
|
||||
/**
|
||||
* Executes code when loading the addon. This is called before {@link #onEnable()}. This should preferably
|
||||
* be used to setup configuration and worlds.
|
||||
*/
|
||||
@Override
|
||||
public void onLoad()
|
||||
{
|
||||
super.onLoad();
|
||||
|
||||
this.saveDefaultConfig();
|
||||
this.loadSettings();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Executes code when enabling the addon. This is called after {@link #onLoad()}.
|
||||
*/
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
this.playerCommand = new IslandCommand(this);
|
||||
this.adminCommand = new AdminCommand(this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Executes code when reloading the addon.
|
||||
*/
|
||||
@Override
|
||||
public void onReload()
|
||||
{
|
||||
super.onReload();
|
||||
this.loadSettings();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Executes code when disabling the addon.
|
||||
*/
|
||||
@Override
|
||||
public void onDisable()
|
||||
{
|
||||
if (this.settings != null)
|
||||
{
|
||||
new Config<>(this, Settings.class).saveConfigObject(this.settings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method loads CaveBlock settings
|
||||
*/
|
||||
private void loadSettings()
|
||||
{
|
||||
this.settings = new Config<>(this, Settings.class).loadConfigObject();
|
||||
|
||||
if (this.settings == null)
|
||||
{
|
||||
// Disable
|
||||
this.logError("CaveBlock settings could not load! Addon disabled.");
|
||||
this.setState(State.DISABLED);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: World generators
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* Make the worlds for this GameMode in this method. BentoBox will call it after onLoad() and before
|
||||
* onEnable(). {@link #islandWorld} must be created and assigned, {@link #netherWorld} and {@link
|
||||
* #endWorld} are optional and may be null.
|
||||
*/
|
||||
@Override
|
||||
public void createWorlds()
|
||||
{
|
||||
String worldName = this.settings.getWorldName();
|
||||
|
||||
if (this.getServer().getWorld(worldName) == null)
|
||||
{
|
||||
this.getLogger().info("Creating CaveBlock world ...");
|
||||
}
|
||||
|
||||
this.chunkGenerator = new ChunkGeneratorWorld(this);
|
||||
|
||||
// Create the world if it does not exist
|
||||
this.islandWorld = WorldCreator.name(worldName).
|
||||
type(WorldType.FLAT).
|
||||
environment(World.Environment.NORMAL).
|
||||
generator(new ChunkGeneratorWorld(this)).
|
||||
createWorld();
|
||||
|
||||
|
||||
|
||||
// Make the nether if it does not exist
|
||||
if (this.settings.isNetherGenerate())
|
||||
{
|
||||
if (this.getServer().getWorld(worldName + NETHER) == null)
|
||||
{
|
||||
this.log("Creating CaveBlock's Nether...");
|
||||
}
|
||||
|
||||
if (!this.settings.isNetherIslands())
|
||||
{
|
||||
this.netherWorld = WorldCreator.name(worldName + NETHER).
|
||||
type(WorldType.NORMAL).
|
||||
environment(World.Environment.NETHER).
|
||||
createWorld();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.netherWorld = WorldCreator.name(worldName + NETHER).
|
||||
type(WorldType.FLAT).
|
||||
generator(new ChunkGeneratorWorld(this)).
|
||||
environment(World.Environment.NETHER).
|
||||
createWorld();
|
||||
}
|
||||
}
|
||||
|
||||
// Make the end if it does not exist
|
||||
if (this.settings.isEndGenerate())
|
||||
{
|
||||
if (this.getServer().getWorld(worldName + THE_END) == null)
|
||||
{
|
||||
this.log("Creating CaveBlock's End World...");
|
||||
}
|
||||
if (!this.settings.isEndIslands())
|
||||
{
|
||||
this.endWorld = WorldCreator.name(worldName + THE_END).
|
||||
type(WorldType.NORMAL).
|
||||
environment(World.Environment.THE_END).
|
||||
createWorld();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.endWorld = WorldCreator.name(worldName + THE_END).
|
||||
type(WorldType.FLAT).
|
||||
generator(new ChunkGeneratorWorld(this)).
|
||||
environment(World.Environment.THE_END).
|
||||
createWorld();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Defines the world generator for this game mode
|
||||
*
|
||||
* @param worldName - name of world that this applies to
|
||||
* @param id - id if any
|
||||
* @return Chunk generator
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@Override
|
||||
public @NonNull ChunkGenerator getDefaultWorldGenerator(String worldName, String id)
|
||||
{
|
||||
return this.chunkGenerator;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Getters
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* @return WorldSettings for this GameMode
|
||||
*/
|
||||
@Override
|
||||
public WorldSettings getWorldSettings()
|
||||
{
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Settings for this GameMode
|
||||
*/
|
||||
public Settings getSettings()
|
||||
{
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* This stores CaveBlock addon settings.
|
||||
*/
|
||||
private Settings settings;
|
||||
|
||||
/**
|
||||
* This stores CaveBlock addon WorldGenerator.
|
||||
*/
|
||||
private ChunkGeneratorWorld chunkGenerator;
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Constants
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* String for nether world.
|
||||
*/
|
||||
private static final String NETHER = "_nether";
|
||||
|
||||
/**
|
||||
* String for the end world.
|
||||
*/
|
||||
private static final String THE_END = "_the_end";
|
||||
}
|
1590
src/main/java/world/bentobox/caveblock/Settings.java
Normal file
1590
src/main/java/world/bentobox/caveblock/Settings.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,77 @@
|
||||
package world.bentobox.caveblock.commands;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.*;
|
||||
import world.bentobox.bentobox.api.commands.admin.deaths.AdminDeathsCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.range.AdminRangeCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.resets.AdminResetsResetCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.schem.AdminSchemCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.team.AdminTeamAddCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.team.AdminTeamDisbandCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.team.AdminTeamKickCommand;
|
||||
import world.bentobox.bentobox.api.commands.admin.team.AdminTeamSetownerCommand;
|
||||
import world.bentobox.bentobox.api.localization.TextVariables;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.caveblock.CaveBlock;
|
||||
|
||||
|
||||
public class AdminCommand extends CompositeCommand {
|
||||
|
||||
public AdminCommand(CaveBlock addon) {
|
||||
super(addon, "cbadmin", "cba");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setPermission("admin.*");
|
||||
setOnlyPlayer(false);
|
||||
setParametersHelp("commands.admin.help.parameters");
|
||||
setDescription("commands.admin.help.description");
|
||||
new AdminVersionCommand(this);
|
||||
new AdminTeleportCommand(this, "tp");
|
||||
new AdminTeleportCommand(this, "tpnether");
|
||||
new AdminTeleportCommand(this, "tpend");
|
||||
new AdminGetrankCommand(this);
|
||||
new AdminSetrankCommand(this);
|
||||
new AdminInfoCommand(this);
|
||||
// Team commands
|
||||
new AdminTeamAddCommand(this);
|
||||
new AdminTeamKickCommand(this);
|
||||
new AdminTeamDisbandCommand(this);
|
||||
new AdminTeamSetownerCommand(this);
|
||||
// Schems
|
||||
new AdminSchemCommand(this);
|
||||
// Register/unregister islands
|
||||
new AdminRegisterCommand(this);
|
||||
new AdminUnregisterCommand(this);
|
||||
// Range
|
||||
new AdminRangeCommand(this);
|
||||
// Resets
|
||||
new AdminResetsResetCommand(this);
|
||||
// TODO new AdminClearresetsallCommand(this);
|
||||
// Delete
|
||||
new AdminDeleteCommand(this);
|
||||
// Why
|
||||
new AdminWhyCommand(this);
|
||||
// Deaths
|
||||
new AdminDeathsCommand(this);
|
||||
// Reload
|
||||
new AdminReloadCommand(this);
|
||||
// Spawn
|
||||
new AdminSetspawnCommand(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
if (!args.isEmpty()) {
|
||||
user.sendMessage("general.errors.unknown-command", TextVariables.LABEL, getTopLabel());
|
||||
return false;
|
||||
}
|
||||
// By default run the attached help command, if it exists (it should)
|
||||
return showHelp(this, user);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package world.bentobox.caveblock.commands;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
|
||||
|
||||
public class IslandAboutCommand extends CompositeCommand {
|
||||
|
||||
/**
|
||||
* About
|
||||
* @param islandCommand - parent command
|
||||
*/
|
||||
public IslandAboutCommand(CompositeCommand islandCommand) {
|
||||
super(islandCommand, "about", "ab");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
setDescription("commands.island.about.description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
user.sendRawMessage("About " + getAddon().getDescription().getName() + " " + getAddon().getDescription().getVersion() + ":");
|
||||
user.sendRawMessage("Copyright (c) 2019 BONNe");
|
||||
user.sendRawMessage("See https://www.eclipse.org/legal/epl-2.0/");
|
||||
user.sendRawMessage("for license information.");
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package world.bentobox.caveblock.commands;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.commands.island.*;
|
||||
import world.bentobox.bentobox.api.commands.island.team.IslandTeamCommand;
|
||||
import world.bentobox.bentobox.api.localization.TextVariables;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.caveblock.CaveBlock;
|
||||
|
||||
|
||||
public class IslandCommand extends CompositeCommand {
|
||||
|
||||
public IslandCommand(CaveBlock addon) {
|
||||
super(addon, "cave", "cb");
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.CompositeCommand#setup()
|
||||
*/
|
||||
@Override
|
||||
public void setup() {
|
||||
setDescription("commands.island.help.description");
|
||||
setOnlyPlayer(true);
|
||||
// Permission
|
||||
setPermission("island");
|
||||
// Set up subcommands
|
||||
new IslandAboutCommand(this);
|
||||
new IslandInfoCommand(this);
|
||||
new IslandCreateCommand(this);
|
||||
new IslandGoCommand(this);
|
||||
new IslandSpawnCommand(this);
|
||||
new IslandResetCommand(this);
|
||||
new IslandSetnameCommand(this);
|
||||
new IslandResetnameCommand(this);
|
||||
new IslandSethomeCommand(this);
|
||||
new IslandSettingsCommand(this);
|
||||
new IslandLanguageCommand(this);
|
||||
new IslandBanCommand(this);
|
||||
new IslandUnbanCommand(this);
|
||||
new IslandBanlistCommand(this);
|
||||
// Team commands
|
||||
new IslandTeamCommand(this);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see us.tastybento.bskyblock.api.commands.CommandArgument#execute(org.bukkit.command.CommandSender, java.lang.String[])
|
||||
*/
|
||||
@Override
|
||||
public boolean execute(User user, String label, List<String> args) {
|
||||
if (user == null) {
|
||||
return false;
|
||||
}
|
||||
if (args.isEmpty()) {
|
||||
// If user has an island, go
|
||||
if (getPlugin().getIslands().getIsland(getWorld(), user.getUniqueId()) != null) {
|
||||
return getSubCommand("go").map(goCmd -> goCmd.execute(user, goCmd.getLabel(), new ArrayList<>())).orElse(false);
|
||||
}
|
||||
// No islands currently
|
||||
return getSubCommand("create").map(createCmd -> createCmd.execute(user, createCmd.getLabel(), new ArrayList<>())).orElse(false);
|
||||
}
|
||||
user.sendMessage("general.errors.unknown-command", TextVariables.LABEL, getTopLabel());
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,220 @@
|
||||
package world.bentobox.caveblock.generators;
|
||||
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.generator.BlockPopulator;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.util.noise.PerlinOctaveGenerator;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import world.bentobox.caveblock.CaveBlock;
|
||||
|
||||
|
||||
/**
|
||||
* Class ChunkGeneratorWorld ...
|
||||
*
|
||||
* @author BONNe
|
||||
* Created on 27.01.2019
|
||||
*/
|
||||
public class ChunkGeneratorWorld extends ChunkGenerator
|
||||
{
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Constructor
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* @param addon - CaveBlock object
|
||||
*/
|
||||
public ChunkGeneratorWorld(CaveBlock addon)
|
||||
{
|
||||
super();
|
||||
this.addon = addon;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Methods
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
@Override
|
||||
public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, ChunkGenerator.BiomeGrid biomeGrid)
|
||||
{
|
||||
ChunkData result;
|
||||
|
||||
if (world.getEnvironment().equals(World.Environment.NETHER))
|
||||
{
|
||||
result = this.generateNetherChunks(world, random, chunkX, chunkZ, biomeGrid);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = this.createChunkData(world);
|
||||
|
||||
for (int x = 0; x < 16; x++)
|
||||
{
|
||||
for (int z = 0; z < 16; z++)
|
||||
{
|
||||
result.setRegion(0, 0, 0, 16, 200, 16, Material.STONE);
|
||||
|
||||
if (world.getEnvironment().equals(World.Environment.NORMAL))
|
||||
{
|
||||
biomeGrid.setBiome(x, z, this.addon.getSettings().getDefaultBiome());
|
||||
}
|
||||
|
||||
if (this.addon.getSettings().isBedRockFloor())
|
||||
{
|
||||
result.setBlock(x, 0, z, Material.BEDROCK);
|
||||
}
|
||||
|
||||
if (this.addon.getSettings().isBedRockRoof())
|
||||
{
|
||||
result.setBlock(x, 150, z, Material.BEDROCK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("Chunk at " + chunkX + " " + chunkZ + " is generated");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canSpawn(World world, int x, int z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<BlockPopulator> getDefaultPopulators(final World world) {
|
||||
return Arrays.asList(new BlockPopulator[0]);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Nether Section
|
||||
*/
|
||||
private ChunkData generateNetherChunks(World world, Random random, int chunkX, int chunkZ, BiomeGrid biomeGrid)
|
||||
{
|
||||
ChunkData result = this.createChunkData(world);
|
||||
this.rand.setSeed(world.getSeed());
|
||||
this.gen = new PerlinOctaveGenerator((long) (random.nextLong() * random.nextGaussian()), 8);
|
||||
|
||||
// This is a nether generator
|
||||
if (!world.getEnvironment().equals(World.Environment.NETHER))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
if (this.addon.getSettings().isNetherRoof())
|
||||
{
|
||||
// Make the roof - common across the world
|
||||
for (int x = 0; x < 16; x++)
|
||||
{
|
||||
for (int z = 0; z < 16; z++)
|
||||
{
|
||||
// Do the ceiling
|
||||
int maxHeight = world.getMaxHeight();
|
||||
result.setBlock(x, (maxHeight - 1), z, Material.BEDROCK);
|
||||
// Next three layers are a mix of bedrock and netherrack
|
||||
for (int y = 2; y < 5; y++)
|
||||
{
|
||||
double r = this.gen.noise(x, (maxHeight - y), z, 0.5, 0.5);
|
||||
if (r > 0D)
|
||||
{
|
||||
result.setBlock(x, (maxHeight - y), z, Material.BEDROCK);
|
||||
}
|
||||
}
|
||||
// Next three layers are a mix of netherrack and air
|
||||
for (int y = 5; y < 8; y++)
|
||||
{
|
||||
double r = this.gen.noise(x, (double) maxHeight - y, z, 0.5, 0.5);
|
||||
|
||||
if (r > 0D)
|
||||
{
|
||||
result.setBlock(x, (maxHeight - y), z, Material.NETHERRACK);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.setBlock(x, (maxHeight - y), z, Material.AIR);
|
||||
}
|
||||
}
|
||||
|
||||
// Layer 8 may be glowstone
|
||||
double r = this.gen.noise(x, (double) maxHeight - 8, z, random.nextFloat(), random.nextFloat());
|
||||
|
||||
if (r > 0.5D)
|
||||
{
|
||||
// Have blobs of glowstone
|
||||
switch (random.nextInt(4))
|
||||
{
|
||||
case 1:
|
||||
// Single block
|
||||
result.setBlock(x, (maxHeight - 8), z, Material.GLOWSTONE);
|
||||
if (x < 14 && z < 14)
|
||||
{
|
||||
result.setBlock(x + 1, (maxHeight - 8), z + 1, Material.GLOWSTONE);
|
||||
result.setBlock(x + 2, (maxHeight - 8), z + 2, Material.GLOWSTONE);
|
||||
result.setBlock(x + 1, (maxHeight - 8), z + 2, Material.GLOWSTONE);
|
||||
result.setBlock(x + 1, (maxHeight - 8), z + 2, Material.GLOWSTONE);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
// Stalatite
|
||||
for (int i = 0; i < random.nextInt(10); i++)
|
||||
{
|
||||
result.setBlock(x, (maxHeight - 8 - i), z, Material.GLOWSTONE);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
result.setBlock(x, (maxHeight - 8), z, Material.GLOWSTONE);
|
||||
if (x > 3 && z > 3)
|
||||
{
|
||||
for (int xx = 0; xx < 3; xx++)
|
||||
{
|
||||
for (int zz = 0; zz < 3; zz++)
|
||||
{
|
||||
result.setBlock(x - xx,
|
||||
(maxHeight - 8 - random.nextInt(2)),
|
||||
z - xx,
|
||||
Material.GLOWSTONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
result.setBlock(x, (maxHeight - 8), z, Material.GLOWSTONE);
|
||||
break;
|
||||
}
|
||||
|
||||
result.setBlock(x, (maxHeight - 8), z, Material.GLOWSTONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.setBlock(x, (maxHeight - 8), z, Material.AIR);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Section: Variables
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
private CaveBlock addon;
|
||||
|
||||
/** Field rand */
|
||||
private Random rand = new Random();
|
||||
|
||||
private PerlinOctaveGenerator gen;
|
||||
}
|
136
src/main/resources/addon.yml
Normal file
136
src/main/resources/addon.yml
Normal file
@ -0,0 +1,136 @@
|
||||
name: CaveBlock
|
||||
main: world.bentobox.caveblock.CaveBlock
|
||||
version: ${version}
|
||||
|
||||
authors: BONNe
|
||||
|
||||
permissions:
|
||||
caveblock.island:
|
||||
description: Allow island command usage
|
||||
default: true
|
||||
caveblock.island.create:
|
||||
description: Allow island creation
|
||||
default: true
|
||||
caveblock.island.home:
|
||||
description: Allow teleporting to player island
|
||||
default: true
|
||||
caveblock.island.sethome:
|
||||
description: Let the player use the sethome command
|
||||
default: true
|
||||
caveblock.island.info:
|
||||
description: Let the player check their island level
|
||||
default: true
|
||||
caveblock.island.sethome:
|
||||
description: Let the player set their island teleport point
|
||||
default: true
|
||||
caveblock.island.lock:
|
||||
description: Allows island locking
|
||||
default: false
|
||||
caveblock.island.expel:
|
||||
description: Allows expelling of visitors
|
||||
default: true
|
||||
caveblock.island.ban:
|
||||
description: Allows banning of visitors
|
||||
default: true
|
||||
caveblock.island.settings:
|
||||
description: Player can see server settings
|
||||
default: true
|
||||
caveblock.island.language:
|
||||
description: Player can select a language
|
||||
default: true
|
||||
caveblock.island.name:
|
||||
description: Player can set the name of their island
|
||||
default: true
|
||||
caveblock.island.spawn:
|
||||
description: Player can use the island spawn command if spawn exists
|
||||
default: true
|
||||
caveblock.island.reset:
|
||||
description: Player can use the island reset or restart command
|
||||
default: true
|
||||
caveblock.island.team:
|
||||
description: Let a player use team commands
|
||||
default: true
|
||||
caveblock.island.team.trust:
|
||||
description: Let a player use team trust commands
|
||||
default: true
|
||||
caveblock.island.team.coop:
|
||||
description: Let a player use team coop commands
|
||||
default: true
|
||||
caveblock.settings.*:
|
||||
description: Allow use of settings on island
|
||||
default: true
|
||||
caveblock.mod.info:
|
||||
description: Let a moderator see info on a player
|
||||
default: op
|
||||
caveblock.mod.resethome:
|
||||
description: Allows setting or reseting of a player's home position
|
||||
default: op
|
||||
caveblock.mod.clearreset:
|
||||
description: Allow clearing of island reset limit
|
||||
default: false
|
||||
caveblock.mod.tp:
|
||||
description: Allows teleport to an island
|
||||
default: op
|
||||
caveblock.mod.bypasscooldowns:
|
||||
description: Allow moderator to bypass cooldowns
|
||||
default: op
|
||||
caveblock.mod.bypassprotect:
|
||||
description: Allow moderator to bypass island protection
|
||||
default: op
|
||||
caveblock.mod.bypassexpel:
|
||||
description: Allow moderator to bypass island expulsion
|
||||
default: op
|
||||
caveblock.mod.lock:
|
||||
description: Locks or unlocks an island
|
||||
default: op
|
||||
caveblock.mod.bypasslock:
|
||||
description: Bypasses an island lock
|
||||
default: op
|
||||
caveblock.mod.team:
|
||||
description: Enables modification of teams via kick and add commands
|
||||
default: false
|
||||
caveblock.mod.name:
|
||||
description: Enables naming of player's islands
|
||||
default: false
|
||||
caveblock.mod.resetname:
|
||||
description: Enables reset of player's island names
|
||||
default: false
|
||||
caveblock.admin.clearresetall:
|
||||
description: Allow clearing of island reset limit of all players
|
||||
default: op
|
||||
caveblock.admin.reload:
|
||||
description: Reload the config.yml
|
||||
default: op
|
||||
caveblock.admin.delete:
|
||||
description: Let a player completely remove a player (including island)
|
||||
default: op
|
||||
caveblock.admin.deleteisland:
|
||||
description: Let a player completely remove the island the player is on
|
||||
default: op
|
||||
caveblock.admin.register:
|
||||
description: Let a player register the nearest island to another player.
|
||||
default: op
|
||||
caveblock.admin.unregister:
|
||||
description: Removes a player from an island without deleting the island blocks.
|
||||
default: op
|
||||
caveblock.admin.purge:
|
||||
description: Let a player purge old islands.
|
||||
default: op
|
||||
caveblock.admin.setspawn:
|
||||
description: Allows use of spawn tools
|
||||
default: op
|
||||
caveblock.admin.setrange:
|
||||
description: Allows setting of island protection range
|
||||
default: op
|
||||
caveblock.admin.reserve:
|
||||
description: Reserves an empty spot for a player's next island
|
||||
default: op
|
||||
caveblock.admin.settingsreset:
|
||||
description: Resets all the islands to default protection settings
|
||||
default: op
|
||||
caveblock.admin.noban:
|
||||
description: Player cannot be banned from an island
|
||||
default: op
|
||||
caveblock.admin.setlanguage:
|
||||
description: Resets all player languages and sets the default language
|
||||
default: op
|
285
src/main/resources/config.yml
Normal file
285
src/main/resources/config.yml
Normal file
@ -0,0 +1,285 @@
|
||||
# CaveBlock Configuration ${version}
|
||||
# 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.
|
||||
#
|
||||
world:
|
||||
# Friendly name for this world. Used in admin commands. Must be a single word
|
||||
friendly-name: CaveBlock
|
||||
# Name of the world - if it does not exist then it will be generated.
|
||||
# It acts like a prefix for nether and end (e.g. CaveBlock-world, CaveBlock-world_nether, CaveBlock-world_end)
|
||||
world-name: CaveBlock-world
|
||||
# World difficulty setting - PEACEFUL, EASY, NORMAL, HARD
|
||||
# Other plugins may override this setting
|
||||
difficulty: NORMAL
|
||||
# Radius of island in blocks. (So distance between islands is twice this)
|
||||
# Will be rounded up to the nearest 16 blocks.
|
||||
# It is the same for every dimension : Overworld, Nether and End.
|
||||
# This value cannot be changed mid-game and the plugin will not start if it is different.
|
||||
distance-between-islands: 64
|
||||
# Default protection range radius in blocks. Cannot be larger than distance.
|
||||
# Admins can change protection sizes for players individually using /bsbadmin range set <player> <new range>
|
||||
# or set this permission: caveblock.island.range.<number>
|
||||
protection-range: 50
|
||||
# Start islands at these coordinates. This is where new islands will start in the
|
||||
# world. These must be a factor of your island distance, but the plugin will auto
|
||||
# calculate the closest location on the grid. Islands develop around this location
|
||||
# both positively and negatively in a square grid.
|
||||
# If none of this makes sense, leave it at 0,0.
|
||||
start-x: 0
|
||||
start-z: 0
|
||||
offset-x: 0
|
||||
offset-z: 0
|
||||
# Island height - Lowest is 5.
|
||||
# It is the y coordinate of the bedrock block in the schem.
|
||||
island-height: 60
|
||||
# Use your own world generator for this world.
|
||||
# In this case, the plugin will not generate anything.
|
||||
# /!\ This feature is experimental and might not work as expected or might not work at all.
|
||||
use-own-generator: false
|
||||
# Sea height (don't changes this mid-game unless you delete the world)
|
||||
# Minimum is 0, which means you are playing Skyblock!
|
||||
# If sea height is less than about 10, then players will drop right through it
|
||||
# if it exists. Makes for an interesting variation on skyblock.
|
||||
sea-height: 0
|
||||
# Maximum number of islands in the world. Set to -1 or 0 for unlimited.
|
||||
# If the number of islands is greater than this number, it will stop players from creating islands.
|
||||
max-islands: 0
|
||||
# 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: MOUNTAINS
|
||||
# The maximum number of players a player can ban at any one time in this game mode.
|
||||
# The permission acidisland.ban.maxlimit.X where X is a number can also be used per player
|
||||
# -1 = unlimited
|
||||
ban-limit: -1
|
||||
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.
|
||||
# Note: Some default challenges will not be possible if there is no nether.
|
||||
# Note that with a standard nether all players arrive at the same portal and entering a
|
||||
# portal will return them back to their islands.
|
||||
generate: true
|
||||
# Islands in Nether. Change to false for standard vanilla nether.
|
||||
islands: true
|
||||
# Nether trees are made if a player grows a tree in the nether (gravel and glowstone)
|
||||
# Applies to both vanilla and islands Nether
|
||||
trees: true
|
||||
# Make the nether roof, if false, there is nothing up there
|
||||
# Change to false if lag is a problem from the generation
|
||||
# Only applies to islands Nether
|
||||
roof: true
|
||||
# Nether spawn protection radius - this is the distance around the nether spawn
|
||||
# that will be protected from player interaction (breaking blocks, pouring lava etc.)
|
||||
# Minimum is 0 (not recommended), maximum is 100. Default is 25.
|
||||
# Only applies to vanilla nether
|
||||
spawn-radius: 25
|
||||
end:
|
||||
generate: true
|
||||
islands: true
|
||||
# /!\ This feature is experimental and might not work as expected or might not work at all.
|
||||
dragon-spawn: false
|
||||
# Mob white list - these mobs will NOT be removed when logging in or doing /island
|
||||
remove-mobs-whitelist:
|
||||
- ENDERMAN
|
||||
- ZOMBIE_VILLAGER
|
||||
- PIG_ZOMBIE
|
||||
- WITHER
|
||||
# World flags. These are boolean settings for various flags for this world
|
||||
flags:
|
||||
CREEPER_DAMAGE: true
|
||||
OBSIDIAN_SCOOPING: true
|
||||
PISTON_PUSH: false
|
||||
ISLAND_RESPAWN: true
|
||||
CREEPER_GRIEFING: false
|
||||
ENDERMAN_GRIEFING: true
|
||||
CLEAN_SUPER_FLAT: false
|
||||
CHEST_DAMAGE: false
|
||||
PREVENT_TELEPORT_WHEN_FALLING: 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
|
||||
default-island-flags:
|
||||
HURT_ANIMALS: 500
|
||||
REDSTONE: 500
|
||||
BUCKET: 500
|
||||
LOCK: 0
|
||||
ENDER_PEARL: 500
|
||||
DOOR: 500
|
||||
FURNACE: 500
|
||||
ANVIL: 500
|
||||
FISH_SCOOPING: 500
|
||||
FIRE: 500
|
||||
END_PORTAL: 500
|
||||
BREEDING: 500
|
||||
HURT_VILLAGERS: 500
|
||||
TNT: 500
|
||||
FROST_WALKER: 500
|
||||
TURTLE_EGGS: 500
|
||||
COLLECT_LAVA: 500
|
||||
LEVER: 500
|
||||
RIDING: 500
|
||||
HURT_MONSTERS: 0
|
||||
ARMOR_STAND: 500
|
||||
NAME_TAG: 500
|
||||
TRADING: 0
|
||||
EGGS: 500
|
||||
ITEM_DROP: 0
|
||||
NOTE_BLOCK: 0
|
||||
NETHER_PORTAL: 500
|
||||
CROP_TRAMPLE: 500
|
||||
ITEM_PICKUP: 0
|
||||
DROPPER: 500
|
||||
BREWING: 500
|
||||
COLLECT_WATER: 500
|
||||
BUTTON: 500
|
||||
FIRE_EXTINGUISH: 500
|
||||
BEACON: 500
|
||||
TRAPDOOR: 500
|
||||
PRESSURE_PLATE: 0
|
||||
ITEM_FRAME: 500
|
||||
PLACE_BLOCKS: 500
|
||||
CRAFTING: 0
|
||||
ENCHANTING: 0
|
||||
SHEARING: 500
|
||||
SPAWN_EGGS: 500
|
||||
BED: 500
|
||||
MILKING: 0
|
||||
DISPENSER: 500
|
||||
GATE: 0
|
||||
EXPERIENCE_PICKUP: 500
|
||||
HOPPER: 500
|
||||
LEASH: 500
|
||||
BREAK_BLOCKS: 500
|
||||
MOUNT_INVENTORY: 500
|
||||
CHORUS_FRUIT: 500
|
||||
CONTAINER: 500
|
||||
JUKEBOX: 500
|
||||
# These are the default settings for new islands
|
||||
default-island-settings:
|
||||
PVP_END: false
|
||||
ANIMAL_SPAWN: true
|
||||
PVP_NETHER: false
|
||||
MONSTER_SPAWN: true
|
||||
FIRE_SPREAD: true
|
||||
PVP_OVERWORLD: false
|
||||
# These are the settings visible to users. (Not implemented yet)
|
||||
# /!\ This feature is experimental and might not work as expected or might not work at all.
|
||||
visible-settings: []
|
||||
# Visitor banned commands - Visitors to islands cannot use these commands in this world
|
||||
visitor-banned-commands:
|
||||
- spawner
|
||||
- spawnmob
|
||||
island:
|
||||
# Default max team size
|
||||
# Permission size cannot be less than the default below.
|
||||
max-team-size: 4
|
||||
# Default maximum number of homes a player can have. Min = 1
|
||||
# Accessed via /is sethome <number> or /is go <number>
|
||||
max-homes: 1
|
||||
reset:
|
||||
# How many resets a player is allowed (override with /bsbadmin clearresets <player>)
|
||||
# Value of -1 means unlimited, 0 means hardcore - no resets.
|
||||
# Example, 2 resets means they get 2 resets or 3 islands lifetime
|
||||
reset-limit: -1
|
||||
# Kicked or leaving players lose resets
|
||||
# Players who leave a team will lose an island reset chance
|
||||
# If a player has zero resets left and leaves a team, they cannot make a new
|
||||
# island by themselves and can only join a team.
|
||||
# Leave this true to avoid players exploiting free islands
|
||||
leavers-lose-reset: false
|
||||
# Allow kicked players to keep their inventory.
|
||||
# If false, kicked player's inventory will be thrown at the island leader if the
|
||||
# kicked player is online and in the island world.
|
||||
kicked-keep-inventory: false
|
||||
on-join:
|
||||
# What the plugin should reset when the player joins or creates an island
|
||||
# Reset Money - if this is true, will reset the player's money to the starting money
|
||||
# Recommendation is that this is set to true, but if you run multi-worlds
|
||||
# make sure your economy handles multi-worlds too.
|
||||
money: false
|
||||
# Reset inventory - if true, the player's inventory will be cleared.
|
||||
# Note: if you have MultiInv running or a similar inventory control plugin, that
|
||||
# plugin may still reset the inventory when the world changes.
|
||||
inventory: false
|
||||
# Reset Ender Chest - if true, the player's Ender Chest will be cleared.
|
||||
ender-chest: false
|
||||
on-leave:
|
||||
# What the plugin should reset when the player leaves or is kicked from an island
|
||||
# Reset Money - if this is true, will reset the player's money to the starting money
|
||||
# Recommendation is that this is set to true, but if you run multi-worlds
|
||||
# make sure your economy handles multi-worlds too.
|
||||
money: false
|
||||
# Reset inventory - if true, the player's inventory will be cleared.
|
||||
# Note: if you have MultiInv running or a similar inventory control plugin, that
|
||||
# plugin may still reset the inventory when the world changes.
|
||||
inventory: false
|
||||
# Reset Ender Chest - if true, the player's Ender Chest will be cleared.
|
||||
ender-chest: false
|
||||
require-confirmation:
|
||||
reset: true
|
||||
# Have player's respawn on their island if they die
|
||||
respawn-on-island: false
|
||||
sethome:
|
||||
nether:
|
||||
allow: true
|
||||
require-confirmation: true
|
||||
the-end:
|
||||
allow: true
|
||||
require-confirmation: true
|
||||
deaths:
|
||||
# Whether deaths are counted or not.
|
||||
counted: true
|
||||
# Maximum number of deaths to count. The death count can be used by add-ons.
|
||||
max: 10
|
||||
sum-team: false
|
||||
# When a player joins a team, reset their death count
|
||||
team-join-reset: true
|
||||
protection:
|
||||
# Geo restrict mobs.
|
||||
# Mobs that exit the island space where they were spawned will be removed.
|
||||
geo-limit-settings:
|
||||
- GHAST
|
||||
- BAT
|
||||
- BLAZE
|
||||
# Invincible visitors. List of damages that will not affect visitors.
|
||||
# Make list blank if visitors should receive all damages
|
||||
invincible-visitors:
|
||||
- BLOCK_EXPLOSION
|
||||
- CONTACT
|
||||
- CUSTOM
|
||||
- DROWNING
|
||||
- ENTITY_ATTACK
|
||||
- ENTITY_EXPLOSION
|
||||
- FALL
|
||||
- FALLING_BLOCK
|
||||
- FIRE
|
||||
- FIRE_TICK
|
||||
- LAVA
|
||||
- LIGHTNING
|
||||
- MAGIC
|
||||
- POISON
|
||||
- PROJECTILE
|
||||
- STARVATION
|
||||
- SUFFOCATION
|
||||
- THORNS
|
||||
- WITHER
|
||||
- DRAGON_BREATH
|
||||
- FLY_INTO_WALL
|
||||
- HOT_FLOOR
|
||||
- CRAMMING
|
||||
- VOID
|
||||
panel:
|
||||
# Whether GUIs should be closed when the player clicks outside.
|
||||
close-on-click-outside: true
|
||||
do-not-edit-these-settings:
|
||||
# These settings should not be edited
|
||||
reset-epoch: 0
|
||||
uniqueId: config
|
12
src/main/resources/locales/en-US.yml
Normal file
12
src/main/resources/locales/en-US.yml
Normal file
@ -0,0 +1,12 @@
|
||||
###########################################################################################
|
||||
# This is a YML file. Be careful when editing. Check your edits in a YAML checker like #
|
||||
# the one at http://yaml-online-parser.appspot.com #
|
||||
###########################################################################################
|
||||
|
||||
caveblock:
|
||||
sign:
|
||||
line0: "&cCaveBlock"
|
||||
line1: "Welcome!"
|
||||
line2: "[name]"
|
||||
line3: "Start digging! &c<3"
|
||||
|
BIN
src/main/resources/schems/caveblock.schem
Normal file
BIN
src/main/resources/schems/caveblock.schem
Normal file
Binary file not shown.
BIN
src/main/resources/schems/end-caveblock.schem
Normal file
BIN
src/main/resources/schems/end-caveblock.schem
Normal file
Binary file not shown.
BIN
src/main/resources/schems/nether-caveblock.schem
Normal file
BIN
src/main/resources/schems/nether-caveblock.schem
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user