From 4f51118a8a958af3735d2b0406d761b2ab7f0d92 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Mon, 22 Jun 2015 20:36:44 +0200 Subject: [PATCH] Correction de plusieurs NullPointerException --- lib/PandacraftAuth.jar | Bin 227120 -> 227149 bytes .../commands/CommandStaff.java | 12 +++++++++--- .../config/WorldBorderConfig.java | 1 + .../protection/NoPvpProtectManager.java | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/PandacraftAuth.jar b/lib/PandacraftAuth.jar index 14b14d3e433ffd5c01504cda89e31c17bbc1f07d..7231142ed3648556a1229957c7559f0101efbc5f 100644 GIT binary patch delta 1994 zcmY*Zc{r47AD(v}NfRBRkuhUAjco{>24f9FC0C9R3R&841~Z0fM8=4aB2rIc>OkBnx+BV_mLVcjper8&P*Q%BGKVVp`ZaSyEd)!>%L>l^m%o3|E* z-g}W9vtz@1)0r%9qxe0|HcgHmn40{`(zet6jh0=?p|J)j7KWv>ONE8#UM7dyNfj66(t3fp&UlzH55;&^7x_Z+8?CNg8lecisrg&HRFsjFV@ zU4`xKj+bq9^j8iYQd&M<`k!R4k^EfsnxfV0fz%_^7P$Z)A4lX=cUNDdaTJzFS*xb| zW!N~rL9;dkr7}hF)R^Kr2Ul{Ibw;ZoyQRh(o6v_Una7YjRy9Z|Z?JVEt*YsdR~%U? z#z|H9FeO!UMvAjmqpf6w#X88lfm^`%-X~QpeZkrV8$Y?oQeobL&1)KUuV8#h>04MU z7ULwz+qHeJnooRdZt-ftCMoE(1U zHz9h&H4drd=QRGdz{J1Xsyg_`2l2t{O5YDe1>Fxuk2`NozRo3jsXpHBw%mVcBs;zf z{B=_!n&QEeb4qh}(dKb7ez!j-sCLPTYF)b4g)PuN*jFOiAd%tC?Dg~F9sSUqu2uSS zS+l%)KxK&eDM%Qa=I*s@)9>tj@}Klm9>*UEe02V~@;!f{Taj_$cJ))^_8~$MLHcwT zd9|r9?y{-1ci zw|sw+%axIRE`e0aVdVg2XSQ{0NQ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java/plugin/pandacraftutils/commands/CommandStaff.java index f7fab8a..231ec6a 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/commands/CommandStaff.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/commands/CommandStaff.java @@ -152,11 +152,17 @@ public class CommandStaff extends AbstractCommandExecutor { } else { // le joueur n'est pas en ligne - ((Player)sender).teleport(wp.getLocation()); - sender.sendMessage(ChatColor.GREEN+"-----------------------------------------------"); displayTicket(sender, wp, true); - sender.sendMessage(ChatColor.GREEN+"Vous avez été téléporté vers l'endroit concerné par la demande du joueur"); + + if (wp.getLocation().getWorld() == null) { + sender.sendMessage(ChatColor.GREEN+"Le monde vers lequel vous deviez vous téléporter est introuvable ou invalide"); + } + else { + ((Player)sender).teleport(wp.getLocation()); + sender.sendMessage(ChatColor.GREEN+"Vous avez été téléporté vers l'endroit concerné par la demande du joueur"); + } + sender.sendMessage(ChatColor.GREEN+"-----------------------------------------------"); } diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/config/WorldBorderConfig.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/config/WorldBorderConfig.java index c5a33c2..f653931 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/config/WorldBorderConfig.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/config/WorldBorderConfig.java @@ -59,6 +59,7 @@ public class WorldBorderConfig extends AbstractConfig { } public WorldBorderConfigEntry getEntry(World world) { + if (world == null) return null; return getEntry(world.getName()); } diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/protection/NoPvpProtectManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/protection/NoPvpProtectManager.java index 79f156a..da2e5e0 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/protection/NoPvpProtectManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/protection/NoPvpProtectManager.java @@ -250,7 +250,7 @@ public class NoPvpProtectManager { for (Player pl : pls) { // on ignore ceux en créatif - if (pl == null || !pl.isOnline() || pl.getGameMode() == GameMode.CREATIVE) + if (pl == null || !pl.isOnline() || OnlinePlayerManager.get(pl) == null || pl.getGameMode() == GameMode.CREATIVE) continue; if (OnlinePlayerManager.get(pl).isVanished())