Class GPSNetwork
java.lang.Object
io.github.thebusybiscuit.slimefun4.api.gps.GPSNetwork
The
GPSNetwork is a manager class for all Transmitters and waypoints.
There can only be one instance of this class per Server.
It is also responsible for teleportation and resource management.- Author:
- TheBusyBiscuit
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWaypoint(Player p, String name, Location l) intcountTransmitters(UUID uuid) This method returns the amount ofTransmittersfor the givenUUID.voidcreateWaypoint(Player p, Location l) This method will prompt the givenPlayerto enter a name for a waypoint.getIcon(String name, World.Environment environment) This returns an icon for the given waypoint.intgetNetworkComplexity(UUID uuid) This method calculates the GPS complexity for the givenUUID.This returns theResourceManagerfor thisGPSNetwork.This returns theTeleportationManagerfor thisGPSNetwork.getTransmitters(UUID uuid) voidThis method opens theGPSTransmittercontrol panel to the givenPlayer.voidvoidupdateTransmitter(Location l, UUID uuid, boolean online) This method updates the status of aGPSTransmitter.
-
Constructor Details
-
GPSNetwork
- Parameters:
plugin- OurSlimefuninstance
-
-
Method Details
-
updateTransmitter
This method updates the status of aGPSTransmitter.- Parameters:
l- TheLocationof theGPSTransmitteruuid- TheUUIDwho theGPSTransmitterbelongs toonline- Whether thatGPSTransmitteris online
-
getNetworkComplexity
This method calculates the GPS complexity for the givenUUID. The complexity is determined by the Y level of eachGPSTransmittermultiplied by the multiplier of that transmitter. -
countTransmitters
This method returns the amount ofTransmittersfor the givenUUID.- Parameters:
uuid- TheUUIDwho these transmitters belong to- Returns:
- The amount of transmitters
-
openTransmitterControlPanel
This method opens theGPSTransmittercontrol panel to the givenPlayer.- Parameters:
p- ThePlayer
-
getIcon
@ParametersAreNonnullByDefault @Nonnull public ItemStack getIcon(String name, World.Environment environment) This returns an icon for the given waypoint. The icon is dependent on theWorld.Environmentof the waypoint'sWorld. However if the name of this waypoint indicates that this is actually a deathmarker then a different texture will be used. Otherwise it will return a globe, a nether or end sphere according to theWorld.Environment.- Parameters:
name- The name of a waypointenvironment- TheWorld.Environmentof the waypoint'sWorld- Returns:
- An icon for this waypoint
-
openWaypointControlPanel
-
createWaypoint
This method will prompt the givenPlayerto enter a name for a waypoint. After entering the name, it will be added to his waypoint list. -
addWaypoint
-
getTransmitters
-
getTeleportationManager
This returns theTeleportationManagerfor thisGPSNetwork. It is responsible for all actions that relate to theTeleporter.- Returns:
- The
TeleportationManagerfor thisGPSNetwork
-
getResourceManager
- Returns:
- The
ResourceManagerfor thisGPSNetwork
-