forked from EssentialsX/Essentials
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert removal of InvalidWorldException (EssentialsX#5984)
Fixes API breakage for people who catch the exception.
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
Essentials/src/main/java/com/earth2me/essentials/api/InvalidWorldException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
Essentials/src/main/java/net/ess3/api/InvalidWorldException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |