/[projects]/miscJava/minecraft-plugins/hoeruputils/src/HoerupUtils.java
ViewVC logotype

Diff of /miscJava/minecraft-plugins/hoeruputils/src/HoerupUtils.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1200 by torben, Wed Dec 1 08:37:08 2010 UTC revision 1201 by torben, Sat Dec 4 11:38:36 2010 UTC
# Line 134  public class HoerupUtils extends Plugin Line 134  public class HoerupUtils extends Plugin
134                  final static int BLOCK_GRASS = 2;                  final static int BLOCK_GRASS = 2;
135                  final static int BLOCK_DIRT = 3;                  final static int BLOCK_DIRT = 3;
136    
137                    private HashMap<String, String[]> commands = new HashMap<String,String[]>();
138    
139                    
140    
141                  //http://www.minecraftforum.net/viewtopic.php?f=35&t=14739                  //http://www.minecraftforum.net/viewtopic.php?f=35&t=14739
# Line 206  public class HoerupUtils extends Plugin Line 208  public class HoerupUtils extends Plugin
208                          if (! player.canUseCommand(split[0]) ) {                          if (! player.canUseCommand(split[0]) ) {
209                                  return false;                                  return false;
210                          }                          }
211    
212                            if ( split[0].equals("/levelarea") || split[0].equals("/la") || split[0].equals("/slopearea") || split[0].equals("/fillarea") || split[0].equals("/setsurface") ) {
213                                    commands.put(player.getName(), split);
214                            }
215                                                    
216                          if( split[0].equals("/setpos") && player.canUseCommand("/setpos") ) {                          if ( split[0].equals("//") ) {
217                                    String cmd[] = commands.get(player.getName() );
218                                    if (cmd != null) {
219                                            onCommand(player, commands.get(player.getName() ) );
220                                    } else {
221                                            player.sendMessage("//: no recorded command found");
222                                    }
223                                    return true;
224                            } else if( split[0].equals("/setpos") && player.canUseCommand("/setpos") ) {
225                                  setPos(player, split);                                  setPos(player, split);
226                                  return true;                                  return true;
227                          } else if ( split[0].equals("/whereis" ) && player.canUseCommand("/whereis")) {                          } else if ( split[0].equals("/whereis" ) && player.canUseCommand("/whereis")) {

Legend:
Removed from v.1200  
changed lines
  Added in v.1201

  ViewVC Help
Powered by ViewVC 1.1.20