feat(world,modes): isolate parkour world, disable elytra and mark 1.4.0 as beta
This commit is contained in:
parent
bfae9f9bc5
commit
80dcd8e59b
17 changed files with 142 additions and 157 deletions
15
README.md
15
README.md
|
|
@ -4,10 +4,14 @@
|
|||
|
||||
Advanced infinitely generating parkour plugin with ghost system, leaderboards and multiple game modes.
|
||||
|
||||
> **BETA:** version 1.4.0 is a beta release. Generation, balance and game modes may still change.
|
||||
> Parkour runs only in its own configured world (`world.name`, default `loparkour`); elytra is disabled there.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
[English](#english) | [Русский](#russian)
|
||||
|
||||
|
|
@ -28,7 +32,7 @@ LoParkour is an advanced parkour plugin with infinite world generation. The cour
|
|||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| Infinite generation | Parkour generates endlessly as you play |
|
||||
| Multiple game modes | Default, Speedrun, Gravity Shift, Elytra |
|
||||
| Multiple game modes | Default, Speedrun, Gravity Shift, Race, Coop, Duels |
|
||||
| Ghost system | Race against top player recordings |
|
||||
| Custom schematics | Create and use your own parkour structures (.lpschem) |
|
||||
| Visual themes | Customize block styles and particle effects |
|
||||
|
|
@ -46,7 +50,9 @@ LoParkour is an advanced parkour plugin with infinite world generation. The cour
|
|||
| Default | Classic infinite parkour |
|
||||
| Speedrun | Blocks disappear after a few seconds |
|
||||
| Gravity Shift | Random gravity effects (levitation, slow falling, jump boost) |
|
||||
| Elytra | Fly through particle rings |
|
||||
| Race | First to the target score wins |
|
||||
| Coop | Shared session and score with friends |
|
||||
| Duels | One course per player, race to the goal |
|
||||
|
||||
### Commands
|
||||
|
||||
|
|
@ -82,12 +88,15 @@ LoParkour is an advanced parkour plugin with infinite world generation. The cour
|
|||
|
||||
LoParkour - продвинутый паркур-плагин с бесконечной генерацией мира. Трасса генерируется по мере игры, с несколькими режимами, системой призраков, кастомными схематиками, визуальными темами и MySQL лидербордами.
|
||||
|
||||
> **BETA:** версия 1.4.0 — бета. Генерация, баланс и режимы ещё могут меняться.
|
||||
> Паркур работает только в отдельном настроенном мире (`world.name`, по умолчанию `loparkour`); элитры в нём отключены.
|
||||
|
||||
### Возможности
|
||||
|
||||
| Возможность | Описание |
|
||||
|-------------|----------|
|
||||
| Бесконечная генерация | Паркур генерируется по мере игры |
|
||||
| Несколько режимов | Default, Speedrun, Gravity Shift, Elytra |
|
||||
| Несколько режимов | Default, Speedrun, Gravity Shift, Race, Coop, Duels |
|
||||
| Система призраков | Гонка против записей топ-игроков |
|
||||
| Кастомные схематики | Создавайте свои структуры (.lpschem) |
|
||||
| Визуальные темы | Настройка стилей блоков и частиц |
|
||||
|
|
|
|||
|
|
@ -11,15 +11,10 @@ import dev.loki.loparkour.duels.DuelsMode;
|
|||
import dev.loki.loparkour.ghost.service.GhostService;
|
||||
import dev.loki.loparkour.hook.holo.HoloHook;
|
||||
import dev.loki.loparkour.hook.papi.PAPIHook;
|
||||
import dev.loki.loparkour.listener.gameplay.ElytraRestrictionListener;
|
||||
import dev.loki.loparkour.listener.gameplay.ParkourRestrictionListener;
|
||||
import dev.loki.loparkour.listener.schematic.SchematicWandListener;
|
||||
import dev.loki.loparkour.listener.player.PlayerConnectionListener;
|
||||
import dev.loki.loparkour.elytra.close.CloseMode;
|
||||
import dev.loki.loparkour.elytra.core.ElytraMode;
|
||||
import dev.loki.loparkour.elytra.minspeed.MinSpeedMode;
|
||||
import dev.loki.loparkour.elytra.obstacle.ObstacleMode;
|
||||
import dev.loki.loparkour.elytra.speeddemon.SpeedDemonMode;
|
||||
import dev.loki.loparkour.elytra.timetrial.TimeTrialMode;
|
||||
import dev.loki.loparkour.mode.base.Modes;
|
||||
import dev.loki.loparkour.mode.impl.barrier.InvisibleBarrierMode;
|
||||
import dev.loki.loparkour.mode.impl.multi.CoopMode;
|
||||
|
|
@ -87,12 +82,6 @@ public final class PluginBootstrap {
|
|||
Registry.register(new InvisibleBarrierMode());
|
||||
Registry.register(new CoopMode());
|
||||
Registry.register(new GravityShiftMode());
|
||||
Registry.register(new ElytraMode());
|
||||
Registry.register(new SpeedDemonMode());
|
||||
Registry.register(new MinSpeedMode());
|
||||
Registry.register(new TimeTrialMode());
|
||||
Registry.register(new CloseMode());
|
||||
Registry.register(new ObstacleMode());
|
||||
Registry.register(new DuelsMode());
|
||||
Modes.init();
|
||||
}
|
||||
|
|
@ -134,6 +123,7 @@ public final class PluginBootstrap {
|
|||
final var pm = plugin.getServer().getPluginManager();
|
||||
pm.registerEvents(new PlayerConnectionListener(), plugin);
|
||||
pm.registerEvents(new ParkourRestrictionListener(), plugin);
|
||||
pm.registerEvents(new ElytraRestrictionListener(), plugin);
|
||||
pm.registerEvents(new SchematicWandListener(), plugin);
|
||||
final LoParkourCommand cmd = new LoParkourCommand();
|
||||
plugin.getCommand("LoParkour").setExecutor(cmd);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import dev.loki.loparkour.command.util.CommandUtil;
|
|||
import dev.loki.loparkour.config.locale.Locales;
|
||||
import dev.loki.loparkour.menu.core.screen.ParkourOption;
|
||||
import dev.loki.loparkour.mode.base.Mode;
|
||||
import dev.loki.loparkour.mode.base.ModeMessages;
|
||||
import dev.loki.loparkour.mode.base.Modes;
|
||||
import dev.loki.loparkour.mode.base.MultiMode;
|
||||
import dev.loki.loparkour.player.core.ParkourPlayer;
|
||||
|
|
@ -24,12 +25,16 @@ public class JoinCommandExecutor {
|
|||
if (!player.cooldown(sender, "join", COOLDOWN_MS) || !ParkourOption.JOIN.mayPerform(p)) {
|
||||
return;
|
||||
}
|
||||
final boolean alreadyPlaying = ParkourUser.getUser(p) != null;
|
||||
final Mode mode = Registry.getMode(arg);
|
||||
if (mode != null) {
|
||||
mode.create(p);
|
||||
} else {
|
||||
joinPlayingPlayer(arg, sender, p);
|
||||
}
|
||||
if (!alreadyPlaying && ParkourUser.getUser(p) != null) {
|
||||
ModeMessages.sendBetaWelcome(p);
|
||||
}
|
||||
}
|
||||
|
||||
private void joinPlayingPlayer(String arg, CommandSender sender, Player p) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import dev.loki.loparkour.config.core.Config;
|
|||
import dev.loki.loparkour.config.locale.Locales;
|
||||
import dev.loki.loparkour.menu.core.Menus;
|
||||
import dev.loki.loparkour.menu.core.screen.ParkourOption;
|
||||
import dev.loki.loparkour.mode.base.ModeMessages;
|
||||
import dev.loki.loparkour.mode.base.Modes;
|
||||
import dev.loki.loparkour.player.core.ParkourUser;
|
||||
import dev.loki.loparkour.util.text.ColorUtil;
|
||||
|
|
@ -97,6 +98,9 @@ public class PlayerCommandHandler {
|
|||
send(sender, Locales.getString(player, "other.no_do"));
|
||||
} else if (ParkourUser.getUser(player) == null) {
|
||||
Modes.defaultMode().create(player);
|
||||
if (ParkourUser.getUser(player) != null) {
|
||||
ModeMessages.sendBetaWelcome(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package dev.loki.loparkour.elytra.close;
|
|||
|
||||
import dev.loki.loparkour.elytra.core.ElytraGenerator;
|
||||
import dev.loki.loparkour.elytra.section.ElytraPointType;
|
||||
import dev.loki.loparkour.mode.base.Modes;
|
||||
import dev.loki.loparkour.session.core.Session;
|
||||
|
||||
/**
|
||||
|
|
@ -11,6 +10,6 @@ import dev.loki.loparkour.session.core.Session;
|
|||
public class CloseGenerator extends ElytraGenerator {
|
||||
|
||||
public CloseGenerator(Session session) {
|
||||
super(session, ElytraPointType.FLAT, Modes.close());
|
||||
super(session, ElytraPointType.FLAT, new CloseMode());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import dev.loki.loparkour.elytra.section.ElytraPointType;
|
|||
import dev.loki.loparkour.elytra.section.ElytraSection;
|
||||
import dev.loki.loparkour.generator.core.coordinator.ParkourGenerator;
|
||||
import dev.loki.loparkour.mode.base.Mode;
|
||||
import dev.loki.loparkour.mode.base.Modes;
|
||||
import dev.loki.loparkour.session.core.Session;
|
||||
import dev.loki.loparkour.util.item.Materials;
|
||||
import dev.loki.loparkour.util.misc.Compat;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
|
@ -38,7 +38,7 @@ public class ElytraGenerator extends ParkourGenerator {
|
|||
private final ElytraBoost boost = new ElytraBoost();
|
||||
|
||||
public ElytraGenerator(Session session) {
|
||||
this(session, ElytraPointType.CIRCLE, Modes.elytra());
|
||||
this(session, ElytraPointType.CIRCLE, new ElytraMode());
|
||||
}
|
||||
|
||||
protected ElytraGenerator(Session session, Mode mode) {
|
||||
|
|
@ -133,7 +133,7 @@ public class ElytraGenerator extends ParkourGenerator {
|
|||
boost.reset();
|
||||
if (regenerate) {
|
||||
if (player != null && playerSpawn != null) {
|
||||
player.teleport(playerSpawn.toLocation(player.getWorld()));
|
||||
Compat.teleport(player, playerSpawn.toLocation(player.getWorld()));
|
||||
player.setGliding(true);
|
||||
}
|
||||
generate();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package dev.loki.loparkour.elytra.minspeed;
|
|||
|
||||
import dev.loki.loparkour.config.core.Config;
|
||||
import dev.loki.loparkour.elytra.core.ElytraGenerator;
|
||||
import dev.loki.loparkour.mode.base.Modes;
|
||||
import dev.loki.loparkour.session.core.Session;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
|
@ -20,7 +19,7 @@ public class MinSpeedGenerator extends ElytraGenerator {
|
|||
private int ticksTooSlow = 0;
|
||||
|
||||
public MinSpeedGenerator(Session session) {
|
||||
super(session, Modes.minSpeed());
|
||||
super(session, new MinSpeedMode());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package dev.loki.loparkour.elytra.obstacle;
|
|||
import dev.loki.loparkour.elytra.core.ElytraGenerator;
|
||||
import dev.loki.loparkour.elytra.section.ElytraPointType;
|
||||
import dev.loki.loparkour.elytra.section.ElytraSection;
|
||||
import dev.loki.loparkour.mode.base.Modes;
|
||||
import dev.loki.loparkour.session.core.Session;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
|
@ -28,7 +27,7 @@ public class ObstacleGenerator extends ElytraGenerator {
|
|||
private final Map<Integer, List<Vector>> obstacles = new HashMap<>();
|
||||
|
||||
public ObstacleGenerator(Session session) {
|
||||
super(session, Modes.obstacle());
|
||||
super(session, new ObstacleMode());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package dev.loki.loparkour.elytra.speeddemon;
|
||||
|
||||
import dev.loki.loparkour.elytra.core.ElytraGenerator;
|
||||
import dev.loki.loparkour.mode.base.Modes;
|
||||
import dev.loki.loparkour.session.core.Session;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
|
@ -15,7 +14,7 @@ public class SpeedDemonGenerator extends ElytraGenerator {
|
|||
private double maxSpeed = 0;
|
||||
|
||||
public SpeedDemonGenerator(Session session) {
|
||||
super(session, Modes.speedDemon());
|
||||
super(session, new SpeedDemonMode());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package dev.loki.loparkour.elytra.timetrial;
|
|||
|
||||
import dev.loki.loparkour.config.core.Config;
|
||||
import dev.loki.loparkour.elytra.core.ElytraGenerator;
|
||||
import dev.loki.loparkour.mode.base.Modes;
|
||||
import dev.loki.loparkour.session.core.Session;
|
||||
|
||||
/**
|
||||
|
|
@ -13,7 +12,7 @@ public class TimeTrialGenerator extends ElytraGenerator {
|
|||
private static final int SCORE = Config.GENERATION.getInt("mode-settings.time-trial.score", 500);
|
||||
|
||||
public TimeTrialGenerator(Session session) {
|
||||
super(session, Modes.timeTrial());
|
||||
super(session, new TimeTrialMode());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
package dev.loki.loparkour.listener.gameplay;
|
||||
|
||||
import dev.loki.loparkour.config.locale.Locales;
|
||||
import dev.loki.loparkour.world.core.World;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityToggleGlideEvent;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Blocks wearing, using and gliding with an elytra inside the parkour world.
|
||||
*
|
||||
* <p>The elytra game modes are no longer registered; this listener is the
|
||||
* defence-in-depth guard for players who bring their own elytra.</p>
|
||||
*/
|
||||
public class ElytraRestrictionListener implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onInteract(@NotNull PlayerInteractEvent event) {
|
||||
final Player player = event.getPlayer();
|
||||
if (isInParkourWorld(player) && isElytra(event.getItem())) {
|
||||
event.setCancelled(true);
|
||||
Locales.send(player, "other.elytra_blocked");
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
public void onInventoryClick(@NotNull InventoryClickEvent event) {
|
||||
if (!(event.getWhoClicked() instanceof Player player) || !isInParkourWorld(player)) {
|
||||
return;
|
||||
}
|
||||
if (isElytra(event.getCurrentItem()) || isElytra(event.getCursor())) {
|
||||
event.setCancelled(true);
|
||||
Locales.send(player, "other.elytra_blocked");
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onGlide(@NotNull EntityToggleGlideEvent event) {
|
||||
if (event.isGliding() && event.getEntity() instanceof Player player && isInParkourWorld(player)) {
|
||||
event.setCancelled(true);
|
||||
Locales.send(player, "other.elytra_blocked");
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isInParkourWorld(@NotNull Player player) {
|
||||
final org.bukkit.World parkour = World.getWorld();
|
||||
return parkour != null && parkour.equals(player.getWorld());
|
||||
}
|
||||
|
||||
private boolean isElytra(ItemStack item) {
|
||||
return item != null && item.getType() == Material.ELYTRA;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
package dev.loki.loparkour.mode.base;
|
||||
|
||||
import dev.loki.loparkour.LoParkour;
|
||||
import dev.loki.loparkour.config.core.Config;
|
||||
import dev.loki.loparkour.config.locale.Locales;
|
||||
import dev.loki.loparkour.world.core.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
|
@ -14,13 +16,37 @@ public final class ModeMessages {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return true if joining is allowed; otherwise sends {@code other.joining_disabled} and returns false
|
||||
* Checks whether a new parkour session may be started.
|
||||
*
|
||||
* <p>Besides the {@code joining} switch this verifies that the configured
|
||||
* parkour world is actually loaded. Without it a session would be built with
|
||||
* null world locations and generation could leak into the player's world.</p>
|
||||
*
|
||||
* @return true if joining is allowed; otherwise sends the matching locale
|
||||
* message, logs the missing world in English and returns false
|
||||
*/
|
||||
public static boolean checkJoiningEnabled(@NotNull Player player) {
|
||||
if (Config.CONFIG.getBoolean("joining")) {
|
||||
return true;
|
||||
if (!Config.CONFIG.getBoolean("joining")) {
|
||||
Locales.send(player, "other.joining_disabled");
|
||||
return false;
|
||||
}
|
||||
Locales.send(player, "other.joining_disabled");
|
||||
return false;
|
||||
if (World.getWorld() == null) {
|
||||
LoParkour.getPlugin().getLogger().severe(
|
||||
"Parkour world '" + World.getName() + "' is not loaded. "
|
||||
+ "Set world.name to an existing world or let LoParkour create it; "
|
||||
+ "joining is disabled until the world is available.");
|
||||
Locales.send(player, "other.world_unavailable", World.getName());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the short beta notice shown after a successful join.
|
||||
*
|
||||
* @param player the player who just joined
|
||||
*/
|
||||
public static void sendBetaWelcome(@NotNull Player player) {
|
||||
Locales.send(player, "other.beta_welcome");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,6 @@ package dev.loki.loparkour.mode.base;
|
|||
|
||||
import dev.loki.loparkour.api.core.Registry;
|
||||
import dev.loki.loparkour.duels.DuelsMode;
|
||||
import dev.loki.loparkour.elytra.close.CloseMode;
|
||||
import dev.loki.loparkour.elytra.core.ElytraMode;
|
||||
import dev.loki.loparkour.elytra.minspeed.MinSpeedMode;
|
||||
import dev.loki.loparkour.elytra.obstacle.ObstacleMode;
|
||||
import dev.loki.loparkour.elytra.speeddemon.SpeedDemonMode;
|
||||
import dev.loki.loparkour.elytra.timetrial.TimeTrialMode;
|
||||
import dev.loki.loparkour.mode.impl.barrier.InvisibleBarrierMode;
|
||||
import dev.loki.loparkour.mode.impl.multi.CoopMode;
|
||||
import dev.loki.loparkour.mode.impl.multi.RaceMode;
|
||||
|
|
@ -28,12 +22,6 @@ public final class Modes {
|
|||
private static RaceMode race;
|
||||
private static CoopMode coop;
|
||||
private static GravityShiftMode gravityShift;
|
||||
private static ElytraMode elytra;
|
||||
private static SpeedDemonMode speedDemon;
|
||||
private static MinSpeedMode minSpeed;
|
||||
private static TimeTrialMode timeTrial;
|
||||
private static CloseMode close;
|
||||
private static ObstacleMode obstacle;
|
||||
private static DuelsMode duels;
|
||||
|
||||
public static void init() {
|
||||
|
|
@ -44,12 +32,6 @@ public final class Modes {
|
|||
race = (RaceMode) Registry.getMode("race");
|
||||
coop = (CoopMode) Registry.getMode("coop");
|
||||
gravityShift = (GravityShiftMode) Registry.getMode("gravity-shift");
|
||||
elytra = (ElytraMode) Registry.getMode("elytra");
|
||||
speedDemon = (SpeedDemonMode) Registry.getMode("speeddemon");
|
||||
minSpeed = (MinSpeedMode) Registry.getMode("minspeed");
|
||||
timeTrial = (TimeTrialMode) Registry.getMode("timetrial");
|
||||
close = (CloseMode) Registry.getMode("close");
|
||||
obstacle = (ObstacleMode) Registry.getMode("obstacle");
|
||||
duels = (DuelsMode) Registry.getMode("duels");
|
||||
}
|
||||
|
||||
|
|
@ -81,30 +63,6 @@ public final class Modes {
|
|||
return gravityShift;
|
||||
}
|
||||
|
||||
public static ElytraMode elytra() {
|
||||
return elytra;
|
||||
}
|
||||
|
||||
public static SpeedDemonMode speedDemon() {
|
||||
return speedDemon;
|
||||
}
|
||||
|
||||
public static MinSpeedMode minSpeed() {
|
||||
return minSpeed;
|
||||
}
|
||||
|
||||
public static TimeTrialMode timeTrial() {
|
||||
return timeTrial;
|
||||
}
|
||||
|
||||
public static CloseMode close() {
|
||||
return close;
|
||||
}
|
||||
|
||||
public static ObstacleMode obstacle() {
|
||||
return obstacle;
|
||||
}
|
||||
|
||||
public static DuelsMode duels() {
|
||||
return duels;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,7 @@ public final class World {
|
|||
private static String name;
|
||||
private static org.bukkit.World world;
|
||||
|
||||
/**
|
||||
* Creates a new world and sets all according settings in it.
|
||||
*/
|
||||
/** Creates the parkour world and applies all world settings to it. */
|
||||
public static void create() {
|
||||
name = Config.CONFIG.getString("world.name");
|
||||
if (!isValidWorldFolderName(name)) {
|
||||
|
|
@ -43,6 +41,14 @@ public final class World {
|
|||
if (Config.CONFIG.getBoolean("joining")) {
|
||||
createOrReuse(existingWorld);
|
||||
}
|
||||
|
||||
if (world == null) {
|
||||
LoParkour.getPlugin().getLogger().severe(
|
||||
"Parkour world '" + name + "' is not available. LoParkour only generates parkour "
|
||||
+ "in its own world: set 'world.name' to a valid world or pre-create it "
|
||||
+ "(and set 'world.delete-on-reload: false'), then restart. Joining is disabled "
|
||||
+ "until the world exists.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void createOrReuse(org.bukkit.World existingWorld) {
|
||||
|
|
@ -110,9 +116,7 @@ public final class World {
|
|||
world.setAutoSave(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the world.
|
||||
*/
|
||||
/** Deletes the parkour world when configured to. */
|
||||
public static void delete() {
|
||||
if (!Config.CONFIG.getBoolean("world.delete-on-reload") || !Config.CONFIG.getBoolean("joining")) {
|
||||
return;
|
||||
|
|
@ -164,9 +168,7 @@ public final class World {
|
|||
return new File(Bukkit.getWorldContainer(), name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevents path traversal and accidental deletion outside the server world container.
|
||||
*/
|
||||
/** Prevents path traversal and deletion outside the server world container. */
|
||||
public static boolean isValidWorldFolderName(String n) {
|
||||
if (n == null || n.isBlank() || n.length() > MAX_WORLD_NAME_LENGTH) {
|
||||
return false;
|
||||
|
|
@ -184,16 +186,12 @@ public final class World {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the name of the parkour world.
|
||||
*/
|
||||
/** @return the configured name of the parkour world. */
|
||||
public static String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Bukkit world wherein LoParkour is currently active.
|
||||
*/
|
||||
/** @return the loaded parkour world, or null when it is unavailable. */
|
||||
public static org.bukkit.World getWorld() {
|
||||
return world;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,39 +45,6 @@ play:
|
|||
name: "&#FF44FF&lInvisible Barrier"
|
||||
lore: "񢩈Invisible blocks with||񢩈colorful particle outlines"
|
||||
|
||||
elytra:
|
||||
name: "&#FFFFFFElytra"
|
||||
|
||||
elytra:
|
||||
material: "elytra"
|
||||
name: "�D4FF&lElytra"
|
||||
lore: "񢩈Fly through rings||񢩈on your elytra."
|
||||
|
||||
speeddemon:
|
||||
material: "elytra"
|
||||
name: "�D4FF&lSpeed Demon"
|
||||
lore: "񢩈Reach the highest speed||񢩈possible on your elytra."
|
||||
|
||||
minspeed:
|
||||
material: "elytra"
|
||||
name: "�D4FF&lMin Speed"
|
||||
lore: "񢩈Keep above the minimum speed||񢩈to fly as far as possible."
|
||||
|
||||
timetrial:
|
||||
material: "elytra"
|
||||
name: "�D4FF&lTime Trial"
|
||||
lore: "񢩈Reach the target score||񢩈as fast as you can."
|
||||
|
||||
close:
|
||||
material: "elytra"
|
||||
name: "�D4FF&lClose"
|
||||
lore: "񢩈Fly through flat rings||񢩈placed close together."
|
||||
|
||||
obstacle:
|
||||
material: "barrier"
|
||||
name: "�D4FF&lObstacle"
|
||||
lore: "񢩈Fly around the obstacles||񢩈spawned on your course."
|
||||
|
||||
spectator:
|
||||
name: "&#FFFFFFSpectator"
|
||||
|
||||
|
|
@ -321,6 +288,9 @@ other:
|
|||
no_menu_items: "&#FF4444&lNo menu items are available for you right now."
|
||||
joining_disabled: "&#FF4444&lJoining is currently disabled."
|
||||
no_teleporting: "&#FFFFFFYou can't enter the parkour world by teleporting!"
|
||||
world_unavailable: "&#FF4444&lParkour world \"%s\" is not available. Ask an admin to check world.name."
|
||||
elytra_blocked: "&#FF4444&lElytra is disabled in the parkour world."
|
||||
beta_welcome: "&#FFD700&lBETA &#A0A0A0LoParkour is in beta: courses and modes may still change. Have fun!"
|
||||
customize: "&#A0A0A0Customize your parkour experience by using \"/parkour\""
|
||||
leave_error: "&#FF4444&lThere was an error while trying to leave."
|
||||
bungee_kick: "Couldn't move you to %s. Please rejoin."
|
||||
|
|
|
|||
|
|
@ -44,39 +44,6 @@ play:
|
|||
name: "&#FF44FF&lНевидимый барьер"
|
||||
lore: "񢩈Невидимые блоки с||񢩈цветными контурами из частиц"
|
||||
|
||||
elytra:
|
||||
name: "&#FFFFFFЭлитры"
|
||||
|
||||
elytra:
|
||||
material: "elytra"
|
||||
name: "�D4FF&lЭлитры"
|
||||
lore: "񢩈Летай сквозь кольца||񢩈на элитрах."
|
||||
|
||||
speeddemon:
|
||||
material: "elytra"
|
||||
name: "�D4FF&lСкорость-демон"
|
||||
lore: "񢩈Разгонись до максимальной||񢩈скорости на элитрах."
|
||||
|
||||
minspeed:
|
||||
material: "elytra"
|
||||
name: "�D4FF&lМин. скорость"
|
||||
lore: "񢩈Держи минимальную скорость||񢩈и лети как можно дальше."
|
||||
|
||||
timetrial:
|
||||
material: "elytra"
|
||||
name: "�D4FF&lГонка на время"
|
||||
lore: "񢩈Достигни целевого счёта||񢩈как можно быстрее."
|
||||
|
||||
close:
|
||||
material: "elytra"
|
||||
name: "�D4FF&lБлизко"
|
||||
lore: "񢩈Летай сквозь плоские кольца||񢩈расположенные вплотную."
|
||||
|
||||
obstacle:
|
||||
material: "barrier"
|
||||
name: "�D4FF&lПрепятствия"
|
||||
lore: "񢩈Облетай препятствия,||񢩈появляющиеся на трассе."
|
||||
|
||||
spectator:
|
||||
name: "&#FFFFFFНаблюдатель"
|
||||
|
||||
|
|
@ -320,6 +287,9 @@ other:
|
|||
no_menu_items: "&#FF4444&lСейчас нет доступных пунктов меню."
|
||||
joining_disabled: "&#FF4444&lПрисоединение временно отключено."
|
||||
no_teleporting: "&#FFFFFFВы не можете войти в мир паркура телепортацией!"
|
||||
world_unavailable: "&#FF4444&lМир паркура \"%s\" недоступен. Попросите админа проверить world.name."
|
||||
elytra_blocked: "&#FF4444&lЭлитры отключены в мире паркура."
|
||||
beta_welcome: "&#FFD700&lBETA &#A0A0A0LoParkour в бете: трассы и режимы ещё могут меняться. Приятной игры!"
|
||||
customize: "&#A0A0A0Настройте свой паркур, используя \"/parkour\""
|
||||
leave_error: "&#FF4444&lОшибка при выходе из паркура."
|
||||
bungee_kick: "Не удалось перенести вас на %s. Перезайдите."
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
name: 'LoParkour'
|
||||
description: 'Advanced infinitely generating parkour plugin.'
|
||||
description: 'BETA - Advanced infinitely generating parkour plugin.'
|
||||
author: loki
|
||||
version: ${version}
|
||||
api-version: ${apiVersion}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue