Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: birthday card #132

Merged
merged 83 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 82 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
2ab8304
基礎
TATCHAN0825 Oct 8, 2024
f0f2950
db基礎
TATCHAN0825 Oct 8, 2024
06b5b7e
忘れ物
TATCHAN0825 Oct 8, 2024
2d5e9d9
;忘れてました
TATCHAN0825 Oct 8, 2024
2995a16
外部キーなんて知りません
TATCHAN0825 Oct 8, 2024
657125f
忘れてました
TATCHAN0825 Oct 8, 2024
15ef283
忘れてました
TATCHAN0825 Oct 8, 2024
188e4b3
一旦カレンダーぽいの作った
TATCHAN0825 Oct 8, 2024
d0fa8f9
気づいたら5時間開発してました
TATCHAN0825 Oct 8, 2024
ec9322c
db上はbirthday_datasになってたので修正
TATCHAN0825 Oct 10, 2024
af0722c
モデル上はユニークだったのにsql分では適切じゃなかったため修正
TATCHAN0825 Oct 10, 2024
49b7391
変更忘れ
TATCHAN0825 Oct 10, 2024
e96d198
普通に考えてuuidで探せないの不便すぎるので追加
TATCHAN0825 Oct 10, 2024
7007615
listだから存在しなかったらnullにはならなくemptyなため
TATCHAN0825 Oct 10, 2024
3a4109e
db上ではbirthday_data_idになってたのにモデル上では違ったため変更
TATCHAN0825 Oct 10, 2024
052c0ba
基本コマンドの完成
TATCHAN0825 Oct 10, 2024
bb5c1bd
エラー出たので修正
TATCHAN0825 Oct 10, 2024
be2b2de
細かいフォーマットの修正
TATCHAN0825 Oct 10, 2024
7494738
細かいフォーマットの修正
TATCHAN0825 Oct 10, 2024
1cc50d2
軽いリファクタリング
TATCHAN0825 Oct 10, 2024
86efe34
誕生日を登録してるプレイヤーのみ予測に出すように
TATCHAN0825 Oct 10, 2024
2f49a87
とりあえず仮のjoinEvent
TATCHAN0825 Oct 10, 2024
3a14383
自分自身の誕生日でも催促メッセージが送られるのを修正
TATCHAN0825 Oct 10, 2024
4d7255b
寝ぼけてた
TATCHAN0825 Oct 11, 2024
b6b7ba1
ギフト受け取りフラグ
TATCHAN0825 Oct 11, 2024
0ef5fd0
uuidから取得するように変更
TATCHAN0825 Oct 11, 2024
c9baafd
PageJsonutils作成
TATCHAN0825 Oct 12, 2024
33dfc05
誕生日メッセージ送信機能、受取機能完成
TATCHAN0825 Oct 12, 2024
0330a26
わかりやすくした
TATCHAN0825 Oct 12, 2024
d036248
消し忘れ
TATCHAN0825 Oct 12, 2024
9bf4850
消し忘れ
TATCHAN0825 Oct 12, 2024
71ad1e5
なんか動かないって思ってたらnew忘れてた
TATCHAN0825 Oct 12, 2024
2e6b295
ぬるぽ
TATCHAN0825 Oct 12, 2024
7092a26
オフラインプレイヤー対応
TATCHAN0825 Oct 12, 2024
de75610
バースデーメッセージがなくても寂しくないように
TATCHAN0825 Oct 12, 2024
e5d8780
リファクタリング
TATCHAN0825 Oct 12, 2024
4cff743
update忘れてた
TATCHAN0825 Oct 12, 2024
e5ea9ea
お誕生日メッセージと最速メッセージ
TATCHAN0825 Oct 12, 2024
5f7524d
デバック用のメッセージ削除
TATCHAN0825 Oct 12, 2024
beb4786
メッセージ送信時に本を削除するように
TATCHAN0825 Oct 12, 2024
60d140f
giftしたときにお誕生日か確認
TATCHAN0825 Oct 12, 2024
9e3d862
条件間違えていた
TATCHAN0825 Oct 12, 2024
432e15b
よくわからんthrows削除
TATCHAN0825 Oct 12, 2024
ea90387
バースデーメッセージをリセット
TATCHAN0825 Oct 12, 2024
ab3a3ae
リファクタリング
TATCHAN0825 Oct 12, 2024
af69a38
1日後になったらギフト受け取りりせっと
TATCHAN0825 Oct 12, 2024
2987037
リファクタリング
TATCHAN0825 Oct 13, 2024
3009e48
sendとget自分自身ではできないように
TATCHAN0825 Oct 13, 2024
4db3628
誤って削除しないように確認メッセージを出すように
TATCHAN0825 Oct 13, 2024
a7a317d
全体的にユーザーフレンドリーに
TATCHAN0825 Oct 13, 2024
5995fb2
引数の間違え以外trueに
TATCHAN0825 Oct 13, 2024
00c2db9
リファクタリング
TATCHAN0825 Oct 13, 2024
f7274d3
メッセージ統一
TATCHAN0825 Oct 13, 2024
1725129
スペースミスった
TATCHAN0825 Oct 15, 2024
cc54593
なかった場合からの配列を返すように変更
TATCHAN0825 Oct 15, 2024
93e401e
複数箇所で使ってたのでUtilsに
TATCHAN0825 Oct 15, 2024
7de9ae0
BirthdayCardMenu作成
TATCHAN0825 Oct 15, 2024
0f123dd
BirthdayCalendar作成
TATCHAN0825 Oct 15, 2024
3218e26
BirthdayCalendarMenu作成
TATCHAN0825 Oct 15, 2024
3076478
BirthdayPlayerList作成
TATCHAN0825 Oct 15, 2024
96f59df
消し忘れ
TATCHAN0825 Oct 15, 2024
eacde7f
BirthdayCardMenu呼び出し
TATCHAN0825 Oct 15, 2024
1f19cd0
getPlayerNameByUuid使うように
TATCHAN0825 Oct 15, 2024
11eb8cf
バグの修正
TATCHAN0825 Oct 15, 2024
a49407f
キャッシュするように
TATCHAN0825 Oct 15, 2024
05a50bc
きれいにした
TATCHAN0825 Oct 15, 2024
0a6d8a4
Merge branch 'main' of https://github.com/SpaceServerUniverse/Univers…
TATCHAN0825 Oct 15, 2024
a42e83a
dbを完成日に
TATCHAN0825 Oct 15, 2024
3b023ec
Update src/main/java/space/yurisi/universecorev2/database/DatabaseMan…
TATCHAN0825 Oct 15, 2024
6b96e37
Update src/main/java/space/yurisi/universecorev2/database/models/Birt…
TATCHAN0825 Oct 15, 2024
7234137
Update src/main/java/space/yurisi/universecorev2/database/repositorie…
TATCHAN0825 Oct 15, 2024
9547be9
Update src/main/java/space/yurisi/universecorev2/database/repositorie…
TATCHAN0825 Oct 15, 2024
5aa7c80
JVMに対してのimport文*で使うのをやめる
TATCHAN0825 Oct 15, 2024
2480ebf
Update src/main/resources/plugin.yml
TATCHAN0825 Oct 15, 2024
9efdfe0
Merge branch 'dev/tatchan-birthday-card' of https://github.com/SpaceS…
TATCHAN0825 Oct 15, 2024
a9c9bf8
.setDisplayName("") 削除
TATCHAN0825 Oct 15, 2024
94ddba4
変更忘れてました
TATCHAN0825 Oct 15, 2024
232f86c
Update src/main/java/space/yurisi/universecorev2/database/repositorie…
TATCHAN0825 Oct 15, 2024
ce65faa
参加時にお誕生日カードを受け取るように
TATCHAN0825 Oct 15, 2024
1f570ab
渡すときにインベントリーチェック
TATCHAN0825 Oct 15, 2024
c0e5c63
ユーザーフレンドリーに
TATCHAN0825 Oct 15, 2024
92dffaf
Merge branch 'main' of https://github.com/SpaceServerUniverse/Univers…
TATCHAN0825 Oct 15, 2024
61d0c95
Update src/main/resources/plugin.yml
m1sk9 Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ private Configuration registerAnnotatedClasses(Configuration configuration) {
.addAnnotatedClass(Market.class)
.addAnnotatedClass(ChestShop.class)
.addAnnotatedClass(Ammo.class)
.addAnnotatedClass(ReceiveBox.class);
.addAnnotatedClass(ReceiveBox.class)
.addAnnotatedClass(BirthdayData.class)
.addAnnotatedClass(BirthdayMessages.class);
}

private Configuration registerProperties(Configuration configuration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class DatabaseManager {
private final CustomNameRepository customNameRepository;
private final MarketRepository marketRepository;
private final ReceiveBoxRepository receiveBoxRepository;
private final BirthdayCardRepository birthdayCardRepository;

public DatabaseManager(SessionFactory sessionFactory) {
this.userRepository = new UserRepository(sessionFactory);
Expand All @@ -53,6 +54,7 @@ public DatabaseManager(SessionFactory sessionFactory) {
this.chestShopRepository = new ChestShopRepository(sessionFactory);
this.ammoRepository = new AmmoRepository(sessionFactory);
this.receiveBoxRepository = new ReceiveBoxRepository(sessionFactory);
this.birthdayCardRepository = new BirthdayCardRepository(sessionFactory);
}

/**
Expand Down Expand Up @@ -213,14 +215,16 @@ public PlayerCountRepository getPlayerCountRepository() {
*
* @return MarketRepository
*/
public MarketRepository getMarketRepository() { return marketRepository; }
public MarketRepository getMarketRepository() {
return marketRepository;
}

/**
* 称号リポジトリを取得
*
* @return PlayerNormalLevelRepository
*/
public CustomNameRepository getCustomNameRepository(){
public CustomNameRepository getCustomNameRepository() {
return customNameRepository;
}

Expand Down Expand Up @@ -249,4 +253,13 @@ public AmmoRepository getAmmoRepository() {
public ReceiveBoxRepository getReceiveBoxRepository(){
return receiveBoxRepository;
}

/**
* バースデーカードリポジトリを取得
*
* @return BirthdayCardRepository
*/
public BirthdayCardRepository getBirthdayCardRepository() {
return birthdayCardRepository;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
package space.yurisi.universecorev2.database.models;

import jakarta.persistence.*;
import org.hibernate.annotations.CreationTimestamp;

import java.util.Date;
import java.util.Set;

@Entity
@Table(name = "birthday_datas")
public class BirthdayData {
@Id
@Column(name = "id", unique = true, columnDefinition = "BIGINT UNSIGNED")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(name = "uuid", unique = true, columnDefinition = "VARCHAR(255) NOT NULL")
private String uuid;

@Column(name = "month")
private int month;

@Column(name = "day")
private int day;

@Column(name = "gift_received", nullable = false)
private boolean giftReceived;

@CreationTimestamp
@Column(name = "created_at", nullable = false)
private Date createdAt;

public BirthdayData(
Long id,
String uuid,
int month,
int day,
boolean giftReceived
) {
this.id = id;
this.uuid = uuid;
this.month = month;
this.day = day;
this.giftReceived = giftReceived;
}

public BirthdayData() {
}

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getUuid() {
return uuid;
}

public void setUuid(String uuid) {
this.uuid = uuid;
}

public int getMonth() {
return month;

}

public void setMonth(int month) {
this.month = month;
}

public int getDay() {
return day;
}

public void setDay(int day) {
this.day = day;
}

public boolean isGiftReceived() {
return giftReceived;
}

public void setGiftReceived(boolean giftReceived) {
this.giftReceived = giftReceived;
}

public Date getCreateAt() {
return createdAt;
}

public void setCreateAt(Date createAt) {
this.createdAt = createAt;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
package space.yurisi.universecorev2.database.models;

import jakarta.persistence.*;
import org.hibernate.annotations.CreationTimestamp;

import java.util.Date;

@Entity
@Table(name = "birthday_messages")
public class BirthdayMessages {
@Id
@Column(name = "id", unique = true, columnDefinition = "BIGINT UNSIGNED")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(name = "birthday_data_id")
private Long birthdayDataId;

@Column(name = "uuid")
private String uuid;

@Column(name = "message")
private String message;

@CreationTimestamp
@Column(name = "created_at", nullable = false)
private Date createdAt;

public BirthdayMessages(
Long birthdayDataId,
String uuid,
String message
) {
this.birthdayDataId = birthdayDataId;
this.uuid = uuid;
this.message = message;
}

public BirthdayMessages() {

}

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public Long getBirthdayDataId() {
return birthdayDataId;
}

public void setBirthdayData(Long birthdayData) {
this.birthdayDataId = birthdayData;
}

public String getUuid() {
return uuid;
}

public void setUuid(String uuid) {
this.uuid = uuid;
}

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}

public Date getCreatedAt() {
return createdAt;
}

}
Loading