Edge erkennung um prefix + erweitert
This commit is contained in:
@ -30,7 +30,6 @@ public class dice extends ListenerAdapter {
|
|||||||
|
|
||||||
private language activLang;
|
private language activLang;
|
||||||
|
|
||||||
|
|
||||||
private Map<String, String> channelList = new HashMap<>();
|
private Map<String, String> channelList = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
@ -163,10 +162,20 @@ public class dice extends ListenerAdapter {
|
|||||||
boolean edge = false;
|
boolean edge = false;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(event.getMessage().getContentRaw().startsWith(this.prefixSr+"+")) {
|
// Prüfen ob Edge wurf
|
||||||
|
if(event.getMessage().getContentRaw().startsWith(this.prefixSr+"+") || event.getMessage().getContentRaw().startsWith(this.prefixSr+" +")) {
|
||||||
edge = true;
|
edge = true;
|
||||||
}
|
}
|
||||||
String[] MsgParts = event.getMessage().getContentRaw().split(" ", 2);
|
|
||||||
|
// korrikiert Edge eingabe von /sr + zu /sr+
|
||||||
|
String ContentRaw = event.getMessage().getContentRaw();
|
||||||
|
if(event.getMessage().getContentRaw().startsWith(this.prefixSr+" +")) {
|
||||||
|
ContentRaw = ContentRaw.replace(this.prefixSr+" +", this.prefixSr+"+ ").replace(" ", " ");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prüfen ob Leerer Command gesendet wird
|
||||||
|
String[] MsgParts = ContentRaw.split(" ", 2);
|
||||||
|
|
||||||
if(MsgParts.length < 2) {
|
if(MsgParts.length < 2) {
|
||||||
String message = activLang.emptyCommand;
|
String message = activLang.emptyCommand;
|
||||||
message = message.replace("%command%", this.prefixSr);
|
message = message.replace("%command%", this.prefixSr);
|
||||||
|
|||||||
Reference in New Issue
Block a user