mirror of
https://github.com/BentoBoxWorld/CaveBlock.git
synced 2025-02-21 01:51:42 +01:00
1.14 compatibility (#25)
* Switches to lower-case world name, per 1.14.1 API * Fixes console freeze on 1.14.x
This commit is contained in:
parent
f39ed36854
commit
39b90b3d9d
@ -110,7 +110,7 @@ public class CaveBlock extends GameModeAddon
|
|||||||
@Override
|
@Override
|
||||||
public void createWorlds()
|
public void createWorlds()
|
||||||
{
|
{
|
||||||
String worldName = this.settings.getWorldName();
|
String worldName = this.settings.getWorldName().toLowerCase();
|
||||||
|
|
||||||
if (this.getServer().getWorld(worldName) == null)
|
if (this.getServer().getWorld(worldName) == null)
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,6 @@ import world.bentobox.bentobox.api.configuration.ConfigEntry;
|
|||||||
import world.bentobox.bentobox.api.configuration.StoreAt;
|
import world.bentobox.bentobox.api.configuration.StoreAt;
|
||||||
import world.bentobox.bentobox.api.configuration.WorldSettings;
|
import world.bentobox.bentobox.api.configuration.WorldSettings;
|
||||||
import world.bentobox.bentobox.api.flags.Flag;
|
import world.bentobox.bentobox.api.flags.Flag;
|
||||||
import world.bentobox.bentobox.database.objects.DataObject;
|
|
||||||
import world.bentobox.bentobox.database.objects.adapters.Adapter;
|
import world.bentobox.bentobox.database.objects.adapters.Adapter;
|
||||||
import world.bentobox.bentobox.database.objects.adapters.FlagSerializer;
|
import world.bentobox.bentobox.database.objects.adapters.FlagSerializer;
|
||||||
import world.bentobox.bentobox.database.objects.adapters.FlagSerializer2;
|
import world.bentobox.bentobox.database.objects.adapters.FlagSerializer2;
|
||||||
@ -755,27 +754,27 @@ public class Settings implements WorldSettings
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns the islandCommand value.
|
* This method returns the islandCommand value.
|
||||||
* @return the value of islandCommand.
|
* @return the value of islandCommand.
|
||||||
*/
|
*/
|
||||||
public String getIslandCommand()
|
public String getIslandCommand()
|
||||||
{
|
{
|
||||||
return islandCommand;
|
return islandCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns the adminCommand value.
|
* This method returns the adminCommand value.
|
||||||
* @return the value of adminCommand.
|
* @return the value of adminCommand.
|
||||||
*/
|
*/
|
||||||
public String getAdminCommand()
|
public String getAdminCommand()
|
||||||
{
|
{
|
||||||
return adminCommand;
|
return adminCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
// Section: Setters
|
// Section: Setters
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
|
||||||
@ -1500,43 +1499,43 @@ public class Settings implements WorldSettings
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method sets the islandCommand value.
|
* This method sets the islandCommand value.
|
||||||
* @param islandCommand the islandCommand new value.
|
* @param islandCommand the islandCommand new value.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setIslandCommand(String islandCommand)
|
public void setIslandCommand(String islandCommand)
|
||||||
{
|
{
|
||||||
this.islandCommand = islandCommand;
|
this.islandCommand = islandCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method sets the adminCommand value.
|
* This method sets the adminCommand value.
|
||||||
* @param adminCommand the adminCommand new value.
|
* @param adminCommand the adminCommand new value.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void setAdminCommand(String adminCommand)
|
public void setAdminCommand(String adminCommand)
|
||||||
{
|
{
|
||||||
this.adminCommand = adminCommand;
|
this.adminCommand = adminCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
// Section: Variables
|
// Section: Variables
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
/* Commands */
|
/* Commands */
|
||||||
@ConfigComment("Cave Command. What command users will run to access their cave.")
|
@ConfigComment("Cave Command. What command users will run to access their cave.")
|
||||||
@ConfigComment("To define alias, just separate commands with white space.")
|
@ConfigComment("To define alias, just separate commands with white space.")
|
||||||
@ConfigEntry(path = "cave.command.island")
|
@ConfigEntry(path = "cave.command.island")
|
||||||
private String islandCommand = "cave cb";
|
private String islandCommand = "cave cb";
|
||||||
|
|
||||||
@ConfigComment("The Cave admin command.")
|
@ConfigComment("The Cave admin command.")
|
||||||
@ConfigComment("To define alias, just separate commands with white space.")
|
@ConfigComment("To define alias, just separate commands with white space.")
|
||||||
@ConfigEntry(path = "cave.command.admin")
|
@ConfigEntry(path = "cave.command.admin")
|
||||||
private String adminCommand = "cbadmin cba";
|
private String adminCommand = "cbadmin cba";
|
||||||
|
|
||||||
/* WORLD */
|
/* WORLD */
|
||||||
@ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word")
|
@ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word")
|
||||||
@ -1546,7 +1545,7 @@ public class Settings implements WorldSettings
|
|||||||
@ConfigComment("Name of the world - if it does not exist then it will be generated.")
|
@ConfigComment("Name of the world - if it does not exist then it will be generated.")
|
||||||
@ConfigComment("It acts like a prefix for nether and end (e.g. CaveBlock-world, CaveBlock-world_nether, CaveBlock-world_end)")
|
@ConfigComment("It acts like a prefix for nether and end (e.g. CaveBlock-world, CaveBlock-world_nether, CaveBlock-world_end)")
|
||||||
@ConfigEntry(path = "world.world-name")
|
@ConfigEntry(path = "world.world-name")
|
||||||
private String worldName = "CaveBlock-world";
|
private String worldName = "caveblock-world";
|
||||||
|
|
||||||
@ConfigComment("World difficulty setting - PEACEFUL, EASY, NORMAL, HARD")
|
@ConfigComment("World difficulty setting - PEACEFUL, EASY, NORMAL, HARD")
|
||||||
@ConfigComment("Other plugins may override this setting")
|
@ConfigComment("Other plugins may override this setting")
|
||||||
|
@ -5,10 +5,10 @@ import java.util.List;
|
|||||||
|
|
||||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||||
import world.bentobox.bentobox.api.commands.admin.*;
|
import world.bentobox.bentobox.api.commands.admin.*;
|
||||||
|
import world.bentobox.bentobox.api.commands.admin.blueprints.AdminBlueprintCommand;
|
||||||
import world.bentobox.bentobox.api.commands.admin.deaths.AdminDeathsCommand;
|
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.range.AdminRangeCommand;
|
||||||
import world.bentobox.bentobox.api.commands.admin.resets.AdminResetsResetCommand;
|
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.AdminTeamAddCommand;
|
||||||
import world.bentobox.bentobox.api.commands.admin.team.AdminTeamDisbandCommand;
|
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.AdminTeamKickCommand;
|
||||||
@ -45,7 +45,7 @@ public class AdminCommand extends CompositeCommand {
|
|||||||
new AdminTeamDisbandCommand(this);
|
new AdminTeamDisbandCommand(this);
|
||||||
new AdminTeamSetownerCommand(this);
|
new AdminTeamSetownerCommand(this);
|
||||||
// Schems
|
// Schems
|
||||||
new AdminSchemCommand(this);
|
new AdminBlueprintCommand(this);
|
||||||
// Register/unregister islands
|
// Register/unregister islands
|
||||||
new AdminRegisterCommand(this);
|
new AdminRegisterCommand(this);
|
||||||
new AdminUnregisterCommand(this);
|
new AdminUnregisterCommand(this);
|
||||||
|
@ -93,7 +93,8 @@ public class MaterialPopulator extends BlockPopulator
|
|||||||
{
|
{
|
||||||
if (!block.getType().equals(entry.getKey()))
|
if (!block.getType().equals(entry.getKey()))
|
||||||
{
|
{
|
||||||
block.setType(entry.getKey());
|
// Set type without physics is required otherwise server goes into an infinite loop
|
||||||
|
block.setType(entry.getKey(), false);
|
||||||
packSize--;
|
packSize--;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +124,7 @@ public class MaterialPopulator extends BlockPopulator
|
|||||||
block = chunk.getBlock(x, y, z);
|
block = chunk.getBlock(x, y, z);
|
||||||
|
|
||||||
continuePlacing = packSize > 0 && (block.getType().equals(chances.mainMaterial) ||
|
continuePlacing = packSize > 0 && (block.getType().equals(chances.mainMaterial) ||
|
||||||
block.getType().equals(entry.getKey()));
|
block.getType().equals(entry.getKey()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ world:
|
|||||||
friendly-name: CaveBlock
|
friendly-name: CaveBlock
|
||||||
# Name of the world - if it does not exist then it will be generated.
|
# 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)
|
# It acts like a prefix for nether and end (e.g. CaveBlock-world, CaveBlock-world_nether, CaveBlock-world_end)
|
||||||
world-name: CaveBlock-world
|
world-name: caveblock-world
|
||||||
# World difficulty setting - PEACEFUL, EASY, NORMAL, HARD
|
# World difficulty setting - PEACEFUL, EASY, NORMAL, HARD
|
||||||
# Other plugins may override this setting
|
# Other plugins may override this setting
|
||||||
difficulty: NORMAL
|
difficulty: NORMAL
|
||||||
|
Loading…
Reference in New Issue
Block a user