generated from BONNePlayground/.github
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IslandVisitSettings object that stores values per each island.
Create methods in VisitAddonManager that allows to load, save and access IslandVisitSettings object.
- Loading branch information
Showing
3 changed files
with
304 additions
and
8 deletions.
There are no files selected for viewing
115 changes: 115 additions & 0 deletions
115
src/main/java/world/bentobox/visit/database/object/IslandVisitSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
package world.bentobox.visit.database.object; | ||
|
||
|
||
import com.google.gson.annotations.Expose; | ||
|
||
import world.bentobox.bentobox.database.objects.DataObject; | ||
|
||
|
||
/** | ||
* This class stores information about island visiting data. | ||
*/ | ||
public class IslandVisitSettings implements DataObject | ||
{ | ||
// --------------------------------------------------------------------- | ||
// Section: Variables | ||
// --------------------------------------------------------------------- | ||
|
||
/** | ||
* Current object uniqueId object. | ||
*/ | ||
@Expose | ||
private String uniqueId = ""; | ||
|
||
/** | ||
* Stores payment value for visitor. | ||
*/ | ||
@Expose | ||
private double payment = 0.0; | ||
|
||
/** | ||
* Stores if visits are allowed while offline. | ||
*/ | ||
@Expose | ||
private boolean offlineVisit = true; | ||
|
||
|
||
// --------------------------------------------------------------------- | ||
// Section: Constructor | ||
// --------------------------------------------------------------------- | ||
|
||
|
||
/** | ||
* Empty constructor. | ||
*/ | ||
public IslandVisitSettings() | ||
{ | ||
} | ||
|
||
|
||
// --------------------------------------------------------------------- | ||
// Section: Methods | ||
// --------------------------------------------------------------------- | ||
|
||
|
||
/** | ||
* @return uniqueId value. | ||
*/ | ||
@Override | ||
public String getUniqueId() | ||
{ | ||
return this.uniqueId; | ||
} | ||
|
||
|
||
/** | ||
* @param uniqueId new uniqueId value. | ||
*/ | ||
@Override | ||
public void setUniqueId(String uniqueId) | ||
{ | ||
this.uniqueId = uniqueId; | ||
} | ||
|
||
|
||
/** | ||
* This method returns the payment value. | ||
* @return the value of payment. | ||
*/ | ||
public double getPayment() | ||
{ | ||
return this.payment; | ||
} | ||
|
||
|
||
/** | ||
* This method sets the payment value. | ||
* @param payment the payment new value. | ||
* | ||
*/ | ||
public void setPayment(double payment) | ||
{ | ||
this.payment = payment; | ||
} | ||
|
||
|
||
/** | ||
* This method returns the offlineVisit value. | ||
* @return the value of offlineVisit. | ||
*/ | ||
public boolean isOfflineVisit() | ||
{ | ||
return this.offlineVisit; | ||
} | ||
|
||
|
||
/** | ||
* This method sets the offlineVisit value. | ||
* @param offlineVisit the offlineVisit new value. | ||
* | ||
*/ | ||
public void setOfflineVisit(boolean offlineVisit) | ||
{ | ||
this.offlineVisit = offlineVisit; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters