Fixed message issue
This commit is contained in:
parent
d863e66e8c
commit
ddde487295
2 changed files with 3 additions and 2 deletions
|
@ -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))));
|
||||
|
|
|
@ -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));
|
||||
|
|
Reference in a new issue