Bonus changes + Update jooq

This commit is contained in:
Shaun Bennett 2015-08-02 05:17:51 -05:00
parent 11e49b9678
commit db15ffad72
15 changed files with 922 additions and 39 deletions

View File

@ -5,8 +5,6 @@
<excludeFromCompile>
<directory url="file://$PROJECT_DIR$/Nautilus.Game.PvP" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/Mineplex.Game.Clans" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/Nautilus.Game.Arcade" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/Mineplex.Hub" includeSubdirectories="true" />
</excludeFromCompile>
<resourceExtensions />
<wildcardResourcePatterns>

View File

@ -16,7 +16,7 @@ package mineplex.database;
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Account extends org.jooq.impl.SchemaImpl implements java.io.Serializable, java.lang.Cloneable {
private static final long serialVersionUID = 625106486;
private static final long serialVersionUID = 2034846771;
/**
* The reference instance of <code>Account</code>
@ -54,6 +54,7 @@ public class Account extends org.jooq.impl.SchemaImpl implements java.io.Seriali
mineplex.database.tables.AccountTransactions.accountTransactions,
mineplex.database.tables.ActiveTournaments.activeTournaments,
mineplex.database.tables.Bonus.bonus,
mineplex.database.tables.Chatsnap.chatsnap,
mineplex.database.tables.ClanAlliances.clanAlliances,
mineplex.database.tables.ClanEnemies.clanEnemies,
mineplex.database.tables.ClanMember.clanMember,

View File

@ -34,6 +34,7 @@ public class Keys {
public static final org.jooq.Identity<mineplex.database.tables.records.AccountTasksRecord, java.lang.Integer> IDENTITY_accountTasks = Identities0.IDENTITY_accountTasks;
public static final org.jooq.Identity<mineplex.database.tables.records.AccountTransactionsRecord, java.lang.Integer> IDENTITY_accountTransactions = Identities0.IDENTITY_accountTransactions;
public static final org.jooq.Identity<mineplex.database.tables.records.BonusRecord, java.lang.Integer> IDENTITY_bonus = Identities0.IDENTITY_bonus;
public static final org.jooq.Identity<mineplex.database.tables.records.ChatsnapRecord, java.lang.Integer> IDENTITY_chatsnap = Identities0.IDENTITY_chatsnap;
public static final org.jooq.Identity<mineplex.database.tables.records.ClanAlliancesRecord, java.lang.Integer> IDENTITY_clanAlliances = Identities0.IDENTITY_clanAlliances;
public static final org.jooq.Identity<mineplex.database.tables.records.ClanEnemiesRecord, java.lang.Integer> IDENTITY_clanEnemies = Identities0.IDENTITY_clanEnemies;
public static final org.jooq.Identity<mineplex.database.tables.records.ClansRecord, java.lang.Integer> IDENTITY_clans = Identities0.IDENTITY_clans;
@ -83,6 +84,7 @@ public class Keys {
public static final org.jooq.UniqueKey<mineplex.database.tables.records.AccountTransactionsRecord> KEY_accountTransactions_PRIMARY = UniqueKeys0.KEY_accountTransactions_PRIMARY;
public static final org.jooq.UniqueKey<mineplex.database.tables.records.ActiveTournamentsRecord> KEY_activeTournaments_PRIMARY = UniqueKeys0.KEY_activeTournaments_PRIMARY;
public static final org.jooq.UniqueKey<mineplex.database.tables.records.BonusRecord> KEY_bonus_PRIMARY = UniqueKeys0.KEY_bonus_PRIMARY;
public static final org.jooq.UniqueKey<mineplex.database.tables.records.ChatsnapRecord> KEY_chatsnap_PRIMARY = UniqueKeys0.KEY_chatsnap_PRIMARY;
public static final org.jooq.UniqueKey<mineplex.database.tables.records.ClanAlliancesRecord> KEY_clanAlliances_PRIMARY = UniqueKeys0.KEY_clanAlliances_PRIMARY;
public static final org.jooq.UniqueKey<mineplex.database.tables.records.ClanEnemiesRecord> KEY_clanEnemies_PRIMARY = UniqueKeys0.KEY_clanEnemies_PRIMARY;
public static final org.jooq.UniqueKey<mineplex.database.tables.records.ClanEnemiesRecord> KEY_clanEnemies_unique_clanId = UniqueKeys0.KEY_clanEnemies_unique_clanId;
@ -175,6 +177,7 @@ public class Keys {
public static org.jooq.Identity<mineplex.database.tables.records.AccountTasksRecord, java.lang.Integer> IDENTITY_accountTasks = createIdentity(mineplex.database.tables.AccountTasks.accountTasks, mineplex.database.tables.AccountTasks.accountTasks.id);
public static org.jooq.Identity<mineplex.database.tables.records.AccountTransactionsRecord, java.lang.Integer> IDENTITY_accountTransactions = createIdentity(mineplex.database.tables.AccountTransactions.accountTransactions, mineplex.database.tables.AccountTransactions.accountTransactions.id);
public static org.jooq.Identity<mineplex.database.tables.records.BonusRecord, java.lang.Integer> IDENTITY_bonus = createIdentity(mineplex.database.tables.Bonus.bonus, mineplex.database.tables.Bonus.bonus.accountId);
public static org.jooq.Identity<mineplex.database.tables.records.ChatsnapRecord, java.lang.Integer> IDENTITY_chatsnap = createIdentity(mineplex.database.tables.Chatsnap.chatsnap, mineplex.database.tables.Chatsnap.chatsnap.id);
public static org.jooq.Identity<mineplex.database.tables.records.ClanAlliancesRecord, java.lang.Integer> IDENTITY_clanAlliances = createIdentity(mineplex.database.tables.ClanAlliances.clanAlliances, mineplex.database.tables.ClanAlliances.clanAlliances.id);
public static org.jooq.Identity<mineplex.database.tables.records.ClanEnemiesRecord, java.lang.Integer> IDENTITY_clanEnemies = createIdentity(mineplex.database.tables.ClanEnemies.clanEnemies, mineplex.database.tables.ClanEnemies.clanEnemies.id);
public static org.jooq.Identity<mineplex.database.tables.records.ClansRecord, java.lang.Integer> IDENTITY_clans = createIdentity(mineplex.database.tables.Clans.clans, mineplex.database.tables.Clans.clans.id);
@ -222,6 +225,7 @@ public class Keys {
public static final org.jooq.UniqueKey<mineplex.database.tables.records.AccountTransactionsRecord> KEY_accountTransactions_PRIMARY = createUniqueKey(mineplex.database.tables.AccountTransactions.accountTransactions, mineplex.database.tables.AccountTransactions.accountTransactions.id);
public static final org.jooq.UniqueKey<mineplex.database.tables.records.ActiveTournamentsRecord> KEY_activeTournaments_PRIMARY = createUniqueKey(mineplex.database.tables.ActiveTournaments.activeTournaments, mineplex.database.tables.ActiveTournaments.activeTournaments.name);
public static final org.jooq.UniqueKey<mineplex.database.tables.records.BonusRecord> KEY_bonus_PRIMARY = createUniqueKey(mineplex.database.tables.Bonus.bonus, mineplex.database.tables.Bonus.bonus.accountId);
public static final org.jooq.UniqueKey<mineplex.database.tables.records.ChatsnapRecord> KEY_chatsnap_PRIMARY = createUniqueKey(mineplex.database.tables.Chatsnap.chatsnap, mineplex.database.tables.Chatsnap.chatsnap.id);
public static final org.jooq.UniqueKey<mineplex.database.tables.records.ClanAlliancesRecord> KEY_clanAlliances_PRIMARY = createUniqueKey(mineplex.database.tables.ClanAlliances.clanAlliances, mineplex.database.tables.ClanAlliances.clanAlliances.id);
public static final org.jooq.UniqueKey<mineplex.database.tables.records.ClanEnemiesRecord> KEY_clanEnemies_PRIMARY = createUniqueKey(mineplex.database.tables.ClanEnemies.clanEnemies, mineplex.database.tables.ClanEnemies.clanEnemies.id);
public static final org.jooq.UniqueKey<mineplex.database.tables.records.ClanEnemiesRecord> KEY_clanEnemies_unique_clanId = createUniqueKey(mineplex.database.tables.ClanEnemies.clanEnemies, mineplex.database.tables.ClanEnemies.clanEnemies.clanId);

View File

@ -54,6 +54,19 @@ public class Routines {
return p;
}
/**
* Call <code>Account.check_vote</code>
*/
public static mineplex.database.routines.Check_vote callCheckVote(org.jooq.Configuration configuration, java.lang.Integer accountId_in, java.lang.Integer coinsChange, java.lang.Integer gemsChange) {
mineplex.database.routines.Check_vote p = new mineplex.database.routines.Check_vote();
p.setAccountId_in(accountId_in);
p.setCoinsChange(coinsChange);
p.setGemsChange(gemsChange);
p.execute(configuration);
return p;
}
/**
* Call <code>Account.createLeaderboard</code>
*/

View File

@ -91,6 +91,11 @@ public class Tables {
*/
public static final mineplex.database.tables.Bonus bonus = mineplex.database.tables.Bonus.bonus;
/**
* The table Account.chatsnap
*/
public static final mineplex.database.tables.Chatsnap chatsnap = mineplex.database.tables.Chatsnap.chatsnap;
/**
* The table Account.clanAlliances
*/

View File

@ -0,0 +1,93 @@
/**
* This class is generated by jOOQ
*/
package mineplex.database.routines;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.5.2"
},
comments = "This class is generated by jOOQ"
)
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Check_vote extends org.jooq.impl.AbstractRoutine<java.lang.Void> implements java.io.Serializable, java.lang.Cloneable {
private static final long serialVersionUID = 2035299030;
/**
* The parameter <code>Account.check_vote.accountId_in</code>.
*/
public static final org.jooq.Parameter<java.lang.Integer> accountId_in = createParameter("accountId_in", org.jooq.impl.SQLDataType.INTEGER, false);
/**
* The parameter <code>Account.check_vote.coinsChange</code>.
*/
public static final org.jooq.Parameter<java.lang.Integer> coinsChange = createParameter("coinsChange", org.jooq.impl.SQLDataType.INTEGER, false);
/**
* The parameter <code>Account.check_vote.gemsChange</code>.
*/
public static final org.jooq.Parameter<java.lang.Integer> gemsChange = createParameter("gemsChange", org.jooq.impl.SQLDataType.INTEGER, false);
/**
* The parameter <code>Account.check_vote.pass</code>.
*/
public static final org.jooq.Parameter<java.lang.Byte> pass = createParameter("pass", org.jooq.impl.SQLDataType.TINYINT, false);
/**
* The parameter <code>Account.check_vote.outTime</code>.
*/
public static final org.jooq.Parameter<java.sql.Date> outTime = createParameter("outTime", org.jooq.impl.SQLDataType.DATE, false);
/**
* Create a new routine call instance
*/
public Check_vote() {
super("check_vote", mineplex.database.Account.Account);
addInParameter(accountId_in);
addInParameter(coinsChange);
addInParameter(gemsChange);
addOutParameter(pass);
addOutParameter(outTime);
}
/**
* Set the <code>accountId_in</code> parameter IN value to the routine
*/
public void setAccountId_in(java.lang.Integer value) {
setValue(mineplex.database.routines.Check_vote.accountId_in, value);
}
/**
* Set the <code>coinsChange</code> parameter IN value to the routine
*/
public void setCoinsChange(java.lang.Integer value) {
setValue(mineplex.database.routines.Check_vote.coinsChange, value);
}
/**
* Set the <code>gemsChange</code> parameter IN value to the routine
*/
public void setGemsChange(java.lang.Integer value) {
setValue(mineplex.database.routines.Check_vote.gemsChange, value);
}
/**
* Get the <code>pass</code> parameter OUT value from the routine
*/
public java.lang.Byte getPass() {
return getValue(pass);
}
/**
* Get the <code>outTime</code> parameter OUT value from the routine
*/
public java.sql.Date getOutTime() {
return getValue(outTime);
}
}

View File

@ -16,7 +16,7 @@ package mineplex.database.tables;
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class AccountStat extends org.jooq.impl.TableImpl<mineplex.database.tables.records.AccountStatRecord> implements java.io.Serializable, java.lang.Cloneable {
private static final long serialVersionUID = 956897097;
private static final long serialVersionUID = 34581219;
/**
* The reference instance of <code>Account.accountStat</code>
@ -44,7 +44,7 @@ public class AccountStat extends org.jooq.impl.TableImpl<mineplex.database.table
/**
* The column <code>Account.accountStat.value</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.AccountStatRecord, java.lang.Long> value = createField("value", org.jooq.impl.SQLDataType.BIGINT.defaulted(true), this, "");
public final org.jooq.TableField<mineplex.database.tables.records.AccountStatRecord, org.jooq.types.ULong> value = createField("value", org.jooq.impl.SQLDataType.BIGINTUNSIGNED.defaulted(true), this, "");
/**
* Create a <code>Account.accountStat</code> table reference

View File

@ -16,7 +16,7 @@ package mineplex.database.tables;
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Bonus extends org.jooq.impl.TableImpl<mineplex.database.tables.records.BonusRecord> implements java.io.Serializable, java.lang.Cloneable {
private static final long serialVersionUID = -70389593;
private static final long serialVersionUID = -524321170;
/**
* The reference instance of <code>Account.bonus</code>
@ -46,6 +46,36 @@ public class Bonus extends org.jooq.impl.TableImpl<mineplex.database.tables.reco
*/
public final org.jooq.TableField<mineplex.database.tables.records.BonusRecord, java.sql.Date> ranktime = createField("ranktime", org.jooq.impl.SQLDataType.DATE, this, "");
/**
* The column <code>Account.bonus.votetime</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.BonusRecord, java.sql.Date> votetime = createField("votetime", org.jooq.impl.SQLDataType.DATE, this, "");
/**
* The column <code>Account.bonus.dailyStreak</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.BonusRecord, java.lang.Integer> dailyStreak = createField("dailyStreak", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>Account.bonus.maxDailyStreak</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.BonusRecord, java.lang.Integer> maxDailyStreak = createField("maxDailyStreak", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>Account.bonus.voteStreak</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.BonusRecord, java.lang.Integer> voteStreak = createField("voteStreak", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>Account.bonus.maxVoteStreak</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.BonusRecord, java.lang.Integer> maxVoteStreak = createField("maxVoteStreak", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>Account.bonus.tickets</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.BonusRecord, java.lang.Integer> tickets = createField("tickets", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* Create a <code>Account.bonus</code> table reference
*/

View File

@ -0,0 +1,129 @@
/**
* This class is generated by jOOQ
*/
package mineplex.database.tables;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.5.2"
},
comments = "This class is generated by jOOQ"
)
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Chatsnap extends org.jooq.impl.TableImpl<mineplex.database.tables.records.ChatsnapRecord> implements java.io.Serializable, java.lang.Cloneable {
private static final long serialVersionUID = -176946707;
/**
* The reference instance of <code>Account.chatsnap</code>
*/
public static final mineplex.database.tables.Chatsnap chatsnap = new mineplex.database.tables.Chatsnap();
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<mineplex.database.tables.records.ChatsnapRecord> getRecordType() {
return mineplex.database.tables.records.ChatsnapRecord.class;
}
/**
* The column <code>Account.chatsnap.id</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.ChatsnapRecord, java.lang.Integer> id = createField("id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>Account.chatsnap.reporterId</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.ChatsnapRecord, java.lang.Integer> reporterId = createField("reporterId", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>Account.chatsnap.reporteeId</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.ChatsnapRecord, java.lang.Integer> reporteeId = createField("reporteeId", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>Account.chatsnap.time</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.ChatsnapRecord, java.sql.Timestamp> time = createField("time", org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaulted(true), this, "");
/**
* The column <code>Account.chatsnap.status</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.ChatsnapRecord, java.lang.String> status = createField("status", org.jooq.impl.SQLDataType.VARCHAR.length(10).nullable(false).defaulted(true), this, "");
/**
* The column <code>Account.chatsnap.reason</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.ChatsnapRecord, java.lang.String> reason = createField("reason", org.jooq.impl.SQLDataType.CLOB.length(65535).nullable(false), this, "");
/**
* The column <code>Account.chatsnap.data</code>.
*/
public final org.jooq.TableField<mineplex.database.tables.records.ChatsnapRecord, java.lang.String> data = createField("data", org.jooq.impl.SQLDataType.CLOB.length(16777215).nullable(false), this, "");
/**
* Create a <code>Account.chatsnap</code> table reference
*/
public Chatsnap() {
this("chatsnap", null);
}
/**
* Create an aliased <code>Account.chatsnap</code> table reference
*/
public Chatsnap(java.lang.String alias) {
this(alias, mineplex.database.tables.Chatsnap.chatsnap);
}
private Chatsnap(java.lang.String alias, org.jooq.Table<mineplex.database.tables.records.ChatsnapRecord> aliased) {
this(alias, aliased, null);
}
private Chatsnap(java.lang.String alias, org.jooq.Table<mineplex.database.tables.records.ChatsnapRecord> aliased, org.jooq.Field<?>[] parameters) {
super(alias, mineplex.database.Account.Account, aliased, parameters, "");
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Identity<mineplex.database.tables.records.ChatsnapRecord, java.lang.Integer> getIdentity() {
return mineplex.database.Keys.IDENTITY_chatsnap;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.UniqueKey<mineplex.database.tables.records.ChatsnapRecord> getPrimaryKey() {
return mineplex.database.Keys.KEY_chatsnap_PRIMARY;
}
/**
* {@inheritDoc}
*/
@Override
public java.util.List<org.jooq.UniqueKey<mineplex.database.tables.records.ChatsnapRecord>> getKeys() {
return java.util.Arrays.<org.jooq.UniqueKey<mineplex.database.tables.records.ChatsnapRecord>>asList(mineplex.database.Keys.KEY_chatsnap_PRIMARY);
}
/**
* {@inheritDoc}
*/
@Override
public mineplex.database.tables.Chatsnap as(java.lang.String alias) {
return new mineplex.database.tables.Chatsnap(alias, this);
}
/**
* Rename this table
*/
public mineplex.database.tables.Chatsnap rename(java.lang.String name) {
return new mineplex.database.tables.Chatsnap(name, null);
}
}

View File

@ -14,9 +14,9 @@ package mineplex.database.tables.records;
comments = "This class is generated by jOOQ"
)
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class AccountStatRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.AccountStatRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record3<java.lang.Integer, java.lang.Integer, java.lang.Long> {
public class AccountStatRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.AccountStatRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record3<java.lang.Integer, java.lang.Integer, org.jooq.types.ULong> {
private static final long serialVersionUID = 1109290129;
private static final long serialVersionUID = -516667486;
/**
* Setter for <code>Account.accountStat.accountId</code>.
@ -49,15 +49,15 @@ public class AccountStatRecord extends org.jooq.impl.UpdatableRecordImpl<mineple
/**
* Setter for <code>Account.accountStat.value</code>.
*/
public void setValue(java.lang.Long value) {
public void setValue(org.jooq.types.ULong value) {
setValue(2, value);
}
/**
* Getter for <code>Account.accountStat.value</code>.
*/
public java.lang.Long getValue() {
return (java.lang.Long) getValue(2);
public org.jooq.types.ULong getValue() {
return (org.jooq.types.ULong) getValue(2);
}
// -------------------------------------------------------------------------
@ -80,7 +80,7 @@ public class AccountStatRecord extends org.jooq.impl.UpdatableRecordImpl<mineple
* {@inheritDoc}
*/
@Override
public org.jooq.Row3<java.lang.Integer, java.lang.Integer, java.lang.Long> fieldsRow() {
public org.jooq.Row3<java.lang.Integer, java.lang.Integer, org.jooq.types.ULong> fieldsRow() {
return (org.jooq.Row3) super.fieldsRow();
}
@ -88,7 +88,7 @@ public class AccountStatRecord extends org.jooq.impl.UpdatableRecordImpl<mineple
* {@inheritDoc}
*/
@Override
public org.jooq.Row3<java.lang.Integer, java.lang.Integer, java.lang.Long> valuesRow() {
public org.jooq.Row3<java.lang.Integer, java.lang.Integer, org.jooq.types.ULong> valuesRow() {
return (org.jooq.Row3) super.valuesRow();
}
@ -112,7 +112,7 @@ public class AccountStatRecord extends org.jooq.impl.UpdatableRecordImpl<mineple
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Long> field3() {
public org.jooq.Field<org.jooq.types.ULong> field3() {
return mineplex.database.tables.AccountStat.accountStat.value;
}
@ -136,7 +136,7 @@ public class AccountStatRecord extends org.jooq.impl.UpdatableRecordImpl<mineple
* {@inheritDoc}
*/
@Override
public java.lang.Long value3() {
public org.jooq.types.ULong value3() {
return getValue();
}
@ -162,7 +162,7 @@ public class AccountStatRecord extends org.jooq.impl.UpdatableRecordImpl<mineple
* {@inheritDoc}
*/
@Override
public AccountStatRecord value3(java.lang.Long value) {
public AccountStatRecord value3(org.jooq.types.ULong value) {
setValue(value);
return this;
}
@ -171,7 +171,7 @@ public class AccountStatRecord extends org.jooq.impl.UpdatableRecordImpl<mineple
* {@inheritDoc}
*/
@Override
public AccountStatRecord values(java.lang.Integer value1, java.lang.Integer value2, java.lang.Long value3) {
public AccountStatRecord values(java.lang.Integer value1, java.lang.Integer value2, org.jooq.types.ULong value3) {
return this;
}
@ -189,7 +189,7 @@ public class AccountStatRecord extends org.jooq.impl.UpdatableRecordImpl<mineple
/**
* Create a detached, initialised AccountStatRecord
*/
public AccountStatRecord(java.lang.Integer accountId, java.lang.Integer statId, java.lang.Long value) {
public AccountStatRecord(java.lang.Integer accountId, java.lang.Integer statId, org.jooq.types.ULong value) {
super(mineplex.database.tables.AccountStat.accountStat);
setValue(0, accountId);

View File

@ -14,9 +14,9 @@ package mineplex.database.tables.records;
comments = "This class is generated by jOOQ"
)
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class BonusRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.BonusRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record3<java.lang.Integer, java.sql.Timestamp, java.sql.Date> {
public class BonusRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.BonusRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record9<java.lang.Integer, java.sql.Timestamp, java.sql.Date, java.sql.Date, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer> {
private static final long serialVersionUID = -64019858;
private static final long serialVersionUID = -785434679;
/**
* Setter for <code>Account.bonus.accountId</code>.
@ -60,6 +60,90 @@ public class BonusRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.data
return (java.sql.Date) getValue(2);
}
/**
* Setter for <code>Account.bonus.votetime</code>.
*/
public void setVotetime(java.sql.Date value) {
setValue(3, value);
}
/**
* Getter for <code>Account.bonus.votetime</code>.
*/
public java.sql.Date getVotetime() {
return (java.sql.Date) getValue(3);
}
/**
* Setter for <code>Account.bonus.dailyStreak</code>.
*/
public void setDailyStreak(java.lang.Integer value) {
setValue(4, value);
}
/**
* Getter for <code>Account.bonus.dailyStreak</code>.
*/
public java.lang.Integer getDailyStreak() {
return (java.lang.Integer) getValue(4);
}
/**
* Setter for <code>Account.bonus.maxDailyStreak</code>.
*/
public void setMaxDailyStreak(java.lang.Integer value) {
setValue(5, value);
}
/**
* Getter for <code>Account.bonus.maxDailyStreak</code>.
*/
public java.lang.Integer getMaxDailyStreak() {
return (java.lang.Integer) getValue(5);
}
/**
* Setter for <code>Account.bonus.voteStreak</code>.
*/
public void setVoteStreak(java.lang.Integer value) {
setValue(6, value);
}
/**
* Getter for <code>Account.bonus.voteStreak</code>.
*/
public java.lang.Integer getVoteStreak() {
return (java.lang.Integer) getValue(6);
}
/**
* Setter for <code>Account.bonus.maxVoteStreak</code>.
*/
public void setMaxVoteStreak(java.lang.Integer value) {
setValue(7, value);
}
/**
* Getter for <code>Account.bonus.maxVoteStreak</code>.
*/
public java.lang.Integer getMaxVoteStreak() {
return (java.lang.Integer) getValue(7);
}
/**
* Setter for <code>Account.bonus.tickets</code>.
*/
public void setTickets(java.lang.Integer value) {
setValue(8, value);
}
/**
* Getter for <code>Account.bonus.tickets</code>.
*/
public java.lang.Integer getTickets() {
return (java.lang.Integer) getValue(8);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
@ -73,23 +157,23 @@ public class BonusRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.data
}
// -------------------------------------------------------------------------
// Record3 type implementation
// Record9 type implementation
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row3<java.lang.Integer, java.sql.Timestamp, java.sql.Date> fieldsRow() {
return (org.jooq.Row3) super.fieldsRow();
public org.jooq.Row9<java.lang.Integer, java.sql.Timestamp, java.sql.Date, java.sql.Date, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer> fieldsRow() {
return (org.jooq.Row9) super.fieldsRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row3<java.lang.Integer, java.sql.Timestamp, java.sql.Date> valuesRow() {
return (org.jooq.Row3) super.valuesRow();
public org.jooq.Row9<java.lang.Integer, java.sql.Timestamp, java.sql.Date, java.sql.Date, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer> valuesRow() {
return (org.jooq.Row9) super.valuesRow();
}
/**
@ -116,6 +200,54 @@ public class BonusRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.data
return mineplex.database.tables.Bonus.bonus.ranktime;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.sql.Date> field4() {
return mineplex.database.tables.Bonus.bonus.votetime;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field5() {
return mineplex.database.tables.Bonus.bonus.dailyStreak;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field6() {
return mineplex.database.tables.Bonus.bonus.maxDailyStreak;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field7() {
return mineplex.database.tables.Bonus.bonus.voteStreak;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field8() {
return mineplex.database.tables.Bonus.bonus.maxVoteStreak;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field9() {
return mineplex.database.tables.Bonus.bonus.tickets;
}
/**
* {@inheritDoc}
*/
@ -140,6 +272,54 @@ public class BonusRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.data
return getRanktime();
}
/**
* {@inheritDoc}
*/
@Override
public java.sql.Date value4() {
return getVotetime();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value5() {
return getDailyStreak();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value6() {
return getMaxDailyStreak();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value7() {
return getVoteStreak();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value8() {
return getMaxVoteStreak();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value9() {
return getTickets();
}
/**
* {@inheritDoc}
*/
@ -171,7 +351,61 @@ public class BonusRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.data
* {@inheritDoc}
*/
@Override
public BonusRecord values(java.lang.Integer value1, java.sql.Timestamp value2, java.sql.Date value3) {
public BonusRecord value4(java.sql.Date value) {
setVotetime(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public BonusRecord value5(java.lang.Integer value) {
setDailyStreak(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public BonusRecord value6(java.lang.Integer value) {
setMaxDailyStreak(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public BonusRecord value7(java.lang.Integer value) {
setVoteStreak(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public BonusRecord value8(java.lang.Integer value) {
setMaxVoteStreak(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public BonusRecord value9(java.lang.Integer value) {
setTickets(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public BonusRecord values(java.lang.Integer value1, java.sql.Timestamp value2, java.sql.Date value3, java.sql.Date value4, java.lang.Integer value5, java.lang.Integer value6, java.lang.Integer value7, java.lang.Integer value8, java.lang.Integer value9) {
return this;
}
@ -189,11 +423,17 @@ public class BonusRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.data
/**
* Create a detached, initialised BonusRecord
*/
public BonusRecord(java.lang.Integer accountId, java.sql.Timestamp dailytime, java.sql.Date ranktime) {
public BonusRecord(java.lang.Integer accountId, java.sql.Timestamp dailytime, java.sql.Date ranktime, java.sql.Date votetime, java.lang.Integer dailyStreak, java.lang.Integer maxDailyStreak, java.lang.Integer voteStreak, java.lang.Integer maxVoteStreak, java.lang.Integer tickets) {
super(mineplex.database.tables.Bonus.bonus);
setValue(0, accountId);
setValue(1, dailytime);
setValue(2, ranktime);
setValue(3, votetime);
setValue(4, dailyStreak);
setValue(5, maxDailyStreak);
setValue(6, voteStreak);
setValue(7, maxVoteStreak);
setValue(8, tickets);
}
}

View File

@ -0,0 +1,359 @@
/**
* This class is generated by jOOQ
*/
package mineplex.database.tables.records;
/**
* This class is generated by jOOQ.
*/
@javax.annotation.Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.5.2"
},
comments = "This class is generated by jOOQ"
)
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class ChatsnapRecord extends org.jooq.impl.UpdatableRecordImpl<mineplex.database.tables.records.ChatsnapRecord> implements java.io.Serializable, java.lang.Cloneable, org.jooq.Record7<java.lang.Integer, java.lang.Integer, java.lang.Integer, java.sql.Timestamp, java.lang.String, java.lang.String, java.lang.String> {
private static final long serialVersionUID = 2087133341;
/**
* Setter for <code>Account.chatsnap.id</code>.
*/
public void setId(java.lang.Integer value) {
setValue(0, value);
}
/**
* Getter for <code>Account.chatsnap.id</code>.
*/
public java.lang.Integer getId() {
return (java.lang.Integer) getValue(0);
}
/**
* Setter for <code>Account.chatsnap.reporterId</code>.
*/
public void setReporterId(java.lang.Integer value) {
setValue(1, value);
}
/**
* Getter for <code>Account.chatsnap.reporterId</code>.
*/
public java.lang.Integer getReporterId() {
return (java.lang.Integer) getValue(1);
}
/**
* Setter for <code>Account.chatsnap.reporteeId</code>.
*/
public void setReporteeId(java.lang.Integer value) {
setValue(2, value);
}
/**
* Getter for <code>Account.chatsnap.reporteeId</code>.
*/
public java.lang.Integer getReporteeId() {
return (java.lang.Integer) getValue(2);
}
/**
* Setter for <code>Account.chatsnap.time</code>.
*/
public void setTime(java.sql.Timestamp value) {
setValue(3, value);
}
/**
* Getter for <code>Account.chatsnap.time</code>.
*/
public java.sql.Timestamp getTime() {
return (java.sql.Timestamp) getValue(3);
}
/**
* Setter for <code>Account.chatsnap.status</code>.
*/
public void setStatus(java.lang.String value) {
setValue(4, value);
}
/**
* Getter for <code>Account.chatsnap.status</code>.
*/
public java.lang.String getStatus() {
return (java.lang.String) getValue(4);
}
/**
* Setter for <code>Account.chatsnap.reason</code>.
*/
public void setReason(java.lang.String value) {
setValue(5, value);
}
/**
* Getter for <code>Account.chatsnap.reason</code>.
*/
public java.lang.String getReason() {
return (java.lang.String) getValue(5);
}
/**
* Setter for <code>Account.chatsnap.data</code>.
*/
public void setData(java.lang.String value) {
setValue(6, value);
}
/**
* Getter for <code>Account.chatsnap.data</code>.
*/
public java.lang.String getData() {
return (java.lang.String) getValue(6);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Record1<java.lang.Integer> key() {
return (org.jooq.Record1) super.key();
}
// -------------------------------------------------------------------------
// Record7 type implementation
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row7<java.lang.Integer, java.lang.Integer, java.lang.Integer, java.sql.Timestamp, java.lang.String, java.lang.String, java.lang.String> fieldsRow() {
return (org.jooq.Row7) super.fieldsRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row7<java.lang.Integer, java.lang.Integer, java.lang.Integer, java.sql.Timestamp, java.lang.String, java.lang.String, java.lang.String> valuesRow() {
return (org.jooq.Row7) super.valuesRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field1() {
return mineplex.database.tables.Chatsnap.chatsnap.id;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field2() {
return mineplex.database.tables.Chatsnap.chatsnap.reporterId;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field3() {
return mineplex.database.tables.Chatsnap.chatsnap.reporteeId;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.sql.Timestamp> field4() {
return mineplex.database.tables.Chatsnap.chatsnap.time;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field5() {
return mineplex.database.tables.Chatsnap.chatsnap.status;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field6() {
return mineplex.database.tables.Chatsnap.chatsnap.reason;
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.String> field7() {
return mineplex.database.tables.Chatsnap.chatsnap.data;
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value1() {
return getId();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value2() {
return getReporterId();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value3() {
return getReporteeId();
}
/**
* {@inheritDoc}
*/
@Override
public java.sql.Timestamp value4() {
return getTime();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.String value5() {
return getStatus();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.String value6() {
return getReason();
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.String value7() {
return getData();
}
/**
* {@inheritDoc}
*/
@Override
public ChatsnapRecord value1(java.lang.Integer value) {
setId(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public ChatsnapRecord value2(java.lang.Integer value) {
setReporterId(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public ChatsnapRecord value3(java.lang.Integer value) {
setReporteeId(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public ChatsnapRecord value4(java.sql.Timestamp value) {
setTime(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public ChatsnapRecord value5(java.lang.String value) {
setStatus(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public ChatsnapRecord value6(java.lang.String value) {
setReason(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public ChatsnapRecord value7(java.lang.String value) {
setData(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public ChatsnapRecord values(java.lang.Integer value1, java.lang.Integer value2, java.lang.Integer value3, java.sql.Timestamp value4, java.lang.String value5, java.lang.String value6, java.lang.String value7) {
return this;
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached ChatsnapRecord
*/
public ChatsnapRecord() {
super(mineplex.database.tables.Chatsnap.chatsnap);
}
/**
* Create a detached, initialised ChatsnapRecord
*/
public ChatsnapRecord(java.lang.Integer id, java.lang.Integer reporterId, java.lang.Integer reporteeId, java.sql.Timestamp time, java.lang.String status, java.lang.String reason, java.lang.String data) {
super(mineplex.database.tables.Chatsnap.chatsnap);
setValue(0, id);
setValue(1, reporterId);
setValue(2, reporteeId);
setValue(3, time);
setValue(4, status);
setValue(5, reason);
setValue(6, data);
}
}

View File

@ -93,6 +93,11 @@ public class BonusAmount
return getGems() + getBonusGems();
}
public boolean isGreaterThanZero()
{
return _bonusCoins > 0 || _coins > 0 || _bonusGems > 0 || _gems > 0 || _gold > 0 || _bonusGold > 0;
}
public void addLore(List<String> lore)
{
addLore(lore, getCoins(), getBonusCoins(), "Coins");
@ -104,9 +109,9 @@ public class BonusAmount
{
if (amount > 0)
{
lore.add(C.cYellow + "Reward " + C.cWhite + amount + " " + suffix);
lore.add(C.cYellow + "Reward: " + C.cWhite + amount + " " + suffix);
if (bonus > 0)
lore.add(C.cYellow + "Streak Bonus " + C.cWhite + bonus + " " + suffix);
lore.add(C.cYellow + "Streak Bonus: " + C.cWhite + bonus + " " + suffix);
lore.add(" ");
}
}

View File

@ -142,7 +142,7 @@ public class BonusRepository extends RepositoryBase {
return;
}
final int accountId = _manager.getClientManager().Get(player).getAccountId();
final int coins = _manager.getRankBonusAmount(player);
final int coins = _manager.getRankBonusAmount(player).getCoins();
final int gems = 0;
@ -228,7 +228,7 @@ public class BonusRepository extends RepositoryBase {
return;
}
final int accountId = _manager.getClientManager().Get(player).getAccountId();
final int coins = _manager.getRankBonusAmount(player);
final int coins = _manager.getRankBonusAmount(player).getCoins();
final int gems = 0;

View File

@ -58,7 +58,7 @@ public class RankBonusButton implements GuiItem, Listener {
@Override
public void setup()
{
if (_bonusManager.getRankBonusAmount(getPlayer()) > 0)
if (_bonusManager.getRankBonusAmount(getPlayer()).isGreaterThanZero())
{
this.hasRank = true;
this.bonusTime = _bonusManager.nextRankBonus(getPlayer());
@ -143,7 +143,7 @@ public class RankBonusButton implements GuiItem, Listener {
public void setItem()
{
ArrayList<String> lore = new ArrayList<String>;
ArrayList<String> lore = new ArrayList<String>();
Material material;
String itemName;
byte data = 0;
@ -163,12 +163,18 @@ public class RankBonusButton implements GuiItem, Listener {
if (isAvailable())
{
material = Material.ENDER_CHEST;
itemName = C.cGreen + C.Bold + "Click to Claim!";
itemName = C.cGreen + C.Bold + "Rank Bonus";
lore.add(" ");
lore.add(ChatColor.RESET + "Click to Claim!");
}
else
{
material = Material.REDSTONE_BLOCK;
itemName = C.cRed + C.Bold + "Next reward in " + UtilTime.convertString(timeLeft(), 0, TimeUnit.FIT) + "!";
itemName = C.cRed + C.Bold + "Rank Bonus";
lore.add(" ");
lore.add(ChatColor.RESET + "Next reward in " + UtilTime.convertString(timeLeft(), 0, TimeUnit.FIT) + "!");
}
lore.add(" ");
@ -178,11 +184,11 @@ public class RankBonusButton implements GuiItem, Listener {
BonusAmount bonusAmount = _bonusManager.getRankBonusAmount(_player);
bonusAmount.addLore(lore);
lore.add(C.cYellow + "Current Streak " + C.cWhite + client.getRankStreak());
lore.add(C.cYellow + "Highest Streak " + C.cWhite + client.getMaxRankStreak());
lore.add(C.cYellow + "Current Streak: " + C.cWhite + client.getRankStreak());
lore.add(C.cYellow + "Highest Streak: " + C.cWhite + client.getMaxRankStreak());
lore.add(" ");
lore.add(C.cYellow + "Record Holder " + C.cWhite + "Phinary");
lore.add(C.cYellow + "Streak " + C.cWhite + "420");
lore.add(C.cYellow + "Record Holder: " + C.cWhite + "Phinary");
lore.add(C.cYellow + "Streak: " + C.cWhite + "420");
_item = ItemStackFactory.Instance.CreateStack(Material.ENDER_CHEST, (byte) 0, 1, ChatColor.GREEN + "Click to collect rank bonus!");
}