forked from TuxCoding/FastLogin
Fix typo in BungeeCord message key
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
######1.6.1
|
||||||
|
|
||||||
|
* Fix message typo in BungeeCord which created a NPE if premium-warning is activated
|
||||||
|
|
||||||
######1.6
|
######1.6
|
||||||
|
|
||||||
* Add a warning message if the user tries to invoke the premium command
|
* Add a warning message if the user tries to invoke the premium command
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>fastlogin</artifactId>
|
<artifactId>fastlogin</artifactId>
|
||||||
<version>1.6</version>
|
<version>1.6.1</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -83,7 +83,6 @@ public class CrackedCommand implements CommandExecutor {
|
|||||||
if (profile.isPremium()) {
|
if (profile.isPremium()) {
|
||||||
sender.sendMessage(plugin.getCore().getMessage("remove-premium"));
|
sender.sendMessage(plugin.getCore().getMessage("remove-premium"));
|
||||||
profile.setPremium(false);
|
profile.setPremium(false);
|
||||||
profile.setUuid(null);
|
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
|
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@@ -64,7 +64,7 @@ public class ForceLoginTask implements Runnable {
|
|||||||
if (playerProfile != null) {
|
if (playerProfile != null) {
|
||||||
playerProfile.setUuid(session.getUuid());
|
playerProfile.setUuid(session.getUuid());
|
||||||
//save cracked players too
|
//save cracked players too
|
||||||
playerProfile.setPremium(session.isVerified());
|
playerProfile.setPremium(true);
|
||||||
storage.save(playerProfile);
|
storage.save(playerProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ public class ForceLoginTask implements Runnable {
|
|||||||
String generatedPassword = plugin.generateStringPassword(player);
|
String generatedPassword = plugin.generateStringPassword(player);
|
||||||
boolean success = authPlugin.forceRegister(player, generatedPassword);
|
boolean success = authPlugin.forceRegister(player, generatedPassword);
|
||||||
String message = plugin.getCore().getMessage("auto-register");
|
String message = plugin.getCore().getMessage("auto-register");
|
||||||
if (message != null) {
|
if (success && message != null) {
|
||||||
message = message.replace("%password", generatedPassword);
|
message = message.replace("%password", generatedPassword);
|
||||||
player.sendMessage(message);
|
player.sendMessage(message);
|
||||||
}
|
}
|
||||||
@@ -100,7 +100,7 @@ public class ForceLoginTask implements Runnable {
|
|||||||
boolean success = authPlugin.forceLogin(player);
|
boolean success = authPlugin.forceLogin(player);
|
||||||
|
|
||||||
String message = plugin.getCore().getMessage("auto-login");
|
String message = plugin.getCore().getMessage("auto-login");
|
||||||
if (message != null) {
|
if (success && message != null) {
|
||||||
player.sendMessage(message);
|
player.sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>fastlogin</artifactId>
|
<artifactId>fastlogin</artifactId>
|
||||||
<version>1.6</version>
|
<version>1.6.1</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ public class PluginMessageListener implements Listener {
|
|||||||
|
|
||||||
if (playerName.equals(fromPlayer.getName()) && plugin.getConfig().getBoolean("premium-warning")
|
if (playerName.equals(fromPlayer.getName()) && plugin.getConfig().getBoolean("premium-warning")
|
||||||
&& !plugin.getPendingConfirms().contains(fromPlayer.getUniqueId())) {
|
&& !plugin.getPendingConfirms().contains(fromPlayer.getUniqueId())) {
|
||||||
fromPlayer.sendMessage(TextComponent.fromLegacyText(plugin.getCore().getMessage("premium-warming")));
|
fromPlayer.sendMessage(TextComponent.fromLegacyText(plugin.getCore().getMessage("premium-warning")));
|
||||||
plugin.getPendingConfirms().add(fromPlayer.getUniqueId());
|
plugin.getPendingConfirms().add(fromPlayer.getUniqueId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>fastlogin</artifactId>
|
<artifactId>fastlogin</artifactId>
|
||||||
<version>1.6</version>
|
<version>1.6.1</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -79,7 +79,7 @@ public class Storage {
|
|||||||
ResultSet resultSet = null;
|
ResultSet resultSet = null;
|
||||||
try {
|
try {
|
||||||
con = dataSource.getConnection();
|
con = dataSource.getConnection();
|
||||||
loadStmt = con.prepareStatement("SELECT * FROM " + PREMIUM_TABLE + " WHERE Name=?");
|
loadStmt = con.prepareStatement("SELECT * FROM " + PREMIUM_TABLE + " WHERE Name=? LIMIT 1");
|
||||||
loadStmt.setString(1, name);
|
loadStmt.setString(1, name);
|
||||||
|
|
||||||
resultSet = loadStmt.executeQuery();
|
resultSet = loadStmt.executeQuery();
|
||||||
@@ -120,7 +120,7 @@ public class Storage {
|
|||||||
ResultSet resultSet = null;
|
ResultSet resultSet = null;
|
||||||
try {
|
try {
|
||||||
con = dataSource.getConnection();
|
con = dataSource.getConnection();
|
||||||
loadStmt = con.prepareStatement("SELECT * FROM " + PREMIUM_TABLE + " WHERE UUID=?");
|
loadStmt = con.prepareStatement("SELECT * FROM " + PREMIUM_TABLE + " WHERE UUID=? LIMIT 1");
|
||||||
loadStmt.setString(1, uuid.toString().replace("-", ""));
|
loadStmt.setString(1, uuid.toString().replace("-", ""));
|
||||||
|
|
||||||
resultSet = loadStmt.executeQuery();
|
resultSet = loadStmt.executeQuery();
|
||||||
|
2
pom.xml
2
pom.xml
@@ -8,7 +8,7 @@
|
|||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>FastLogin</name>
|
<name>FastLogin</name>
|
||||||
<version>1.6</version>
|
<version>1.6.1</version>
|
||||||
<inceptionYear>2015</inceptionYear>
|
<inceptionYear>2015</inceptionYear>
|
||||||
<url>https://www.spigotmc.org/resources/fastlogin.14153/</url>
|
<url>https://www.spigotmc.org/resources/fastlogin.14153/</url>
|
||||||
<description>
|
<description>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.github.games647</groupId>
|
<groupId>com.github.games647</groupId>
|
||||||
<artifactId>fastlogin</artifactId>
|
<artifactId>fastlogin</artifactId>
|
||||||
<version>1.6</version>
|
<version>1.6.1</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user