    001    package net.minecraft.src;
    002
    003    import java.util.concurrent.Callable;
    004    import net.minecraft.server.MinecraftServer;
    005
    006    public class CallableServerProfiler implements Callable
    007    {
    008        /** Gets Minecraft Server profile. */
    009        final MinecraftServer minecraftServerProfiler;
    010
    011        public CallableServerProfiler(MinecraftServer par1MinecraftServer)
    012        {
    013            this.minecraftServerProfiler = par1MinecraftServer;
    014        }
    015
    016        /**
    017         * Gets if Server Profiler (aka Snooper) is enabled.
    018         */
    019        public String getServerProfilerEnabled()
    020        {
    021            return this.minecraftServerProfiler.theProfiler.profilingEnabled ? this.minecraftServerProfiler.theProfiler.getNameOfLastSection() : "N/A (disabled)";
    022        }
    023
    024        public Object call()
    025        {
    026            return this.getServerProfilerEnabled();
    027        }
    028    }