Beispiel #1
0
 @Override
 public boolean close(VanillaPlayerController player) {
   Window w = this.removeViewer(player);
   if (w != null) {
     if (player.getActiveWindow() == w) {
       player.closeWindow();
     }
     return true;
   } else {
     return false;
   }
 }
Beispiel #2
0
 @Override
 public boolean open(VanillaPlayerController player) {
   if (!this.viewers.containsKey(player)) {
     Window w = new VillagerWindow(player, this);
     this.addViewer(player, w);
     player.setWindow(w);
     return true;
   } else {
     return false;
   }
 }