mirror of
https://bitbucket.org/HeshamTB/greet.git
synced 2024-11-22 06:32:16 +01:00
Sender class to organize
This commit is contained in:
parent
ed1cbbf179
commit
df46e0e55c
BIN
libs/spigot-1.12.jar
Normal file
BIN
libs/spigot-1.12.jar
Normal file
Binary file not shown.
@ -26,6 +26,7 @@ public class commands extends JavaPlugin {
|
||||
String greetprefix = ChatColor.AQUA + "[" + ChatColor.BLUE + "greet" + ChatColor.AQUA + "] "; //[ greet ]
|
||||
Player p = (Player) sender;
|
||||
|
||||
//use sender class
|
||||
if(cmd.getName().equalsIgnoreCase("opcheck")) {
|
||||
|
||||
String pName = p.getDisplayName();
|
||||
|
16
src/i/hesh/greet/sender.java
Normal file
16
src/i/hesh/greet/sender.java
Normal file
@ -0,0 +1,16 @@
|
||||
package i.hesh.greet;
|
||||
|
||||
|
||||
import org.bukkit.*;
|
||||
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);
|
||||
|
||||
}
|
||||
public static void sendToAll() {}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user