update to use the new vault API
This commit is contained in:
@@ -103,7 +103,7 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
|
||||
for (String command : Settings.forceCommands) {
|
||||
try {
|
||||
player.performCommand(command.replace("%p", player.getName()));
|
||||
} catch (Exception e) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
for (String command : Settings.forceCommandsAsConsole) {
|
||||
@@ -125,20 +125,13 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
|
||||
* world inventory !
|
||||
*/
|
||||
player.setGameMode(limbo.getGameMode());
|
||||
if (!Settings.forceOnlyAfterLogin) {
|
||||
// Inventory - Make it after restore GameMode , cause we need to
|
||||
// restore the
|
||||
// right inventory in the right gamemode
|
||||
if (Settings.protectInventoryBeforeLogInEnabled && player.hasPlayedBefore()) {
|
||||
restoreInventory();
|
||||
}
|
||||
} else {
|
||||
// Inventory - Make it before force the survival GameMode to
|
||||
// cancel all
|
||||
// inventory problem
|
||||
if (Settings.protectInventoryBeforeLogInEnabled && player.hasPlayedBefore()) {
|
||||
restoreInventory();
|
||||
}
|
||||
// Inventory - Make it after restore GameMode , cause we need to
|
||||
// restore the
|
||||
// right inventory in the right gamemode
|
||||
if (Settings.protectInventoryBeforeLogInEnabled && player.hasPlayedBefore()) {
|
||||
restoreInventory();
|
||||
}
|
||||
if (Settings.forceOnlyAfterLogin) {
|
||||
player.setGameMode(GameMode.SURVIVAL);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -120,8 +120,8 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
|
||||
player.setWalkSpeed(0.2f);
|
||||
player.setFlySpeed(0.1f);
|
||||
}
|
||||
// The Loginevent now fires (as intended) after everything is processed
|
||||
Bukkit.getServer().getPluginManager().callEvent(new LoginEvent(player, true));
|
||||
// The LoginEvent now fires (as intended) after everything is processed
|
||||
plugin.getServer().getPluginManager().callEvent(new LoginEvent(player, true));
|
||||
player.saveData();
|
||||
|
||||
if (!Settings.noConsoleSpam)
|
||||
@@ -133,7 +133,7 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
|
||||
return;
|
||||
}
|
||||
|
||||
// Request Login after Registation
|
||||
// Request Login after Registration
|
||||
if (Settings.forceRegLogin) {
|
||||
forceLogin(player);
|
||||
return;
|
||||
@@ -143,7 +143,7 @@ public class ProcessSyncronousPasswordRegister implements Runnable {
|
||||
if (Settings.useWelcomeMessage)
|
||||
if (Settings.broadcastWelcomeMessage) {
|
||||
for (String s : Settings.welcomeMsg) {
|
||||
Bukkit.getServer().broadcastMessage(plugin.replaceAllInfos(s, player));
|
||||
plugin.getServer().broadcastMessage(plugin.replaceAllInfos(s, player));
|
||||
}
|
||||
} else {
|
||||
for (String s : Settings.welcomeMsg) {
|
||||
|
||||
Reference in New Issue
Block a user