mirror of
https://github.com/Ne0nx3r0/BetterAlias.git
synced 2024-11-12 10:24:28 +01:00
Minor bug fix with aliases that have no spaces
This commit is contained in:
parent
cca2b4cd63
commit
8c0b3ae954
@ -1,8 +1,8 @@
|
||||
package com.ne0nx3r0.betteralias;
|
||||
|
||||
import com.ne0nx3r0.betteralias.alias.AliasManager;
|
||||
import com.ne0nx3r0.betteralias.listener.BetterAliasCommandListener;
|
||||
import com.ne0nx3r0.betteralias.command.BetterAliasCommandExecutor;
|
||||
import com.ne0nx3r0.betteralias.listener.BetterAliasCommandListener;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class BetterAlias extends JavaPlugin
|
||||
|
@ -87,20 +87,24 @@ public class AliasManager
|
||||
|
||||
for(String sArgLine : sArgLines)
|
||||
{
|
||||
String sType = sArgLine.substring(0,sArgLine.indexOf(" "));
|
||||
AliasCommandTypes type = AliasCommandTypes.PLAYER;
|
||||
|
||||
if(sType.equalsIgnoreCase("console"))
|
||||
|
||||
if(sArgLine.contains(" "))
|
||||
{
|
||||
type = AliasCommandTypes.CONSOLE;
|
||||
|
||||
sArgLine = sArgLine.substring(sArgLine.indexOf(" ")+1);
|
||||
}
|
||||
else if(sType.equalsIgnoreCase("reply"))
|
||||
{
|
||||
type = AliasCommandTypes.REPLY_MESSAGE;
|
||||
|
||||
sArgLine = sArgLine.substring(sArgLine.indexOf(" ")+1);
|
||||
String sType = sArgLine.substring(0,sArgLine.indexOf(" "));
|
||||
|
||||
if(sType.equalsIgnoreCase("console"))
|
||||
{
|
||||
type = AliasCommandTypes.CONSOLE;
|
||||
|
||||
sArgLine = sArgLine.substring(sArgLine.indexOf(" ")+1);
|
||||
}
|
||||
else if(sType.equalsIgnoreCase("reply"))
|
||||
{
|
||||
type = AliasCommandTypes.REPLY_MESSAGE;
|
||||
|
||||
sArgLine = sArgLine.substring(sArgLine.indexOf(" ")+1);
|
||||
}
|
||||
}
|
||||
|
||||
sArgLine = this.replaceColorCodes(sArgLine);
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: BetterAlias
|
||||
main: com.ne0nx3r0.betteralias.BetterAlias
|
||||
version: '1.0'
|
||||
version: '1.0.1'
|
||||
database: false
|
||||
description: Command alias system
|
||||
commands:
|
||||
|
Loading…
Reference in New Issue
Block a user