示例#1
0
 // Muestra un comando
 private boolean getCommand(Player p, String command) {
   command = command.toLowerCase();
   String[] s = command.split(" ");
   command = command.replace(' ', '.');
   command = command.substring(1);
   if (s[0].contains("/root")) {
     return false;
   }
   if (s.length > 0) {
     if (isSet(command + ".*")) {
       return mensaje(p, command + ".*");
     } else if (getBookPath(command) != null) {
       Chat.mensaje(p.getName(), getFc().getStringList(getBookPath(command)).get(0));
       p.getInventory().addItem(makeBook(command));
       return true;
     }
   }
   return false;
 }
示例#2
0
 private boolean mensaje(Player p, String path) {
   Chat.mensaje(p, getFc().getStringList(path));
   return true;
 }