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 org.bukkit.util.Vector;

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.getPlayer().setVelocity(reverse(event.getPlayer().getVelocity()));
            event.getPlayer().sendMessage("[CombatTag] You can't enter a safezone while combat tagged");
        }
    }

    public static Vector reverse(Vector vector) {
	Vector reverse = vector.multiply(-1);
	reverse.setY(0); //Don't fly
	return reverse;
    }
}
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");
        }
    }
}
--- 
+++ 
@@ -4,6 +4,7 @@
 import org.bukkit.event.EventHandler;
 import org.bukkit.event.Listener;
 import org.bukkit.event.player.PlayerMoveEvent;
+import org.bukkit.util.Vector;
 
 import com.trc202.CombatTag.CombatTag;
 
@@ -22,8 +23,14 @@
         if (event.getPlayer().hasPermission("combattag.safezone.ignore"));
         if (!plugin.inTagged(event.getPlayer().getUniqueId())) return;
         if (PluginCompatibility.isPvpDisabled(event.getTo())) {
-            event.setCancelled(true);
+            event.getPlayer().setVelocity(reverse(event.getPlayer().getVelocity()));
             event.getPlayer().sendMessage("[CombatTag] You can't enter a safezone while combat tagged");
         }
     }
+
+    public static Vector reverse(Vector vector) {
+	Vector reverse = vector.multiply(-1);
+	reverse.setY(0); //Don't fly
+	return reverse;
+    }
 }
Use velocity to bounce players back
