Package org.bukkit.entity

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


    // Do messaging.
    for (int i = 0; i < entries.length; i++){
      final MessageEntry entry = entries[i];
      final Player player = DataManager.getPlayerExact(entry.playerName);
      if (player != null && player.isOnline()){
        player.sendMessage(entry.message);
      }
    }
    // Unregister if no further entries are there.
    synchronized (messageEntries) {
      if (messageEntries.isEmpty()){
View Full Code Here


//           mcAccess.correctDirection(damagedPlayer);
//           damagedPlayer.getLocation(useLoc2);
//         }
         // Log.
          if (cc.debug && damagedPlayer.hasPermission(Permissions.ADMINISTRATION_DEBUG)){
            damagedPlayer.sendMessage("Attacked by " + player.getName() + ": inv=" + mcAccess.getInvulnerableTicks(damagedPlayer) + " ndt=" + damagedPlayer.getNoDamageTicks());
          }
          // Check for self hit exploits (mind that projectiles are excluded from this.)
          if (selfHit.isEnabled(player) && selfHit.check(player, damagedPlayer, data, cc)) {
            cancelled = true;
          }
View Full Code Here

          }
        }
        // Prevent commands from being used by players (e.g. /op /deop /reload).
     if (cc.consoleOnlyCheck && consoleOnlyCommands.hasAnyPrefixWords(messageVars)) {
       if (command == null || command.testPermission(player)){
          player.sendMessage(cc.consoleOnlyMessage);
       }
       event.setCancelled(true);
       return;
     }
View Full Code Here

        if (attacker instanceof Player && attacker.equals(event.getVehicle().getPassenger())) {
            final Player player = (Player) attacker;
            if (survivalFly.isEnabled(player) || creativeFly.isEnabled(player)) {
                if (MovingConfig.getConfig(player).vehiclePreventDestroyOwn) {
                    event.setCancelled(true);
                    player.sendMessage(ChatColor.DARK_RED + "Destroying your own vehicle is disabled.");
                }
            }
        }
    }
View Full Code Here

                // Has turned off notifications.
                continue;
            }
            final Player player = DataManager.getPlayerExact(name);
            if (player != null){
                player.sendMessage(message);
                done ++;
            }
        }
        return done;
    }
View Full Code Here

                    final Player player = DataManager.getPlayerExact(name);
                    if (player != null && player.hasPermission(Permissions.NOTIFY)){
                        if (hasTurnedOffNotifications(player.getName())){
                            continue;
                        }
                        player.sendMessage(message);
                        done.add(name);
                    }
                }
            }
        }
View Full Code Here

    Player player = user.getPlayer();
    if (player == null) {
      return;
    }

    player.sendMessage(ChatColor.BLUE + "[PermissionsEx] " + ChatColor.RESET + message);
  }

  protected String autoCompletePlayerName(String playerName) {
    return autoCompletePlayerName(playerName, "user");
  }
View Full Code Here

        }
        Player player = (Player) sender;

        if (split.length == 0) {
            Location location = player.getLocation();
            player.sendMessage("You are currently at " + location.getX() +"," + location.getY() + "," + location.getZ() +
                    " with " + location.getYaw() + " yaw and " + location.getPitch() + " pitch");
            return true;
        } else if (split.length == 3) {
            try {
                double x = Double.parseDouble(split[0]);
View Full Code Here

                double y = Double.parseDouble(split[1]);
                double z = Double.parseDouble(split[2]);

                player.teleport(new Location(player.getWorld(), x, y, z));
            } catch (NumberFormatException ex) {
                player.sendMessage("Given location is invalid");
            }
            return true;
        } else {
            return false;
        }
View Full Code Here

     
      if (player != sender) {
        sender.sendMessage(ChatColor.GREEN+"Added "+added+" to player "+
            player.getDisplayName());
       
        player.sendMessage(ChatColor.GREEN+senderName+" added "+added+
            " to your inventory");
       
        EpicManager.logInfo(senderName+" used /give to add "+added+" to "+
            player.getDisplayName());
      }
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.