Buggy code:
public class ShopCommand implements CommandExecutor { eTokens plugin ; File shopsFolder ; public ShopCommand ( eTokens t ) { } @ Override public boolean onCommand ( CommandSender sender , Command cmd , String label , String [ ] args ) { if ( ! ( sender instanceof Player ) ) { sender . sendMessage ( ( ( ChatColor . RED ) + "Sorry,<seq2seq4repair_space>only<seq2seq4repair_space>players<seq2seq4repair_space>can<seq2seq4repair_space>open<seq2seq4repair_space>shops!" ) ) ; return true ; } if ( ( args . length ) == 0 ) { sendHelp ( sender ) ; return true ; } if ( args [ 0 ] . equals ( "help" ) ) { sendHelp ( sender ) ; return true ; } if ( ( ( args [ 0 ] . equalsIgnoreCase ( "create" ) ) || ( args [ 0 ] . equalsIgnoreCase ( "add" ) ) ) || ( args [ 0 ] . equalsIgnoreCase ( "command" ) ) ) { if ( ! ( sender . hasPermission ( "etokens.shop.create" ) ) ) { sender . sendMessage ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>don't<seq2seq4repair_space>have<seq2seq4repair_space>permission<seq2seq4repair_space>to<seq2seq4repair_space>execute<seq2seq4repair_space>this<seq2seq4repair_space>command<seq2seq4repair_space>:(" ) ) ; return true ; } if ( ( ( args . length ) == 2 ) && ( args [ 0 ] . equalsIgnoreCase ( "create" ) ) ) { try { createShopFile ( args [ 1 ] ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } sender . sendMessage ( ( ( ( ( ChatColor . GREEN ) + "Created<seq2seq4repair_space>the<seq2seq4repair_space>shop<seq2seq4repair_space>'" ) + ( args [ 1 ] ) ) + "\'\nTo<seq2seq4repair_space>add<seq2seq4repair_space>items<seq2seq4repair_space>to<seq2seq4repair_space>it<seq2seq4repair_space>do<seq2seq4repair_space>\"//shop<seq2seq4repair_space>add<seq2seq4repair_space><SHOP><seq2seq4repair_space><PRICE>\"<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>item<seq2seq4repair_space>selected<seq2seq4repair_space>in<seq2seq4repair_space>hand." ) ) ; return true ; } if ( ( ( args . length ) == 3 ) && ( args [ 0 ] . equalsIgnoreCase ( "add" ) ) ) { String name = args [ 1 ] ; int amount = 0 ; try { amount = Integer . parseInt ( args [ 2 ] ) ; } catch ( NumberFormatException e ) { sender . sendMessage ( ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>see<seq2seq4repair_space>what<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>done??<seq2seq4repair_space>You<seq2seq4repair_space>didn\'t<seq2seq4repair_space>enter<seq2seq4repair_space>a<seq2seq4repair_space>number<seq2seq4repair_space>now<seq2seq4repair_space>look<seq2seq4repair_space>at<seq2seq4repair_space>this<seq2seq4repair_space>error:\n" ) + ( e . getMessage ( ) ) ) ) ; return true ; } try { addItem ( ( ( Player ) ( sender ) ) , name , amount ) ; } catch ( Exception e ) { sender . sendMessage ( ( ( ( ( ChatColor . RED ) + "Great,<seq2seq4repair_space>you<seq2seq4repair_space>somehow<seq2seq4repair_space>broke<seq2seq4repair_space>the<seq2seq4repair_space>plugin!<seq2seq4repair_space>Well<seq2seq4repair_space>done...\n" ) + "Are<seq2seq4repair_space>you<seq2seq4repair_space>happy<seq2seq4repair_space>now?<seq2seq4repair_space>Here\'s<seq2seq4repair_space>the<seq2seq4repair_space>horrible<seq2seq4repair_space>mess<seq2seq4repair_space>you<seq2seq4repair_space>made:\n" ) + ( e . getMessage ( ) ) ) ) ; e . printStackTrace ( ) ; } return true ; } if ( ( ( args . length ) >= 3 ) && ( args [ 0 ] . equalsIgnoreCase ( "command" ) ) ) { String name = args [ 1 ] ; int price = 0 ; try { price = Integer . parseInt ( args [ 2 ] ) ; } catch ( NumberFormatException e ) { sender . sendMessage ( ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>see<seq2seq4repair_space>what<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>done??<seq2seq4repair_space>You<seq2seq4repair_space>didn\'t<seq2seq4repair_space>enter<seq2seq4repair_space>a<seq2seq4repair_space>number<seq2seq4repair_space>now<seq2seq4repair_space>look<seq2seq4repair_space>at<seq2seq4repair_space>this<seq2seq4repair_space>error:\n" ) + ( e . getMessage ( ) ) ) ) ; return true ; } StringBuffer command = new StringBuffer ( ) ; for ( int i = 3 ; i < ( args . length ) ; i ++ ) { command . append ( ( ( args [ i ] ) + "<seq2seq4repair_space>" ) ) ; } addCommand ( sender , name , price , command . toString ( ) ) ; return true ; } } String shopName = args [ 0 ] ; File xmlFile = new File ( ( ( ( ( shopsFolder ) + ( File . separator ) ) + shopName ) + ".yml" ) ) ; if ( ! ( xmlFile . exists ( ) ) ) { sender . sendMessage ( ( ( ( ( ( ( ChatColor . RED ) + "Sorry<seq2seq4repair_space>but<seq2seq4repair_space>the<seq2seq4repair_space>shop<seq2seq4repair_space>'" ) + shopName ) + "\'<seq2seq4repair_space>doesn\'t<seq2seq4repair_space>exsist.\n" ) + ( ChatColor . GOLD ) ) + "Here<seq2seq4repair_space>are<seq2seq4repair_space>the<seq2seq4repair_space>available<seq2seq4repair_space>shops:" ) ) ; for ( String file : shopsFolder . list ( ) ) { sender . sendMessage ( ( ( ChatColor . GREEN ) + ( file . replace ( ".yml" , "" ) ) ) ) ; } return true ; } <START_BUG> if ( sender . hasPermission ( ( "etokens.shop." + shopName ) ) ) { <END_BUG> sender . sendMessage ( ( ( ( ChatColor . RED ) + "You<seq2seq4repair_space>need<seq2seq4repair_space>the<seq2seq4repair_space>permission<seq2seq4repair_space>to<seq2seq4repair_space>access<seq2seq4repair_space>" ) + shopName ) ) ; return true ; } openShop ( ( ( Player ) ( sender ) ) , shopName ) ; return false ; } private void addCommand ( CommandSender sender , String name , int price , String cmd ) { } private void openShop ( Player sender , String shopName ) { } private void addItem ( Player sender , String name , int amount ) { } private void createShopFile ( String string ) throws IOException { } private void sendHelp ( CommandSender sender ) { } }

Fix:
if ( ! ( sender . hasPermission ( ( "etokens.shop." + shopName ) ) ) ) {