/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/secretdoor/DoorOpenListener.java
ViewVC logotype

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/secretdoor/DoorOpenListener.java

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

miscJava/bukkit-minecraft-plugins/HoerupUtils/src/dk/thoerup/bukkit/hoeruputils/secretdoor/DoorOpenListener.java revision 1579 by torben, Sat Jul 16 11:16:09 2011 UTC miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/secretdoor/DoorOpenListener.java revision 1684 by torben, Fri Jan 27 12:21:27 2012 UTC
# Line 6  import org.bukkit.Material; Line 6  import org.bukkit.Material;
6  import org.bukkit.World;  import org.bukkit.World;
7  import org.bukkit.entity.Player;  import org.bukkit.entity.Player;
8  import org.bukkit.event.player.PlayerInteractEvent;  import org.bukkit.event.player.PlayerInteractEvent;
9  import org.bukkit.event.player.PlayerListener;  import org.bukkit.event.Listener;
10    import org.bukkit.event.EventHandler;
11  import org.bukkit.plugin.Plugin;  import org.bukkit.plugin.Plugin;
12    
13    
14    
15  public class DoorOpenListener extends PlayerListener{  public class DoorOpenListener implements Listener{
16                    
17          private DoorStorage store;          private DoorStorage store;
18                    
# Line 23  public class DoorOpenListener extends Pl Line 24  public class DoorOpenListener extends Pl
24                  this.plugin = plugin;                  this.plugin = plugin;
25          }          }
26                    
27          @Override          @EventHandler
28          public void onPlayerInteract(PlayerInteractEvent event) {          public void onPlayerInteract(PlayerInteractEvent event) {
29    
30                  Player player = event.getPlayer();                  Player player = event.getPlayer();
# Line 42  public class DoorOpenListener extends Pl Line 43  public class DoorOpenListener extends Pl
43                          return;                          return;
44                  }                  }
45    
46                    if (door.isPrivate() == true && !door.getOwner().equals(player.getName() ) ) {
47                            return;
48                    }
49    
50                  final World world = player.getWorld();                  final World world = player.getWorld();
51                  final Location loc = event.getClickedBlock().getLocation();                  final Location loc = event.getClickedBlock().getLocation();
52    

Legend:
Removed from v.1579  
changed lines
  Added in v.1684

  ViewVC Help
Powered by ViewVC 1.1.20