Class StoredPlayer
java.lang.Object
io.ebean.Model
fr.prodrivers.bukkit.commons.storage.player.StoredPlayer
@MappedSuperclass
public class StoredPlayer
extends io.ebean.Model
Stored Player
Base model for storing cross-plugin and cross-medium data related to players. Include most commons values across plugins.
This model can be extended in your plugin to add other attributes.
-
Constructor Summary
ConstructorsConstructorDescriptionStoredPlayer(UUID uniqueId) Create a new stored player for player's provided Unique ID -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDisciplinaryAction(PlayerDisciplinaryAction disciplinaryAction) Add a disciplinary actions to a playerio.ebean.Databasedb()booleandelete()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.booleandelete(io.ebean.Transaction transaction) Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.booleanDisable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.booleandeletePermanent(io.ebean.Transaction transaction) Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.voidflush()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.Get disciplinary actions made against player@NonNull StringGet stored player's language@NonNull DateGet stored player's last seen datedoublegetMoney()Get stored player's amount of money@NonNull StringgetName()Get stored player's nameGet stored player's unique IDvoidinsert()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.voidinsert(io.ebean.Transaction transaction) Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.booleanGet stored player's connection statusvoidrefresh()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.voidremoveDisciplinaryAction(PlayerDisciplinaryAction disciplinaryAction) Remove a disciplinary actions from a playervoidRemove expired disciplinary actions from a playervoidsave()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.voidsave(io.ebean.Transaction transaction) Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.voidsetConnected(boolean connected) Set stored player's connection statusvoidsetLanguage(@NonNull String language) Set stored player's languagevoidsetLastSeen(@NonNull Date lastSeen) Set stored player's last seen datevoidsetMoney(double money) Set stored player's amount of moneyvoidSet stored player's namevoidupdate()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.voidupdate(io.ebean.Transaction transaction) Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.Methods inherited from class io.ebean.Model
markAsDirty, markPropertyUnset
-
Constructor Details
-
StoredPlayer
Create a new stored player for player's provided Unique ID- Parameters:
uniqueId- Player's unique ID
-
-
Method Details
-
db
public io.ebean.Database db()- Overrides:
dbin classio.ebean.Model
-
save
public void save()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
savein classio.ebean.Model
-
save
public void save(io.ebean.Transaction transaction) Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
savein classio.ebean.Model- Parameters:
transaction- Unused
-
flush
public void flush()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
flushin classio.ebean.Model
-
update
public void update()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
updatein classio.ebean.Model
-
update
public void update(io.ebean.Transaction transaction) Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
updatein classio.ebean.Model- Parameters:
transaction- Unused
-
insert
public void insert()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
insertin classio.ebean.Model
-
insert
public void insert(io.ebean.Transaction transaction) Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
insertin classio.ebean.Model- Parameters:
transaction- Unused
-
delete
public boolean delete()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
deletein classio.ebean.Model
-
delete
public boolean delete(io.ebean.Transaction transaction) Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
deletein classio.ebean.Model- Parameters:
transaction- Unused
-
deletePermanent
public boolean deletePermanent()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
deletePermanentin classio.ebean.Model
-
deletePermanent
public boolean deletePermanent(io.ebean.Transaction transaction) Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
deletePermanentin classio.ebean.Model- Parameters:
transaction- Unused
-
refresh
public void refresh()Disable method to avoid conflicting Ebean databases, as this method may use the first registered Ebean instance.- Overrides:
refreshin classio.ebean.Model
-
getUniqueId
Get stored player's unique ID- Returns:
- Stored player's unique ID
-
getName
Get stored player's name- Returns:
- Stored player's name
-
setName
Set stored player's name- Parameters:
name- Stored player's name
-
getLastSeen
Get stored player's last seen date- Returns:
- Stored player's last seen date
-
setLastSeen
Set stored player's last seen date- Parameters:
lastSeen- Stored player's last seen date
-
isConnected
public boolean isConnected()Get stored player's connection status- Returns:
- Stored player's connection status
-
setConnected
public void setConnected(boolean connected) Set stored player's connection status- Parameters:
connected- Stored player's connection status
-
getMoney
public double getMoney()Get stored player's amount of money- Returns:
- Stored player's amount of money
-
setMoney
public void setMoney(double money) Set stored player's amount of money- Parameters:
money- Stored player's amount of money
-
getLanguage
Get stored player's language- Returns:
- Stored player's language
-
setLanguage
Set stored player's language- Parameters:
language- Stored player's language
-
getDisciplinaryActions
Get disciplinary actions made against player- Returns:
- Player's disciplinary actions
-
addDisciplinaryAction
Add a disciplinary actions to a player- Parameters:
disciplinaryAction- Player's disciplinary actions
-
removeDisciplinaryAction
Remove a disciplinary actions from a player- Parameters:
disciplinaryAction- Player's disciplinary actions
-
removeExpiredDisciplinaryActions
public void removeExpiredDisciplinaryActions()Remove expired disciplinary actions from a player
-