| Sleep.java |
1 /*
2 * This file is part of Zuul.
3 *
4 * Zuul is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * Foobar is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Foobar; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Copyrigth 2004 by marcus, leh
19 *
20 */
21
22package org.jzuul.engine.commands;
23
24import org.jzuul.engine.Engine;
25
26/**
27 *
28 */
29public class Sleep extends Command {
30
31 /**
32 *
33 */
34 public Sleep() {
35 super();
36 this.arguments = 0;
37 this.name = "sleep"; //$NON-NLS-1$
38 this.desc = Messages.getString("SLEEP_HELP"); //$NON-NLS-1$
39 }
40
41 /* (non-Javadoc)
42 * @see main.BefehlAction#action()
43 */
44 protected boolean action() {
45 player.say(Messages.getString("SLEEP_SAYING")); //$NON-NLS-1$
46 for (int i = 0; i < 5; i++) {
47 player.say(Messages.getString("SLEEP_REPEAT")); //$NON-NLS-1$
48 Engine.delay(1000);
49 }
50 player.say(Messages.getString("SLEEP_FINISH")); //$NON-NLS-1$
51 return true;
52 }
53
54}
55