Package me.therealkeyis.models
Class LocationEntry
java.lang.Object
me.therealkeyis.models.LocationEntry
A database location entry
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe name of the voice channel for the locationdoubleThe x value for the first corner selecteddoubleThe x value for the second corner selecteddoubleThe z value for the first corner selecteddoubleThe z value for the second corner selected -
Constructor Summary
ConstructorsConstructorDescriptionLocationEntry(String locationName, double x1, double z1, double x2, double z2) Creation of entry using raw coordinatesLocationEntry(String locationName, LocationPair coord1, LocationPair coord2) Creation of entry using two pairs of coordinates -
Method Summary
Modifier and TypeMethodDescriptionbooleanIsBetween(double playerx, double playerz) Checks if the provided coordinates are inside this locationbooleanIsSurrounding(LocationPair playerLocation) Checks if the provided location pair is inside this location
-
Field Details
-
locationName
The name of the voice channel for the location -
x1
public double x1The x value for the first corner selected -
x2
public double x2The x value for the second corner selected -
z1
public double z1The z value for the first corner selected -
z2
public double z2The z value for the second corner selected
-
-
Constructor Details
-
LocationEntry
Creation of entry using two pairs of coordinates- Parameters:
locationName- The name of the voice channelcoord1- The first pair of coordinatescoord2- The second pair of coordinates
-
LocationEntry
Creation of entry using raw coordinates- Parameters:
locationName- The name of the voice channelx1- The first x coordinatez1- The first z coordinatex2- The second x coordinatez2- The second z coordinate
-
-
Method Details
-
IsBetween
public boolean IsBetween(double playerx, double playerz) Checks if the provided coordinates are inside this location- Parameters:
playerx- The player's x coordinateplayerz- The player's z coordinate- Returns:
- True if inside, false otherwise
-
IsSurrounding
Checks if the provided location pair is inside this location- Parameters:
playerLocation- The player's current location- Returns:
- True if inside, false otherwise
-