mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
Fix NPE in /npc lookclose
This commit is contained in:
parent
ed9230c680
commit
12faab3b53
@ -286,7 +286,7 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
||||
}
|
||||
|
||||
private void loadMavenLibraries() {
|
||||
getLogger().info("[Citizens] Downloading libraries, please wait...");
|
||||
getLogger().info("Loading external libraries...");
|
||||
|
||||
LibraryManager lib = new BukkitLibraryManager(this);
|
||||
lib.addMavenCentral();
|
||||
@ -324,6 +324,8 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("examination-string").version("1.3.0")
|
||||
.relocate("net{}kyori", "clib{}net{}kyori").build());
|
||||
|
||||
getLogger().info("Loaded.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1308,7 +1308,7 @@ public class NPCCommands {
|
||||
npc.getName());
|
||||
toggle = false;
|
||||
}
|
||||
if (randomSwitchTargets) {
|
||||
if (randomSwitchTargets != null) {
|
||||
trait.setRandomlySwitchTargets(randomSwitchTargets);
|
||||
Messaging.sendTr(sender, randomSwitchTargets ? Messages.LOOKCLOSE_RANDOM_TARGET_SWITCH_ENABLED
|
||||
: Messages.LOOKCLOSE_RANDOM_TARGET_SWITCH_DISABLED, npc.getName());
|
||||
|
Loading…
Reference in New Issue
Block a user