Revert removal of InvalidWorldException (#5984)

Fixes API breakage for people who catch the exception.
This commit is contained in:
Josh Roy 2024-12-02 22:14:03 -05:00 committed by GitHub
parent d31ff5553e
commit bc8aa76690
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 40 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}