3
0
Fork 0

Fixed message issue

This commit is contained in:
stijnb1234 2020-04-18 10:19:24 +02:00
parent d863e66e8c
commit ddde487295
2 changed files with 3 additions and 2 deletions

View file

@ -203,7 +203,7 @@ public class TPPCMD implements CommandExecutor {
return true;
}
if (amount != 0) {
if (amount == 0) {
if (ConfigUtil.sendConsole(sender)) sender.sendMessage(ConfigUtil.getMessage("Gates.Opened"));
} else {
if (ConfigUtil.sendConsole(sender)) sender.sendMessage(ConfigUtil.getMessage("Gates.OpenedAmount", Collections.singletonMap("%amount%", String.valueOf(amount))));

View file

@ -6,10 +6,11 @@ import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.jetbrains.annotations.NotNull;
public class AntiFreerunListener implements Listener {
@EventHandler
public void onJoin(PlayerJoinEvent e) {
public void onJoin(@NotNull PlayerJoinEvent e) {
Player p = e.getPlayer();
if (!p.hasPermission("tpp.bypassantifreerun")) {
p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1000000, -2, false, false));