Package org.bukkit.entity

Examples of org.bukkit.entity.Player.sendMessage()


            }
           
            // add names of TPA players and send message
            Teleportation.tpaRequests.add(id);
            tpaPlayer.sendMessage(ChatColor.GREEN + Nicknames.getNick(player.getName()) + " " + _("tpRequest1", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest2", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest3", sender.getName()));
           
            // set timeout function that will cancel TPA request if timeout is reached
            CommandsEX.plugin.getServer().getScheduler().scheduleSyncDelayedTask(CommandsEX.plugin, new TpRequestCanceller("tpa", id), (20 * tTimeout));
           
 
View Full Code Here


           
            // add names of TPA players and send message
            Teleportation.tpaRequests.add(id);
            tpaPlayer.sendMessage(ChatColor.GREEN + Nicknames.getNick(player.getName()) + " " + _("tpRequest1", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest2", sender.getName()));
            tpaPlayer.sendMessage(ChatColor.GREEN + _("tpRequest3", sender.getName()));
           
            // set timeout function that will cancel TPA request if timeout is reached
            CommandsEX.plugin.getServer().getScheduler().scheduleSyncDelayedTask(CommandsEX.plugin, new TpRequestCanceller("tpa", id), (20 * tTimeout));
           
            // send confimation message to the original player
View Full Code Here

   
    // send message to the original requestor, if he's still online
    String[] s = id.split("#####");
    Player tpaPlayer = Bukkit.getServer().getPlayer(s[0]);
    if (tpaPlayer != null) {
      tpaPlayer.sendMessage(ChatColor.RED + _("tpRequestCancelled", Nicknames.getNick(tpaPlayer.getName())) + s[1] + ".");
    }
  }
}
View Full Code Here

            if (CommandsEX.getConf().getList("availableLangs").contains(args[0])) {
              if (CommandsEX.sqlEnabled) {
                SQLManager.query("INSERT "+ (SQLManager.sqlType.equals("sqlite") ? "OR REPLACE " : "") +" INTO " + SQLManager.prefix + "user2lang VALUES (?, ?)" + ((SQLManager.sqlType.equals("mysql") ? " ON DUPLICATE KEY UPDATE lang = VALUES(lang)" : "")), pName, args[0]);
              }
              Language.perUserLocale.put(pName, args[0]);
              player.sendMessage(ChatColor.YELLOW + _("languageChanged", pName) + ChatColor.WHITE + args[0]);
            } else {
              player.sendMessage(ChatColor.YELLOW + _("noSuchLanguage", pName));
              player.sendMessage(ChatColor.YELLOW + _("availableLangs", pName) + ChatColor.WHITE + CommandsEX.getConf().getList("availableLangs").toString());
            }
          }
View Full Code Here

                SQLManager.query("INSERT "+ (SQLManager.sqlType.equals("sqlite") ? "OR REPLACE " : "") +" INTO " + SQLManager.prefix + "user2lang VALUES (?, ?)" + ((SQLManager.sqlType.equals("mysql") ? " ON DUPLICATE KEY UPDATE lang = VALUES(lang)" : "")), pName, args[0]);
              }
              Language.perUserLocale.put(pName, args[0]);
              player.sendMessage(ChatColor.YELLOW + _("languageChanged", pName) + ChatColor.WHITE + args[0]);
            } else {
              player.sendMessage(ChatColor.YELLOW + _("noSuchLanguage", pName));
              player.sendMessage(ChatColor.YELLOW + _("availableLangs", pName) + ChatColor.WHITE + CommandsEX.getConf().getList("availableLangs").toString());
            }
          }
        } else if (Permissions.checkPerms(player, "cex.lang")) {
          // show all available lanaguages
View Full Code Here

              }
              Language.perUserLocale.put(pName, args[0]);
              player.sendMessage(ChatColor.YELLOW + _("languageChanged", pName) + ChatColor.WHITE + args[0]);
            } else {
              player.sendMessage(ChatColor.YELLOW + _("noSuchLanguage", pName));
              player.sendMessage(ChatColor.YELLOW + _("availableLangs", pName) + ChatColor.WHITE + CommandsEX.getConf().getList("availableLangs").toString());
            }
          }
        } else if (Permissions.checkPerms(player, "cex.lang")) {
          // show all available lanaguages
          String pName = player.getName();
View Full Code Here

            }
          }
        } else if (Permissions.checkPerms(player, "cex.lang")) {
          // show all available lanaguages
          String pName = player.getName();
          player.sendMessage(ChatColor.YELLOW + _("langYourLang", pName) + ChatColor.WHITE + (Language.perUserLocale.containsKey(pName) ? Language.perUserLocale.get(pName) : CommandsEX.getConf().getString("defaultLang")));
          player.sendMessage(ChatColor.YELLOW + _("availableLangs", pName) + ChatColor.WHITE + CommandsEX.getConf().getList("availableLangs").toString());
        }
      }
    }
        return true;
View Full Code Here

          }
        } else if (Permissions.checkPerms(player, "cex.lang")) {
          // show all available lanaguages
          String pName = player.getName();
          player.sendMessage(ChatColor.YELLOW + _("langYourLang", pName) + ChatColor.WHITE + (Language.perUserLocale.containsKey(pName) ? Language.perUserLocale.get(pName) : CommandsEX.getConf().getString("defaultLang")));
          player.sendMessage(ChatColor.YELLOW + _("availableLangs", pName) + ChatColor.WHITE + CommandsEX.getConf().getList("availableLangs").toString());
        }
      }
    }
        return true;
  }
View Full Code Here

        Block block = event.getBlock();
        if (player.getItemInHand().getTypeId() == 281) {
            if (player.hasPermission("ECM.selection"));
            block1 = Util.toVector(block);
            world = block.getWorld();
            player.sendMessage(ChatColor.GREEN + "First point is now set!");
        }
    }
   
   
View Full Code Here

  Block block = event.getClickedBlock();
            if (player.getItemInHand().getTypeId() == 281){
    if (player.hasPermission("ECM.selection"));
                BlockListener.block2 = Util.toVector(block);
                BlockListener.world = block.getWorld();
                player.sendMessage(ChatColor.GREEN + "Second point has been selected!");
            }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.