Class AbstractServerActions<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void activeMapViewChanged​(@Nullable MapView<G,​A,​R> mapView)
      This event handler is called when the current map view has changed.
      void mapViewClosing​(@NotNull MapView<G,​A,​R> mapView)
      This event handler is called when a map view is to be closed.
      void mapViewCreated​(@NotNull MapView<G,​A,​R> mapView)
      This event handler is called when a map view was created.
      void openInClient()
      Action method for "open in client".
      protected abstract void resetMap​(@NotNull java.lang.String mapPath)
      Resets a map identified by the given map path.
      void setAction​(@NotNull javax.swing.Action action, @NotNull java.lang.String name)
      Sets the Action instance for this editor action.
      protected abstract void teleportCharacterToMap​(@NotNull java.lang.String mapPath, int mapX, int mapY)
      Teleports the character to the given map path.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractServerActions

        protected AbstractServerActions​(@NotNull
                                        @NotNull FileControl<G,​A,​R> fileControl)
        Creates a new instance.
        Parameters:
        fileControl - the file control for saving maps
    • Method Detail

      • openInClient

        @ActionMethod
        public void openInClient()
        Action method for "open in client".
      • resetMap

        protected abstract void resetMap​(@NotNull
                                         @NotNull java.lang.String mapPath)
                                  throws java.io.IOException
        Resets a map identified by the given map path.
        Parameters:
        mapPath - the map path to reset
        Throws:
        java.io.IOException - if reset fails
      • teleportCharacterToMap

        protected abstract void teleportCharacterToMap​(@NotNull
                                                       @NotNull java.lang.String mapPath,
                                                       int mapX,
                                                       int mapY)
                                                throws java.io.IOException
        Teleports the character to the given map path.
        Parameters:
        mapPath - the map path to teleport to
        mapX - the x coordinate to teleport to
        mapY - the y coordinate to teleport to
        Throws:
        java.io.IOException - if teleportation fails
      • setAction

        public void setAction​(@NotNull
                              @NotNull javax.swing.Action action,
                              @NotNull
                              @NotNull java.lang.String name)
        Description copied from interface: EditorAction
        Sets the Action instance for this editor action.
        Specified by:
        setAction in interface EditorAction
        Parameters:
        action - the action instance
        name - the name of the action