Advertisement
tensador125

L2JOrion-L2Jfrozen Anti Target GM PLAYER

Nov 23rd, 2022
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.47 KB | Source Code | 0 0
  1. L2PcInstance.java  
  2.  
  3. @Override
  4.     public void onAction(L2PcInstance player)
  5.     {
  6.       +     if (Config.PROTECT_TARGET_ADM_ENABLE)
  7.       +{
  8.       +     if (isGM() && player.isGM() == false)
  9.       +     {
  10.       +         player.sendPacket(ActionFailed.STATIC_PACKET);
  11.       +         return;
  12.       +     }
  13.       + }
  14.  
  15.  
  16.     @Override
  17.     public void onActionShift(L2PcInstance player)
  18.     {
  19.         L2Weapon currentWeapon = player.getActiveWeaponItem();
  20.  
  21. +       if (Config.PROTECT_TARGET_ADM_ENABLE)
  22. +       {
  23. +           if (isGM() && player.isGM() == false)
  24. +           {
  25. +               player.sendPacket(ActionFailed.STATIC_PACKET);
  26. +               return;
  27. +           }
  28. +       }
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.   Config.java
  37.     public static String PVP1_CUSTOM_MESSAGE;
  38.     public static String PVP2_CUSTOM_MESSAGE;  
  39. +   public static boolean PROTECT_TARGET_ADM_ENABLE;
  40.  
  41.  
  42.  
  43.  
  44.             /** Custom Tables **/
  45.             CUSTOM_SPAWNLIST_TABLE = Boolean.valueOf(L2JFrozenSettings.getProperty("CustomSpawnlistTable", "True"));
  46.             SAVE_GMSPAWN_ON_CUSTOM = Boolean.valueOf(L2JFrozenSettings.getProperty("SaveGmSpawnOnCustom", "True"));
  47.             DELETE_GMSPAWN_ON_CUSTOM = Boolean.valueOf(L2JFrozenSettings.getProperty("DeleteGmSpawnOnCustom", "True"));
  48.          
  49.  
  50. +   PROTECT_TARGET_ADM_ENABLE = Boolean.valueOf(L2JFrozenSettings.getProperty("ProtectTargetAdmEnable", "False"));  
  51.  
  52.  
  53.   config/functions/l2jfrozen.propierties
  54.    
  55.  # Npc Protector Message
  56. ProtectorMessage = Hey You!, Never Kill On This Area, Go Read The Rules!
  57.  
  58. + # Protect Target Gm
  59. + # True = Enable False = Disable    
  60. +ProtectTargetAdmEnable = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement