mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 12:36:41 +00:00
Compare commits
6 Commits
2022.06-RC
...
2022.06
Author | SHA1 | Date | |
---|---|---|---|
ae5038ef0f | |||
ec5aa0304e | |||
1eaaf5fcdb | |||
42458084d7 | |||
0cd2886e40 | |||
575568cb05 |
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>me.totalfreedom</groupId>
|
<groupId>me.totalfreedom</groupId>
|
||||||
<artifactId>TotalFreedomMod</artifactId>
|
<artifactId>TotalFreedomMod</artifactId>
|
||||||
<version>2022.06-RC2</version>
|
<version>2022.06</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -179,7 +179,7 @@ public class LoginProcess extends FreedomService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Whitelist
|
// Whitelist
|
||||||
if (server.isWhitelistEnforced() && !player.isWhitelisted())
|
if (server.hasWhitelist() && !player.isWhitelisted())
|
||||||
{
|
{
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "You are not whitelisted on this server.");
|
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "You are not whitelisted on this server.");
|
||||||
}
|
}
|
||||||
|
@ -112,6 +112,9 @@ public class Command_coins extends FreedomCommand
|
|||||||
+ ChatColor.GOLD + coinsToTransfer
|
+ ChatColor.GOLD + coinsToTransfer
|
||||||
+ ChatColor.GREEN + " coin" + (coinsToTransfer > 1 ? "s" : "")
|
+ ChatColor.GREEN + " coin" + (coinsToTransfer > 1 ? "s" : "")
|
||||||
+ " to " + ChatColor.GOLD + target.getName() + ChatColor.GREEN + ".", ChatColor.GREEN);
|
+ " to " + ChatColor.GOLD + target.getName() + ChatColor.GREEN + ".", ChatColor.GREEN);
|
||||||
|
|
||||||
|
plugin.pl.save(playerData);
|
||||||
|
plugin.pl.save(senderData);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -444,13 +444,16 @@ public class Discord extends FreedomService
|
|||||||
embedBuilder.setDescription(reason);
|
embedBuilder.setDescription(reason);
|
||||||
embedBuilder.setFooter("Reported by " + reporter.getName(), "https://minotar.net/helm/" + reporter.getName() + ".png");
|
embedBuilder.setFooter("Reported by " + reporter.getName(), "https://minotar.net/helm/" + reporter.getName() + ".png");
|
||||||
embedBuilder.setTimestamp(Instant.from(ZonedDateTime.now()));
|
embedBuilder.setTimestamp(Instant.from(ZonedDateTime.now()));
|
||||||
com.earth2me.essentials.User user = plugin.esb.getEssentialsUser(reported.getName());
|
if (plugin.esb.isEnabled())
|
||||||
String location = "World: " + Objects.requireNonNull(user.getLastLocation().getWorld()).getName() + ", X: " + user.getLastLocation().getBlockX() + ", Y: " + user.getLastLocation().getBlockY() + ", Z: " + user.getLastLocation().getBlockZ();
|
|
||||||
embedBuilder.addField("Location", location, true);
|
|
||||||
embedBuilder.addField("God Mode", WordUtils.capitalizeFully(String.valueOf(user.isGodModeEnabled())), true);
|
|
||||||
if (user.getNickname() != null)
|
|
||||||
{
|
{
|
||||||
embedBuilder.addField("Nickname", user.getNickname(), true);
|
com.earth2me.essentials.User user = plugin.esb.getEssentialsUser(reported.getName());
|
||||||
|
String location = "World: " + Objects.requireNonNull(user.getLastLocation().getWorld()).getName() + ", X: " + user.getLastLocation().getBlockX() + ", Y: " + user.getLastLocation().getBlockY() + ", Z: " + user.getLastLocation().getBlockZ();
|
||||||
|
embedBuilder.addField("Location", location, true);
|
||||||
|
embedBuilder.addField("God Mode", WordUtils.capitalizeFully(String.valueOf(user.isGodModeEnabled())), true);
|
||||||
|
if (user.getNickname() != null)
|
||||||
|
{
|
||||||
|
embedBuilder.addField("Nickname", user.getNickname(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MessageEmbed embed = embedBuilder.build();
|
MessageEmbed embed = embedBuilder.build();
|
||||||
Message message = channel.sendMessage(embed).complete();
|
Message message = channel.sendMessage(embed).complete();
|
||||||
@ -481,12 +484,17 @@ public class Discord extends FreedomService
|
|||||||
String location = "World: " + Objects.requireNonNull(reported.getLocation().getWorld()).getName() + ", X: " + reported.getLocation().getBlockX() + ", Y: " + reported.getLocation().getBlockY() + ", Z: " + reported.getLocation().getBlockZ();
|
String location = "World: " + Objects.requireNonNull(reported.getLocation().getWorld()).getName() + ", X: " + reported.getLocation().getBlockX() + ", Y: " + reported.getLocation().getBlockY() + ", Z: " + reported.getLocation().getBlockZ();
|
||||||
embedBuilder.addField("Location", location, true);
|
embedBuilder.addField("Location", location, true);
|
||||||
embedBuilder.addField("Game Mode", WordUtils.capitalizeFully(reported.getGameMode().name()), true);
|
embedBuilder.addField("Game Mode", WordUtils.capitalizeFully(reported.getGameMode().name()), true);
|
||||||
com.earth2me.essentials.User user = plugin.esb.getEssentialsUser(reported.getName());
|
|
||||||
embedBuilder.addField("God Mode", WordUtils.capitalizeFully(String.valueOf(user.isGodModeEnabled())), true);
|
if (plugin.esb.isEnabled())
|
||||||
if (user.getNickname() != null)
|
|
||||||
{
|
{
|
||||||
embedBuilder.addField("Nickname", user.getNickname(), true);
|
com.earth2me.essentials.User user = plugin.esb.getEssentialsUser(reported.getName());
|
||||||
|
embedBuilder.addField("God Mode", WordUtils.capitalizeFully(String.valueOf(user.isGodModeEnabled())), true);
|
||||||
|
if (user.getNickname() != null)
|
||||||
|
{
|
||||||
|
embedBuilder.addField("Nickname", user.getNickname(), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageEmbed embed = embedBuilder.build();
|
MessageEmbed embed = embedBuilder.build();
|
||||||
Message message = channel.sendMessage(embed).complete();
|
Message message = channel.sendMessage(embed).complete();
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ public class SQLite extends FreedomService
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Object[] data = {key, player.getName()};
|
Object[] data = {key, player.getUuid()};
|
||||||
PreparedStatement statement = connection.prepareStatement(MessageFormat.format("UPDATE players SET {0}=? WHERE uuid=''{1}''", data));
|
PreparedStatement statement = connection.prepareStatement(MessageFormat.format("UPDATE players SET {0}=? WHERE uuid=''{1}''", data));
|
||||||
statement = setUnknownType(statement, 1, value);
|
statement = setUnknownType(statement, 1, value);
|
||||||
statement.executeUpdate();
|
statement.executeUpdate();
|
||||||
|
Reference in New Issue
Block a user