Class SubCreatedEvent

java.lang.Object
org.spongepowered.api.event.impl.AbstractEvent
net.ME1312.SubServers.Client.Sponge.Event.SubCreatedEvent
All Implemented Interfaces:
SubEvent, Event

public class SubCreatedEvent extends AbstractEvent implements SubEvent
Server Created Event
  • Constructor Details

    • SubCreatedEvent

      public SubCreatedEvent(UUID player, String host, String name, String template, Version version, int port, boolean update, boolean success)
      Server Created Event
      Parameters:
      player - Player Creating
      host - Potential Host
      name - Server Name
      template - Server Type
      version - Server Version
      port - Server Port Number
  • Method Details

    • getHost

      public String getHost()
      Get the Host the SubServer runs on
      Returns:
      Host
    • wasUpdate

      public boolean wasUpdate()
      Get if SubCreator was being run in update mode
      Returns:
      Update Mode Status
    • wasSuccessful

      public boolean wasSuccessful()
      Get if the operation was a success
      Returns:
      Success Status
    • getServer

      public void getServer(Consumer<SubServer> callback)
      Get the Server that's being updated
      Parameters:
      callback - Updating Server
    • getName

      public String getName()
      Get the name the SubServer used
      Returns:
      SubServer Name
    • getTemplate

      public String getTemplate()
      Get the Template that was used
      Returns:
      Server Template
    • getVersion

      public Version getVersion()
      Get the Version the Server used
      Returns:
      Server Version
    • getPort

      public int getPort()
      Get the Port the Server used
      Returns:
      Port Number
    • getPlayer

      public UUID getPlayer()
      Gets the player that triggered the Event
      Returns:
      The Player that triggered this Event or null if Console
    • getCause

      @Deprecated public Cause getCause()
      Deprecated.
      Use simplified methods where available
      Gets the cause of this Event
      Specified by:
      getCause in interface Event
      Returns:
      The player UUID who triggered this event