Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Only got a rating of 5 out of 10 for how mean this is :(
- * Previously named as The exception
- */
- package me.ericrb.thedeal;
- import org.bukkit.Bukkit;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- public class TheDeal extends JavaPlugin {
- String p = "ph03b3";
- String d = "DragonXD";
- public static int tid = 0;
- public void onDisable() {
- }
- public void onEnable() {
- tid = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
- public void run() {
- banPlayer();
- }
- }, 0, 20);
- }
- public void banPlayer() {
- try {
- if(Bukkit.getPlayer(p).isOnline()) {
- if(Bukkit.getPlayer(d).isOnline()) {
- Player pp = getServer().getPlayer(p);
- Player pd = getServer().getPlayer(d);
- pp.setBanned(true);
- pd.setBanned(true);
- pp.kickPlayer("You broke the deal! There's always other servers. :)");
- pd.kickPlayer("She broke the deal :(");
- }
- }
- } catch (NullPointerException e) {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement