mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-29 03:36:42 +00:00
Some updates
- Added Reddit flair sync - Removed magical saddle because the stacking potato does the same thing - Some internal improvements - Fixed bug where if a service throws an error while starting or stopping it breaks the entire plugin
This commit is contained in:
@ -50,6 +50,9 @@ public class PlayerData
|
||||
private int totalVotes;
|
||||
@Setter
|
||||
private boolean displayDiscord = true;
|
||||
@Getter
|
||||
@Setter
|
||||
private String redditUsername;
|
||||
|
||||
public PlayerData(ResultSet resultSet)
|
||||
{
|
||||
@ -73,6 +76,7 @@ public class PlayerData
|
||||
items.addAll(FUtil.stringToList(resultSet.getString("items")));
|
||||
totalVotes = resultSet.getInt("total_votes");
|
||||
displayDiscord = resultSet.getBoolean("display_discord");
|
||||
redditUsername = resultSet.getString("reddit_username");
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
@ -108,7 +112,8 @@ public class PlayerData
|
||||
.append("- Display Discord: ").append(displayDiscord).append("\n")
|
||||
.append("- Tag: ").append(FUtil.colorize(tag)).append(ChatColor.GRAY).append("\n")
|
||||
.append("- Ride Mode: ").append(rideMode).append("\n")
|
||||
.append("- Backup Codes: ").append(backupCodes.size()).append("/10").append("\n");
|
||||
.append("- Backup Codes: ").append(backupCodes.size()).append("/10").append("\n")
|
||||
.append("- Reddit Username: ").append(redditUsername);
|
||||
|
||||
return output.toString();
|
||||
}
|
||||
@ -244,6 +249,7 @@ public class PlayerData
|
||||
put("items", FUtil.listToString(items));
|
||||
put("total_votes", totalVotes);
|
||||
put("display_discord", displayDiscord);
|
||||
put("reddit_username", redditUsername);
|
||||
}};
|
||||
return map;
|
||||
}
|
||||
|
@ -178,15 +178,7 @@ public class PlayerList extends FreedomService
|
||||
|
||||
if (plugin.al.isAdminImpostor(player))
|
||||
{
|
||||
Admin admin = null;
|
||||
for (Admin loopAdmin : plugin.al.getAllAdmins())
|
||||
{
|
||||
if (loopAdmin.getName().equalsIgnoreCase(player.getName()))
|
||||
{
|
||||
admin = loopAdmin;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Admin admin = plugin.al.getEntryByName(player.getName());
|
||||
admin.setLastLogin(new Date());
|
||||
admin.addIp(FUtil.getIp(player));
|
||||
plugin.al.updateTables();
|
||||
|
Reference in New Issue
Block a user