Пример #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;
   }
 }
Пример #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;
   }
 }