package techcable.minecraft.combattag.listeners;

import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;

import com.trc202.CombatTag.CombatTag;

import techcable.minecraft.combattag.PluginCompatibility;
import techcable.minecraft.combattag.Utils;

public class PlayerListener implements Listener {
    private CombatTag plugin;
    public PlayerListener(CombatTag plugin) {
        this.plugin = plugin;
    }

    @EventHandler
    public void onMove(PlayerMoveEvent event) {
        if (!plugin.settings.isStopCombatSafezoning()) return;
        if (event.getPlayer().hasPermission("combattag.safezone.ignore"));
        if (!plugin.inTagged(event.getPlayer().getUniqueId())) return;
        if (PluginCompatibility.isPvpDisabled(event.getTo())) {
            event.setCancelled(true);
            event.getPlayer().sendMessage("[CombatTag] You can't enter a safezone while combat tagged");
        }
    }
}
@@ -188,16 +188,47 @@
 veEvent;
+%0Aimport org.bukkit.util.Vector;
 %0A%0Aimport
@@ -888,25 +888,72 @@
 ent.
-setCancelled(true
+getPlayer().setVelocity(reverse(event.getPlayer().getVelocity())
 );%0A 
@@ -1056,16 +1056,16 @@
 gged%22);%0A
-
         
@@ -1071,10 +1071,153 @@
  %7D%0A    %7D
+%0A%0A    public static Vector reverse(Vector vector) %7B%0A%09Vector reverse = vector.multiply(-1);%0A%09reverse.setY(0); //Don't fly%0A%09return reverse;%0A    %7D
 %0A%7D

Use velocity to bounce players back