RestartGTEvent.java

codebase/src/net/sourceforge/pain/logic/event/guitool/event/RestartGTEvent.java · 636 B

From the archive pain_0_44.tgz

Download the archive   « Back to the archive contents

package net.sourceforge.pain.logic.event.guitool.event;

import net.sourceforge.pain.logic.event.guitool.*;
import net.sourceforge.pain.*;
import net.sourceforge.pain.plugin.shutdown.*;

public class RestartGTEvent extends GuiEventHandler {

    public void processEvent() {
        String[] data = (String[]) packet.data;
        if ("shutdown".equals(data[0])) {
            ShutdownTimer t = (ShutdownTimer) Core.getPluginManager().getPlugin("shutdown.ShutdownTimer");
            t.reset(10, true);
            send("Shutdown in 10 seconds");
        } else {
           send("Wrong action");
        }

    }
}

Site Stats

Snippets: 1791
Codebases: 571