Skip to content

Commit bc8aa76

Browse files
authored
Revert removal of InvalidWorldException (#5984)
Fixes API breakage for people who catch the exception.
1 parent d31ff55 commit bc8aa76

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.earth2me.essentials.api;
2+
3+
import net.ess3.api.TranslatableException;
4+
5+
/**
6+
* @deprecated This exception is unused. Use {@link net.ess3.api.InvalidWorldException} instead.
7+
*/
8+
@Deprecated
9+
public class InvalidWorldException extends TranslatableException {
10+
private final String world;
11+
12+
public InvalidWorldException(final String world) {
13+
super("invalidWorld");
14+
this.world = world;
15+
}
16+
17+
public String getWorld() {
18+
return this.world;
19+
}
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package net.ess3.api;
2+
/**
3+
* Fired when trying to teleport a user to an invalid world. This usually only occurs if a world has been removed from
4+
* the server and a player tries to teleport to a warp or home in that world.
5+
*
6+
* @deprecated no longer thrown.
7+
*/
8+
@Deprecated
9+
public class InvalidWorldException extends TranslatableException {
10+
private final String world;
11+
12+
public InvalidWorldException(final String world) {
13+
super("invalidWorld");
14+
this.world = world;
15+
}
16+
17+
public String getWorld() {
18+
return this.world;
19+
}
20+
}

0 commit comments

Comments
 (0)