⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adminplugin.java

📁 Vyger offers a D & D and Rogue-like environment in a graphical online roleplay game.
💻 JAVA
字号:
/* Light And Shadow. A Persistent Universe based on Robert Jordan's Wheel of Time Books. * Copyright (C) 2001-2003 WOTLAS Team * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */package wotlas.client.screen.plugin;import javax.swing.*;import java.awt.*;import java.awt.event.*;import wotlas.utils.*;import wotlas.libs.aswing.*;import wotlas.common.action.*;import wotlas.common.*;import wotlas.common.message.description.PlayerPastMessage;import wotlas.client.*;import wotlas.client.screen.*;import wotlas.common.character.*;/** Plug In that shows information on the selected player and enables the *  local player to set his/her past. * * @author Diego */public class AdminPlugIn extends JPanelPlugIn  {    /** Creates new form AttributesPlugIn */    public AdminPlugIn() {        super();        initComponents();    }        /** This method is called from within the constructor to     * initialize the form.     * WARNING: Do NOT modify this code. The content of this method is     * always regenerated by the Form Editor.     */    private void initComponents() {//GEN-BEGIN:initComponents        jPanel1 = new javax.swing.JPanel();        MobCrea1 = new javax.swing.JButton();        ItemCrea1 = new javax.swing.JButton();        jPanel21 = new javax.swing.JPanel();        jLabel11 = new javax.swing.JLabel();        setLayout(new java.awt.BorderLayout());        jPanel1.setLayout(null);        MobCrea1.setText("Monster creation");        MobCrea1.setToolTipText("Monster Creation");        MobCrea1.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                MobCrea1ActionPerformed(evt);            }        });        jPanel1.add(MobCrea1);        MobCrea1.setBounds(10, 10, 130, 20);        ItemCrea1.setText("Item creation");        ItemCrea1.setToolTipText("Item creation");        ItemCrea1.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                ItemCrea1ActionPerformed(evt);            }        });        jPanel1.add(ItemCrea1);        ItemCrea1.setBounds(10, 30, 130, 20);        add(jPanel1, java.awt.BorderLayout.CENTER);        jLabel11.setForeground(new java.awt.Color(255, 0, 0));        jLabel11.setText("Use only for test");        jPanel21.add(jLabel11);        add(jPanel21, java.awt.BorderLayout.NORTH);    }//GEN-END:initComponents    private void ItemCrea1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ItemCrea1ActionPerformed        // Add your handling code here:        System.out.println("Calling item creation I");        ClientDirector.getDataManager().commandRequest = DataManager.COMMAND_CAST;        ClientDirector.getDataManager().getClientScreen().getMapPanel().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));        ClientDirector.getDataManager().commandAction = CastAction.getCastAction(CastAction.CAST_ADMIN_CREATE);    }//GEN-LAST:event_ItemCrea1ActionPerformed    private void MobCrea1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MobCrea1ActionPerformed        // Add your handling code here:        System.out.println("Calling mob creation I");        // avvisare l'inventory del player e il panel della mappa.        ClientDirector.getDataManager().commandRequest = DataManager.COMMAND_CAST;        ClientDirector.getDataManager().getClientScreen().getMapPanel().setCursor(new Cursor(Cursor.DEFAULT_CURSOR));        ClientDirector.getDataManager().commandAction = CastAction.getCastAction(CastAction.CAST_ADMIN_SUMMON);    }//GEN-LAST:event_MobCrea1ActionPerformed            // Variables declaration - do not modify//GEN-BEGIN:variables    private javax.swing.JButton MobCrea1;    private javax.swing.JLabel jLabel11;    private javax.swing.JPanel jPanel21;    private javax.swing.JPanel jPanel1;    private javax.swing.JButton ItemCrea1;    // End of variables declaration//GEN-END:variables       /** Returns the name of the plug-in that will be displayed in the JPlayerPanel.    * @return a short name for the plug-in    */      public String getPlugInName() {      	  return "Admin Tools";      } /*------------------------------------------------------------------------------------*/   /** Returns the name of the plug-in's author.    * @return author name.    */      public String getPlugInAuthor() {          return "Wotlas Team (Diego)";      } /*------------------------------------------------------------------------------------*/   /** Returns the tool tip text that will be displayed in the JPlayerPanel.    * @return a short tool tip text    */      public String getToolTipText() {          return "Admin tools to test program";      } /*------------------------------------------------------------------------------------*/   /** Eventual index in the list of JPlayerPanels    * @return -1 if the plug-in has to be added at the end of the plug-in list,    *         otherwise a positive integer for a precise location.    */      public int getPlugInIndex() {          return 0;      } /*------------------------------------------------------------------------------------*/   /** Tells if this plug-in is a system plug-in that represents some base    *  wotlas feature.    * @return true means system plug-in, false means user plug-in    */      public boolean isSystemPlugIn() {      	  return true;      }  /** Called once to initialize the plug-in.   *  @return if true we display the plug-in, return false if something fails during   *          this init(), this way the plug-in won't be displayed.   */    public boolean init() {       return true; // nothing special to init...    } /*------------------------------------------------------------------------------------*/  /** Called when we need to reset the content of this plug-in.   */    public void reset() {        /*        jTabbArea.removeAll();        remove(jTabbArea);        revalidate();        jFlags = null;        jTabbArea = null;        jPanel2 = null;        jScrollPane2 = null;        jPanel1 = null;        panAttrib = null;        jScrollPane3 = null;         */    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -