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