Solved Hi, just a quick question

Discussion in 'Plugin Development' started by mrdude123, Apr 29, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    Hi, all.

    Trying to use my method to check if the server isFrozen. However, I'm not sure how to make my method cooperate with the bukkit API.

    For example, I want to do Bukkit.getServer().isFrozen();
    However, isFrozen is not showing up as one of the possible successors to getServer().

    Any ideas?

    package archer.kit;
    import java.util.ArrayList;
    import org.bukkit.Bukkit;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandExecutor;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerMoveEvent;
    public class Freeze implements CommandExecutor, Listener {
        boolean frozen = true;
        public void isFrozen(){
            if(frozen == false){
        public boolean onCommand(CommandSender sender, Command cmd, String lbl,
                String[] args) {
          // Problem is this: I want Bukkit.getServer().isFrozen();
          // But I can only go up to Bukkit.getServer() , my method isn't showing up. 
            return false;
    And yes, I know that it's incomplete. I'm trying to troubleshoot before I go further.

    Disregard thread, I'm an idiot. :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Apr 29, 2016
Thread Status:
Not open for further replies.

Share This Page