fixed /seen

This commit is contained in:
Super_ 2020-07-01 11:40:20 -04:00
parent c53592b06e
commit ba38dd4975
6 changed files with 8 additions and 40 deletions

View file

@ -118,7 +118,7 @@
<dependency>
<groupId>com.github.TFPatches</groupId>
<artifactId>TotalFreedomMod</artifactId>
<version>5.5</version>
<version>development-SNAPSHOT</version>
</dependency>
<!--<dependency>
<groupId>net.ess3</groupId>

View file

@ -40,7 +40,7 @@ public class TFMHandler
public boolean isAdmin(User user)
{
return isAdmin(user.getBase());
return getTFM().al.isAdmin(user.getBase());
}
public boolean isAdmin(CommandSender sender)

View file

@ -98,7 +98,6 @@ public class Commandseen extends EssentialsCommand {
}
private void seenOnline(final Server server, final CommandSource sender, final User user, final boolean showBan, final boolean showIp, final boolean showLocation) throws Exception {
user.setDisplayNick();
sender.sendMessage(tl("seenOnline", user.getDisplayName(), DateUtil.formatDateDiff(user.getLastLogin())));
@ -130,14 +129,7 @@ public class Commandseen extends EssentialsCommand {
sender.sendMessage(tl("whoisGeoLocation", location));
}
if (showIp) {
if (sender.isPlayer()) {
JSONMessage.create(tl("whoisIPAddress", user.getBase().getAddress().getAddress().toString()))
.tooltip("Click to lookup their IP address.")
.runCommand("/seen " + user.getBase().getAddress().getAddress().toString().replace("/", ""))
.send(sender.getPlayer());
} else {
sender.sendMessage(tl("whoisIPAddress", user.getBase().getAddress().getAddress().toString()));
}
sender.sendMessage(tl("whoisIPAddress", user.getBase().getAddress().getAddress().toString()));
}
}

View file

@ -636,16 +636,6 @@ public class FakeWorld implements World {
}
@Override
public long getTicksPerWaterAmbientSpawns() {
return 0;
}
@Override
public void setTicksPerWaterAmbientSpawns(int i) {
}
@Override
public long getTicksPerAmbientSpawns() {
return 0;
@ -736,16 +726,6 @@ public class FakeWorld implements World {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getWaterAmbientSpawnLimit() {
return 0;
}
@Override
public void setWaterAmbientSpawnLimit(int i) {
}
@Override
public Entity spawnEntity(Location lctn, EntityType et) {
throw new UnsupportedOperationException("Not supported yet.");

View file

@ -5,7 +5,7 @@ main: com.earth2me.essentials.Essentials
version: ${full.version}
website: http://tiny.cc/EssentialsCommands
description: Provides an essential, core set of commands for Bukkit.
softdepend: [Vault, LuckPerms]
softdepend: [Vault, LuckPerms, TotalFreedomMod]
authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits, md_5, Iaccidentally, drtshock, vemacs, SupaHam, md678685]
api-version: "1.13"
commands:
@ -192,10 +192,6 @@ commands:
description: Throw an exploding kitten at your opponent.
usage: /<command>
aliases: [ekittycannon]
lightning:
description: The power of Thor. Strike at cursor or player.
usage: /<command> [player] [power]
aliases: [elightning,shock,eshock,smite,esmite,strike,estrike,thor,ethor]
mail:
description: Manages inter-player, intra-server mail.
usage: /<command> [read|clear|send [to] [message]|sendall [message]]

View file

@ -23,6 +23,10 @@
</scm>
<repositories>
<repository>
<id>jitpack</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>ess-repo</id>
<url>https://ci.ender.zone/plugin/repository/everything/</url>
@ -35,10 +39,6 @@
<id>paper-repo</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>jitpack</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>rayzr-repo</id>
<url>https://cdn.rawgit.com/Rayzr522/maven-repo/master/</url>