Skip to content

Commit

Permalink
Change command description to English and update to 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Toshimichi0915 committed May 7, 2021
1 parent f5679ea commit 34cfb0c
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 32 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group 'net.toshimichi'
version '1.0-SNAPSHOT'
version '1.2'

repositories {
mavenCentral()
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/toshimichi/packetanalyzer/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;

import javax.swing.*;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import net.toshimichi.packetanalyzer.Main;
import net.toshimichi.packetanalyzer.events.PacketReceiveEvent;
import net.toshimichi.packetanalyzer.events.PacketSendEvent;
import net.toshimichi.packetanalyzer.gui.MonitorFrame;
import net.toshimichi.packetanalyzer.packet.PacketBound;
import net.toshimichi.packetanalyzer.packet.PacketDetail;
import net.toshimichi.packetanalyzer.gui.MonitorFrame;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
Expand All @@ -14,8 +14,8 @@
import org.bukkit.event.Listener;
import org.bukkit.event.server.PluginDisableEvent;

import javax.swing.*;
import java.awt.*;
import javax.swing.SwingUtilities;
import java.awt.Point;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package net.toshimichi.packetanalyzer.commands;

import net.toshimichi.packetanalyzer.Main;
import net.toshimichi.packetanalyzer.utils.NettyUtils;
import net.toshimichi.packetanalyzer.utils.PacketHandler;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

import net.toshimichi.packetanalyzer.packet.PacketDetail;

import javax.swing.*;
import java.awt.*;
import javax.swing.JTable;

public class MonitorTable extends JTable{
public class MonitorTable extends JTable {

private final MonitorTableModel model;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package net.toshimichi.packetanalyzer.gui;

import javax.swing.*;
import java.awt.*;

public class PacketFrame extends TableFrame {
public PacketFrame(Object packet) {
super("Packet (" + packet.getClass().getSimpleName() + ")", new PacketTable(packet));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package net.toshimichi.packetanalyzer.gui;

import javax.swing.*;
import java.awt.*;
import javax.swing.JTable;

public class PacketTable extends JTable{
public class PacketTable extends JTable {

public PacketTable(Object packet) {
setModel(new PacketTableModel(packet));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import net.toshimichi.packetanalyzer.packet.PacketDetail;

import javax.swing.*;
import java.util.Collection;

public class PacketTimeFrame extends TableFrame {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import net.toshimichi.packetanalyzer.packet.PacketDetail;

import javax.swing.*;
import javax.swing.table.TableModel;
import java.awt.*;
import javax.swing.JTable;
import java.util.Collection;

public class PacketTimeTable extends JTable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.List;

public class PacketTimeTableListener extends MouseAdapter {
private final PacketTimeTable table;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ public String getColumnName(int column) {
}

public PacketDetail getValueAt(int rowIndex) {
if(packets.size() <= rowIndex) return null;
if (packets.size() <= rowIndex) return null;
return packets.get(rowIndex);
}

@Override
public Object getValueAt(int rowIndex, int columnIndex) {
PacketDetail packet = getValueAt(rowIndex);
if(packet == null) return null;
if (packet == null) return null;
switch (columnIndex) {
case 0:
return packets.size() - rowIndex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package net.toshimichi.packetanalyzer.gui;

import javax.swing.*;
import java.awt.*;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import java.awt.BorderLayout;

public class TableFrame extends JFrame{
public class TableFrame extends JFrame {

private final JTable table;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package net.toshimichi.packetanalyzer.lang;

import net.toshimichi.packetanalyzer.Main;

public interface Language {
String get(String key);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package net.toshimichi.packetanalyzer.packet;

import java.util.Date;
import java.util.UUID;

public class PacketDetail {
private final Object packet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import net.toshimichi.packetanalyzer.events.PacketEvent;
import net.toshimichi.packetanalyzer.events.PacketReceiveEvent;
import net.toshimichi.packetanalyzer.events.PacketSendEvent;
import org.bukkit.Bukkit;
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "PacketAnalyzer"
version: "1.0"
version: "1.2"
main: "net.toshimichi.packetanalyzer.Main"
commands:
frame:
usage: "/frame"
description: "パケット解析ウィンドウを表示します"
description: "Shows packet analyse window"
permission: "packetanalyzer.frame"
monitor:
usage: "/monitor <player>"
description: "パケットのキャプチャを開始, 終了します"
description: "Starts/stops packet capturing"
permission: "packetanalyzer.monitor"

0 comments on commit 34cfb0c

Please sign in to comment.