From bc8aa766903b7016427f3444720b1e1394c3dc77 Mon Sep 17 00:00:00 2001 From: Josh Roy <10731363+JRoy@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:14:03 -0500 Subject: [PATCH] Revert removal of InvalidWorldException (#5984) Fixes API breakage for people who catch the exception. --- .../essentials/api/InvalidWorldException.java | 20 +++++++++++++++++++ .../net/ess3/api/InvalidWorldException.java | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 Essentials/src/main/java/com/earth2me/essentials/api/InvalidWorldException.java create mode 100644 Essentials/src/main/java/net/ess3/api/InvalidWorldException.java diff --git a/Essentials/src/main/java/com/earth2me/essentials/api/InvalidWorldException.java b/Essentials/src/main/java/com/earth2me/essentials/api/InvalidWorldException.java new file mode 100644 index 00000000000..670d229cc5f --- /dev/null +++ b/Essentials/src/main/java/com/earth2me/essentials/api/InvalidWorldException.java @@ -0,0 +1,20 @@ +package com.earth2me.essentials.api; + +import net.ess3.api.TranslatableException; + +/** + * @deprecated This exception is unused. Use {@link net.ess3.api.InvalidWorldException} instead. + */ +@Deprecated +public class InvalidWorldException extends TranslatableException { + private final String world; + + public InvalidWorldException(final String world) { + super("invalidWorld"); + this.world = world; + } + + public String getWorld() { + return this.world; + } +} diff --git a/Essentials/src/main/java/net/ess3/api/InvalidWorldException.java b/Essentials/src/main/java/net/ess3/api/InvalidWorldException.java new file mode 100644 index 00000000000..8490ecbb76c --- /dev/null +++ b/Essentials/src/main/java/net/ess3/api/InvalidWorldException.java @@ -0,0 +1,20 @@ +package net.ess3.api; +/** + * Fired when trying to teleport a user to an invalid world. This usually only occurs if a world has been removed from + * the server and a player tries to teleport to a warp or home in that world. + * + * @deprecated no longer thrown. + */ +@Deprecated +public class InvalidWorldException extends TranslatableException { + private final String world; + + public InvalidWorldException(final String world) { + super("invalidWorld"); + this.world = world; + } + + public String getWorld() { + return this.world; + } +}