Merge pull request 'Add error message for user when executing command' (#179) from CommandFrameworkErrors into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #179 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
62660d136b
@ -17,6 +17,8 @@
|
|||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
COMMAND_SYSTEM_ERROR = §cFehler beim Ausführen des Befehls!
|
||||||
|
|
||||||
SWLISINV_NEXT_PAGE_ACTIVE = §eSeite vor
|
SWLISINV_NEXT_PAGE_ACTIVE = §eSeite vor
|
||||||
SWLISINV_NEXT_PAGE_INACTIVE = §7Seite vor
|
SWLISINV_NEXT_PAGE_INACTIVE = §7Seite vor
|
||||||
SWLISINV_PREVIOUS_PAGE_ACTIVE = §eSeite zurück
|
SWLISINV_PREVIOUS_PAGE_ACTIVE = §eSeite zurück
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.command;
|
package de.steamwar.command;
|
||||||
|
|
||||||
|
import de.steamwar.core.Core;
|
||||||
import de.steamwar.message.Message;
|
import de.steamwar.message.Message;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
@ -104,6 +105,7 @@ public abstract class SWCommand {
|
|||||||
} catch (CommandFrameworkException e) {
|
} catch (CommandFrameworkException e) {
|
||||||
if (Bukkit.getServer() != null) {
|
if (Bukkit.getServer() != null) {
|
||||||
Bukkit.getLogger().log(Level.SEVERE, "", e);
|
Bukkit.getLogger().log(Level.SEVERE, "", e);
|
||||||
|
Core.MESSAGE.send("COMMAND_SYSTEM_ERROR", sender);
|
||||||
}
|
}
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren