src/main/java/com/dpkgsoft/temppvp/TempPVP.java
@EventHandler
    public void onPvp(EntityDamageByEntityEvent e) {
        if (e.getEntity() instanceof Player && e.getDamager() instanceof Player) {
            if (!pvp) {
                e.setCancelled(true);
                e.getDamager().sendMessage(color(config.getString("messages.damage")));
            }
        }
    }
/**
     * Things that happens on PVP
     * If player is damaging other player and pvp is off, event cancels
     *
     * @param e event
     */
Things that happens on PVP
If player is damaging other player and pvp is off, event cancels

@param e event
Things that happens on PVP If player is damaging other player and pvp is off event cancels @param e event
@EventHandler
    public void onPvp(EntityDamageByEntityEvent e) {
        if (e.getEntity() instanceof Player && e.getDamager() instanceof Player) {
            if (!pvp) {
                e.setCancelled(true);
                e.getDamager().sendMessage(color(config.getString("messages.damage")));
            }
        }
    }
@ EventHandler public void onPvp ( EntityDamageByEntityEvent e ) { if ( e . getEntity ( ) instanceof Player && e . getDamager ( ) instanceof Player ) { if ( ! pvp ) { e . setCancelled ( true ) ; e . getDamager ( ) . sendMessage ( color ( config . getString ( "messages.damage" ) ) ) ; } } }
Things that happens on PVP
 If player is damaging other player and pvp is off, event cancels
Things that happens on PVP If player is damaging other player and pvp is off event cancels