mirror of
https://github.com/Ne0nx3r0/BetterAlias.git
synced 2025-01-23 21:51:19 +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;
|
package com.ne0nx3r0.betteralias;
|
||||||
|
|
||||||
import com.ne0nx3r0.betteralias.alias.AliasManager;
|
import com.ne0nx3r0.betteralias.alias.AliasManager;
|
||||||
import com.ne0nx3r0.betteralias.listener.BetterAliasCommandListener;
|
|
||||||
import com.ne0nx3r0.betteralias.command.BetterAliasCommandExecutor;
|
import com.ne0nx3r0.betteralias.command.BetterAliasCommandExecutor;
|
||||||
|
import com.ne0nx3r0.betteralias.listener.BetterAliasCommandListener;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
public class BetterAlias extends JavaPlugin
|
public class BetterAlias extends JavaPlugin
|
||||||
|
@ -87,20 +87,24 @@ public class AliasManager
|
|||||||
|
|
||||||
for(String sArgLine : sArgLines)
|
for(String sArgLine : sArgLines)
|
||||||
{
|
{
|
||||||
String sType = sArgLine.substring(0,sArgLine.indexOf(" "));
|
|
||||||
AliasCommandTypes type = AliasCommandTypes.PLAYER;
|
AliasCommandTypes type = AliasCommandTypes.PLAYER;
|
||||||
|
|
||||||
if(sType.equalsIgnoreCase("console"))
|
if(sArgLine.contains(" "))
|
||||||
{
|
{
|
||||||
type = AliasCommandTypes.CONSOLE;
|
String sType = sArgLine.substring(0,sArgLine.indexOf(" "));
|
||||||
|
|
||||||
sArgLine = sArgLine.substring(sArgLine.indexOf(" ")+1);
|
if(sType.equalsIgnoreCase("console"))
|
||||||
}
|
{
|
||||||
else if(sType.equalsIgnoreCase("reply"))
|
type = AliasCommandTypes.CONSOLE;
|
||||||
{
|
|
||||||
type = AliasCommandTypes.REPLY_MESSAGE;
|
sArgLine = sArgLine.substring(sArgLine.indexOf(" ")+1);
|
||||||
|
}
|
||||||
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);
|
sArgLine = this.replaceColorCodes(sArgLine);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: BetterAlias
|
name: BetterAlias
|
||||||
main: com.ne0nx3r0.betteralias.BetterAlias
|
main: com.ne0nx3r0.betteralias.BetterAlias
|
||||||
version: '1.0'
|
version: '1.0.1'
|
||||||
database: false
|
database: false
|
||||||
description: Command alias system
|
description: Command alias system
|
||||||
commands:
|
commands:
|
||||||
|
Loading…
Reference in New Issue
Block a user