Skip to content

Commit 1a86b69

Browse files
committed
Fix NPE
1 parent d94b9d2 commit 1a86b69

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/main/java/org/maxgamer/quickshop/QuickShop.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public class QuickShop extends JavaPlugin {
251251
@Getter
252252
private BuildInfo buildInfo;
253253
@Getter
254-
private final QuickChat quickChat = new BungeeQuickChat();
254+
private final QuickChat quickChat = new BungeeQuickChat(this);
255255
@Getter
256256
@Nullable
257257
private String currency = null;

src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package org.maxgamer.quickshop.chat.platform.minedown;
2121

22+
import lombok.AllArgsConstructor;
2223
import net.md_5.bungee.api.chat.*;
2324
import org.apache.commons.lang.StringUtils;
2425
import org.bukkit.ChatColor;
@@ -44,8 +45,9 @@
4445
*
4546
* @author Ghost_chu
4647
*/
48+
@AllArgsConstructor
4749
public class BungeeQuickChat implements QuickChat {
48-
private final QuickShop plugin = QuickShop.getInstance();
50+
private final QuickShop plugin;
4951

5052
@Override
5153
public void send(@NotNull CommandSender receiver, @Nullable String message) {

src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Help.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ private void sendHelp(@NotNull CommandSender s, @NotNull String commandLabel) {
8181
}
8282
if (container.isDisabled()) {
8383
if (QuickShop.getPermissionManager().hasPermission(s, "quickshop.showdisabled")) {
84-
plugin.text().of(s, "command.format", commandLabel, container.getPrefix(), container.getDisableText(s));
84+
plugin.text().of(s, "command.format", commandLabel, container.getPrefix(), container.getDisableText(s)).send();
8585
}
8686
} else {
87-
plugin.text().of(s, "command.format", commandLabel, container.getPrefix(), commandDesc);
87+
plugin.text().of(s, "command.format", commandLabel, container.getPrefix(), commandDesc).send();
8888
}
8989
}
9090
}

0 commit comments

Comments
 (0)