Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.bukkit.ChatColor;
import org.bukkit.Server;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import org.mmga.makelogingreatagain.commands.MakeLoginGreatAgain;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import net.md_5.bungee.api.config.ListenerInfo;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.event.ServerSwitchEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.api.plugin.Plugin;
import net.md_5.bungee.event.EventHandler;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
public class ChatColorConstants {
public static ChatColor numberColor = ChatColor.GOLD;
public static ChatColor letterColor = ChatColor.RED;
public static ChatColor tipsColor = ChatColor.GREEN;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package org.mmga.makelogingreatagain.constants;

import org.bukkit.ChatColor;
import org.bukkit.plugin.java.JavaPlugin;

/**
* @author wzp
* @version 1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.ItemStack;
import org.mmga.makelogingreatagain.MakeLoginGreatAgainMain;
import org.mmga.makelogingreatagain.constants.ItemStackConstants;
import org.mmga.makelogingreatagain.constants.ChatColorConstants;
import org.mmga.makelogingreatagain.utils.PluginUtils;

import java.net.InetSocketAddress;
Expand All @@ -17,8 +17,8 @@
import java.util.concurrent.ConcurrentHashMap;

import static org.mmga.makelogingreatagain.constants.StringConstants.*;
import static org.mmga.makelogingreatagain.utils.InventoryUtils.*;
import static org.mmga.makelogingreatagain.utils.DataBaseUtils.*;
import static org.mmga.makelogingreatagain.utils.InventoryUtils.*;

/**
* @author wzp
Expand Down Expand Up @@ -61,7 +61,9 @@ public static void onInventoryClick(InventoryClickEvent event){
isPlayerRegister.put(player,true);
isPlayerUpper.put(player,false);
updateUserData(name,uuid,player.getAddress().getHostName());
player.sendMessage(rightPassword);
player.sendMessage(ChatColorConstants.tipsColor + rightPassword);
// 免责声明提示
player.performCommand("tellraw @s {\"text\": \"继续游玩则表明您同意我们的《免责声明》,如不同意,请退出服务器(点击此消息即可查看)\",\"color\": \"green\",\"clickEvent\": {\"action\": \"open_url\", \"value\": \"https://docs.qq.com/doc/DWEVMQmxRTHh2akRU\"}}");
if (BungeeCordMessageListener.NEED_LOGIN.containsKey(uniqueId)){
BungeeCordMessageListener.NEED_LOGIN.put(uniqueId,false);
}
Expand Down Expand Up @@ -98,12 +100,12 @@ public static void onInventoryClick(InventoryClickEvent event){
if (BungeeCordMessageListener.NEED_LOGIN.containsKey(uniqueId)){
BungeeCordMessageListener.NEED_LOGIN.put(uniqueId,false);
}
player.sendMessage(successfulRegister);
player.sendMessage(ChatColorConstants.tipsColor + successfulRegister);
}else{
playerInputPassword.put(player,"");
playerInputPasswordRe.put(player,"");
playerInputIndexAt.put(player,0);
player.sendMessage(twoPasswordNotEquals);
player.sendMessage(ChatColorConstants.letterColor + twoPasswordNotEquals);
player.openInventory(getRegisterInventory(plugin));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerLoginEvent;

import java.sql.SQLException;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.mmga.makelogingreatagain.utils;
import org.bukkit.ChatColor;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.mmga.makelogingreatagain.MakeLoginGreatAgainMain;

import java.sql.*;
Expand Down