Guest User

PremiumInfo.java

a guest
Aug 3rd, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.73 KB | None | 0 0
  1. package net.sf.l2j.gameserver.handler.voiced.impl;
  2.  
  3. import net.sf.l2j.commons.config.Config;
  4. import net.sf.l2j.gameserver.handler.voiced.IVoicedCommandHandler;
  5. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  6.  
  7. public class PremiumInfo implements IVoicedCommandHandler
  8. {
  9.     private static final String[] _voicedCommands =
  10.     {
  11.         "premium"
  12.     };
  13.    
  14.     @Override
  15.     public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
  16.     {
  17.         if (!Config.PREMIUM_ITEM_ENABLED)
  18.         {
  19.             return false;
  20.         }
  21.        
  22.         if (command.equalsIgnoreCase("premium"))
  23.         {
  24.             activeChar.showPremiumInfo();
  25.         }
  26.         return true;
  27.     }
  28.    
  29.     @Override
  30.     public String[] getVoicedCommandList()
  31.     {
  32.         return _voicedCommands;
  33.     }
  34. }
Add Comment
Please, Sign In to add comment