コード例 #1
0
 private static void sendMsg(Player p) {
   if (p == null) return;
   if (p.hasPermission("wa.webadmin") || p.isOp()) {
     final String failMsg = WebAuctionPlus.getFailMsg();
     if (failMsg == null || failMsg.isEmpty()) {
       p.sendMessage(
           WebAuctionPlus.chatPrefix + "Failed to load plugin. Please check the console log.");
     } else {
       if (failMsg.contains("|")) {
         for (String m : failMsg.split("|")) {
           if (m == null || m.isEmpty() || m.equals("|")) continue;
           p.sendMessage(WebAuctionPlus.chatPrefix + m);
         }
       } else {
         p.sendMessage(WebAuctionPlus.chatPrefix + failMsg);
       }
     }
   }
 }