-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update project configurations, user data handling, and text resources
Refactored project to JDK 20, modified user consent actions, enhanced user data storage, and fixed 'hootenanny' spelling inconsistencies. Added new data management classes and adjusted localization files accordingly.
- Loading branch information
1 parent
4570de6
commit f87293b
Showing
31 changed files
with
170 additions
and
57 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file modified
BIN
+313 Bytes
(110%)
build/classes/java/main/com/severalcircles/flames/data/user/FlamesUser.class
Binary file not shown.
Binary file modified
BIN
+155 Bytes
(100%)
build/classes/java/main/com/severalcircles/flames/events/MessageEvent.class
Binary file not shown.
Binary file not shown.
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
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
10 changes: 10 additions & 0 deletions
10
src/main/java/com/severalcircles/flames/data/server/HootenannyDataManager.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,10 @@ | ||
/* | ||
* Copyright (c) 2024 Several Circles. | ||
*/ | ||
|
||
package com.severalcircles.flames.data.server; | ||
|
||
public class HootenannyDataManager { | ||
|
||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/severalcircles/flames/data/server/HootenannyTitle.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,17 @@ | ||
/* | ||
* Copyright (c) 2024 Several Circles. | ||
*/ | ||
|
||
package com.severalcircles.flames.data.server; | ||
|
||
public enum HootenannyTitle { | ||
SERVER_FAN(0), SERVER_ENJOYER(100), SERVER_FIEND(500), SERVER_DEFENDER(1000), SERVER_CHAMPION(2500), SERVER_RULER(5000) | ||
; | ||
final int scoreThresh; | ||
HootenannyTitle(int scoreThresh) { | ||
this.scoreThresh = scoreThresh; | ||
} | ||
public int getScoreThresh() { | ||
return scoreThresh; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
src/main/java/com/severalcircles/flames/data/server/ServerHootenannyData.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,43 @@ | ||
/* | ||
* Copyright (c) 2024 Several Circles. | ||
*/ | ||
|
||
package com.severalcircles.flames.data.server; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.Properties; | ||
|
||
public class ServerHootenannyData { | ||
final Map<String, Integer> userScores = new HashMap<>(); | ||
public void addUser(String userId) { | ||
userScores.put(userId, 0); | ||
} | ||
public void addScore(String userId, int score) { | ||
if (!userScores.containsKey(userId)) addUser(userId); | ||
userScores.put(userId, userScores.get(userId) + score); | ||
} | ||
HootenannyTitle getTitle(String userId) { | ||
int score = userScores.get(userId); | ||
HootenannyTitle title = HootenannyTitle.SERVER_FAN; | ||
for (HootenannyTitle value : HootenannyTitle.values()) { | ||
if (score >= value.getScoreThresh()) { | ||
title = value; | ||
} | ||
} | ||
return title; | ||
} | ||
public int getScore(String userId) { | ||
return userScores.get(userId); | ||
} | ||
public void setScore(String userId, int score) { | ||
userScores.put(userId, score); | ||
} | ||
public Properties createData() { | ||
Properties data = new Properties(); | ||
for (String userId : userScores.keySet()) { | ||
data.put(userId, String.valueOf(userScores.get(userId))); | ||
} | ||
return data; | ||
} | ||
} |
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
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
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
Oops, something went wrong.