refactor: missed some more actionresults
This commit is contained in:
parent
a91d039dd2
commit
f419f62f6c
5 changed files with 7 additions and 7 deletions
|
@ -67,7 +67,7 @@ public class AnvilManager {
|
|||
return Collections.singletonList(AnvilGUI.ResponseAction.replaceInputText("Invalid username!"));
|
||||
} else {
|
||||
appearanceManager.setName(snapshot.getText());
|
||||
final ActionResult<Void> actionResult = appearanceManager.updatePlayer(false);
|
||||
final ActionResult actionResult = appearanceManager.updatePlayer(false, false);
|
||||
return sendResultAndClose(actionResult);
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class AnvilManager {
|
|||
return Collections.singletonList(AnvilGUI.ResponseAction.replaceInputText("Invalid username!"));
|
||||
} else {
|
||||
appearanceManager.setSkin(snapshot.getText());
|
||||
final ActionResult<Void> actionResult = appearanceManager.updatePlayer(true);
|
||||
final ActionResult actionResult = appearanceManager.updatePlayer(true, false);
|
||||
return sendResultAndClose(actionResult);
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class AnvilManager {
|
|||
.text("New skin...");
|
||||
}
|
||||
|
||||
private List<AnvilGUI.ResponseAction> sendResultAndClose(ActionResult<Void> actionResult) {
|
||||
private List<AnvilGUI.ResponseAction> sendResultAndClose(ActionResult actionResult) {
|
||||
final I18N i18n = new I18N(player);
|
||||
if (!actionResult.isError()) {
|
||||
player.sendMessage(i18n.translate(I18NDict.Event.Disguise.SUCCESS));
|
||||
|
|
|
@ -25,7 +25,7 @@ public class PlayerJoinListener implements Listener {
|
|||
Bukkit.getScheduler().runTaskLater(instance, () -> {
|
||||
final AppearanceManager appearanceManager = AppearanceManager.get(player);
|
||||
if (appearanceManager.hasData()) {
|
||||
final ActionResult actionResult = appearanceManager.updatePlayer(appearanceManager.needsASkinChange(), true);
|
||||
final ActionResult actionResult = appearanceManager.updatePlayer(appearanceManager.needsASkinChange(), false);
|
||||
if (!actionResult.isError()) {
|
||||
player.sendMessage(i18n.translate(I18NDict.Event.PreviousSkin.SUCCESS));
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue