1
0
mirror of https://bitbucket.org/HeshamTB/greet.git synced 2024-12-25 07:35:05 +01:00

Merge pull request #3 from HeshamTB/master

update
This commit is contained in:
HeshamTB 2018-05-03 12:01:25 +03:00 committed by GitHub
commit 6ea1095dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 0 deletions

View File

@ -3,5 +3,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="C:/Users/Hesham/Desktop/spigot-1.12.2.jar"/>
<classpathentry kind="lib" path="/home/hesham/eclipse-hesham/greet/libs/spigot-1.12.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

BIN
libs/spigot-1.12.jar Normal file

Binary file not shown.

View File

@ -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();

View 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() {}
}