mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 10:15:52 +01:00
Update error messages
This commit is contained in:
parent
ed1b45fccb
commit
86fbb2c2b6
10
README.md
10
README.md
@ -1,5 +1,7 @@
|
||||
![https://s3.postimg.cc/dikyxlz5v/Sub_Banner.png](https://s3.postimg.cc/dikyxlz5v/Sub_Banner.png)<br>
|
||||
SubServers 2 is a rewrite of SubServers, the Server Management Platform. [![Build Status](https://src.me1312.net/jenkins/job/SubServers%20Platform/badge/icon)](https://src.me1312.net/jenkins/job/SubServers%20Platform/)<br>
|
||||
# ![https://s3.postimg.cc/dikyxlz5v/Sub_Banner.png](https://s3.postimg.cc/dikyxlz5v/Sub_Banner.png)
|
||||
[![Build Status](https://src.me1312.net/jenkins/job/SubServers%20Platform/badge/icon)](https://src.me1312.net/jenkins/job/SubServers%20Platform/)
|
||||
[![Release Verison](https://img.shields.io/github/release/ME1312/SubServers-2/all.svg)](https://github.com/ME1312/SubServers-2/releases) [![Snapshot Verison](https://img.shields.io/badge/dynamic/xml.svg?label=snapshot&url=https%3A%2F%2Fsrc.me1312.net%2Fmaven%2Fnet%2FME1312%2FSubServers%2FSubServers.Bungee%2Fmaven-metadata.xml&query=%2F%2Fversioning%2Frelease&colorB=blue)](https://src.me1312.net/jenkins/job/SubServers%20Platform/)<br><br>
|
||||
SubServers 2 is a rewrite of SubServers, the Server Management Platform.<br>
|
||||
> [https://www.spigotmc.org/resources/subservers-bungee.11264/](https://www.spigotmc.org/resources/subservers-bungee.11264/)<br>
|
||||
> [https://www.spigotmc.org/resources/subservers-host.38833/](https://www.spigotmc.org/resources/subservers-host.38833/)<br>
|
||||
> [https://www.spigotmc.org/resources/subservers-sync.46124/](https://www.spigotmc.org/resources/subservers-sync.46124/)<br>
|
||||
@ -10,10 +12,10 @@ SubServers 2 is a rewrite of SubServers, the Server Management Platform.
|
||||
These are some quick links for common resources of SubServers 2.
|
||||
|
||||
### How to Install
|
||||
[https://github.com/ME1312/SubServers-2/wiki/Install](https://github.com/ME1312/SubServers-2/wiki/Install)
|
||||
> [https://github.com/ME1312/SubServers-2/wiki/Install](https://github.com/ME1312/SubServers-2/wiki/Install)
|
||||
|
||||
### Snapshot Downloads
|
||||
[https://src.me1312.net/jenkins/job/SubServers Platform](https://src.me1312.net/jenkins/job/SubServers%20Platform)
|
||||
> [https://src.me1312.net/jenkins/job/SubServers Platform](https://src.me1312.net/jenkins/job/SubServers%20Platform)
|
||||
|
||||
### Javadocs for Developers
|
||||
> [https://src.me1312.net/jenkins/job/SubServers Platform/javadoc/SubServers.Bungee/](https://src.me1312.net/jenkins/job/SubServers%20Platform/javadoc/SubServers.Bungee/)<br>
|
||||
|
@ -11,6 +11,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@ -33,10 +34,10 @@ public final class SubCommand implements CommandExecutor {
|
||||
label = "/" + label;
|
||||
if (plugin.subdata == null) {
|
||||
new IllegalStateException("SubData is not connected").printStackTrace();
|
||||
return false;
|
||||
if (!(sender instanceof ConsoleCommandSender)) sender.sendMessage(ChatColor.RED + "An exception has occurred while running this command");
|
||||
} else if (plugin.lang == null) {
|
||||
new IllegalStateException("There are no lang options available at this time").printStackTrace();
|
||||
return false;
|
||||
if (!(sender instanceof ConsoleCommandSender)) sender.sendMessage(ChatColor.RED + "An exception has occurred while running this command");
|
||||
} else {
|
||||
if (sender.hasPermission("subservers.command")) {
|
||||
if (args.length > 0) {
|
||||
@ -460,8 +461,8 @@ public final class SubCommand implements CommandExecutor {
|
||||
} else {
|
||||
sender.sendMessage(plugin.api.getLang("SubServers", "Command.Generic.Invalid-Permission").replace("$str$", "subservers.command"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private String[] printHelp(String label) {
|
||||
|
@ -7,13 +7,13 @@ website: 'https://github.com/ME1312/SubServers-2'
|
||||
commands:
|
||||
subservers:
|
||||
description: 'The SubServers Command'
|
||||
usage: 'An exception may have occurred while running this command'
|
||||
usage: '/subservers help'
|
||||
subserver:
|
||||
description: 'The SubServers Command'
|
||||
usage: 'An exception may have occurred while running this command'
|
||||
usage: '/subserver help'
|
||||
sub:
|
||||
description: 'The SubServers Command'
|
||||
usage: 'An exception may have occurred while running this command'
|
||||
usage: '/sub help'
|
||||
permissions:
|
||||
subservers.*:
|
||||
description: 'Grants Access to to Everything in SubServers.Client'
|
||||
|
@ -100,13 +100,11 @@ public final class SubCommand implements CommandExecutor {
|
||||
.build();
|
||||
}
|
||||
|
||||
private boolean canRun(CommandSource sender) {
|
||||
private boolean canRun(CommandSource sender) throws CommandException {
|
||||
if (plugin.subdata == null) {
|
||||
new IllegalStateException("SubData is not connected").printStackTrace();
|
||||
return false;
|
||||
throw new CommandException(Text.builder("An exception has occurred while running this command").color(TextColors.RED).build(), new IllegalStateException("SubData is not connected"), false);
|
||||
} else if (plugin.lang == null) {
|
||||
new IllegalStateException("There are no lang options available at this time").printStackTrace();
|
||||
return false;
|
||||
throw new CommandException(Text.builder("An exception has occurred while running this command").color(TextColors.RED).build(), new IllegalStateException("There are no lang options available at this time"), false);
|
||||
} else {
|
||||
return sender.hasPermission("subservers.command");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user