Пример #1
0
 private Sign getSign(String loc) {
   Location l = SerializerUtil.getLocation(loc);
   if (l == null) return null;
   Material t = l.getBlock().getType();
   return t == Material.SIGN || t == Material.SIGN_POST || t == Material.WALL_SIGN
       ? (Sign) l.getBlock().getState()
       : null;
 }
Пример #2
0
 public static boolean stillSign(StatSign o) {
   String l = o.getLocationString();
   if (l == null) return false;
   try {
     Location loc = SerializerUtil.getLocation(l);
     if (loc == null) return false;
     Material mat = loc.getWorld().getBlockAt(loc).getType();
     if (mat != Material.SIGN && mat != Material.SIGN_POST && mat != Material.WALL_SIGN)
       return false;
   } catch (Exception e) {
     return false;
   }
   return true;
 }