Advertisement
Guest User

ProtectionProperties.java

a guest
Aug 3rd, 2019
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.87 KB | None | 0 0
  1. /*
  2.  * This program is free software: you can redistribute it and/or modify it under
  3.  * the terms of the GNU General Public License as published by the Free Software
  4.  * Foundation, either version 3 of the License, or (at your option) any later
  5.  * version.
  6.  *
  7.  * This program is distributed in the hope that it will be useful, but WITHOUT
  8.  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9.  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10.  * details.
  11.  *
  12.  * You should have received a copy of the GNU General Public License along with
  13.  * this program. If not, see <http://www.gnu.org/licenses/>.
  14.  */
  15. package net.sf.l2j.protection;
  16.  
  17. import net.sf.l2j.commons.config.Config;
  18. import net.sf.l2j.commons.config.ExProperties;
  19.  
  20. public final class ProtectionProperties
  21. {
  22.    
  23.     public static int SERVER_KEY;
  24.     public static boolean ENABLED;
  25.     public static int MAX_SESSIONS;
  26.     public static int MAX_PREMIUM_SESSIONS;
  27.     public static String LOG_OPTION;
  28.     public static boolean ANNOUNCE_HACK;
  29.     public static String ON_HACK_ATTEMP;
  30.     public static boolean ALLOW_GM_FROM_BANNED_HWID;
  31.     public static boolean LOG_SESSIONS;
  32.    
  33.     public static void init()
  34.     {
  35.         ExProperties protectStt = Config.load(Config.GUARD_FILE);
  36.        
  37.         ENABLED = protectStt.getProperty("Enabled", false);
  38.         SERVER_KEY = protectStt.getProperty("ServerKey", 7958915);
  39.         LOG_OPTION = protectStt.getProperty("LogOption", "NOSPS HACK");
  40.         MAX_SESSIONS = protectStt.getProperty("MaxSessionsFromHWID", -1);
  41.         MAX_PREMIUM_SESSIONS = protectStt.getProperty("MaxSessionsForPremium", -1);
  42.         ANNOUNCE_HACK = protectStt.getProperty("AnnounceHackAttempt", true);
  43.         ON_HACK_ATTEMP = protectStt.getProperty("OnHackAttempt", "kick");
  44.         ALLOW_GM_FROM_BANNED_HWID = protectStt.getProperty("AllowGMFromBannedHWID", false);
  45.         LOG_SESSIONS = protectStt.getProperty("LogSessions", false);
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement