mirror of
https://bitbucket.org/HeshamTB/greet.git
synced 2024-11-22 06:02:15 +01:00
JavaDoc for sender class
This commit is contained in:
parent
faee743a28
commit
b8191a6da5
@ -31,8 +31,6 @@ public class commands extends JavaPlugin {
|
||||
|
||||
String pName = p.getDisplayName();
|
||||
p.sendMessage(greetprefix + ChatColor.AQUA + "Hello " + pName+"! " );
|
||||
|
||||
|
||||
if (p.isOp()) {
|
||||
p.sendMessage(greetprefix+ChatColor.GREEN +"You are an Operator");
|
||||
//p.giveExp(5);
|
||||
@ -40,25 +38,19 @@ public class commands extends JavaPlugin {
|
||||
else {
|
||||
|
||||
p.sendMessage(greetprefix + ChatColor.GREEN +"You are not an Operator");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if(cmd.getName().equalsIgnoreCase("count")) {
|
||||
//p.sendMessage(hesh());
|
||||
|
||||
|
||||
int i = 1;
|
||||
p.sendMessage(greetprefix + ChatColor.GRAY + "Online Players :");
|
||||
|
||||
for(Player player : Bukkit.getOnlinePlayers()) {
|
||||
|
||||
p.sendMessage(ChatColor.RED + "" + i + "- " + player.getName());
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(cmd.getName().equalsIgnoreCase("kit1") && p.isOp()) {
|
||||
|
||||
p.getInventory().addItem(new ItemStack(Material.STONE_PICKAXE));
|
||||
@ -73,6 +65,4 @@ public class commands extends JavaPlugin {
|
||||
}*/ //failed to respwan (bed obstructed)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -6,10 +6,13 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class sender {
|
||||
private static final String PREFIX = ChatColor.AQUA + "[" + ChatColor.BLUE + "greet" + ChatColor.AQUA + "] "; //[ greet ]
|
||||
public static void sendToPlayer(Player p, String msg, ChatColor c) {
|
||||
p.sendMessage( PREFIX + c + msg);
|
||||
|
||||
/** Sends a chat message to the Player*/
|
||||
public static void sendToPlayer(Player player, String msg, ChatColor color) {
|
||||
player.sendMessage( PREFIX + color + msg);
|
||||
|
||||
}
|
||||
/**Sends a chat message to all online players*/
|
||||
public static void sendToAll() {}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user