mirror of
https://github.com/geekfrog/PermissionsTime.git
synced 2024-11-21 23:08:48 +00:00
2652146617 提交的BUG,修复了op无法打开权限仓库
This commit is contained in:
parent
a6b2d621ab
commit
11330ece35
@ -164,6 +164,8 @@ public class PluginMain extends JavaPlugin {
|
||||
|
||||
public OfflinePlayer getOfflinePlayer(String name) {
|
||||
for (OfflinePlayer p : getServer().getOfflinePlayers()) {
|
||||
if(p==null)
|
||||
continue;
|
||||
if (p.getName().equalsIgnoreCase(name)) {
|
||||
return p;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package gg.frog.mc.permissionstime.command;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -34,9 +35,9 @@ public class MeCmd implements Runnable {
|
||||
if (isPlayer) {
|
||||
if (args.length == 1) {
|
||||
sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + LangCfg.MSG_PROCESSING));
|
||||
Player p = (Player) sender;
|
||||
OfflinePlayer p = this.pm.getOfflinePlayer(sender.getName());
|
||||
List<PlayerDataBean> ps = sm.getTime(p.getUniqueId().toString());
|
||||
PlayerPermissionShow.show(p, ps);
|
||||
PlayerPermissionShow.show((Player) sender, ps);
|
||||
} else {
|
||||
sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + LangCfg.MSG_PARAMETER_MISMATCH));
|
||||
sender.sendMessage(StrUtil.messageFormat(LangCfg.CMD_ME, pm.PLUGIN_NAME_LOWER_CASE));
|
||||
|
Loading…
Reference in New Issue
Block a user