mirror of
https://github.com/Freezy-Studios/BlazeSMP.git
synced 2025-04-21 19:44:05 +02:00
Use of Pattern Variable
This commit is contained in:
parent
286919ce6c
commit
595e3005d7
1 changed files with 1 additions and 3 deletions
|
@ -17,9 +17,7 @@ public class PlayerVsPlayerListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPVP(EntityDamageByEntityEvent event) {
|
public void onPVP(EntityDamageByEntityEvent event) {
|
||||||
if (event.getDamager() instanceof Player && event.getEntity() instanceof Player) {
|
if (event.getDamager() instanceof Player damager && event.getEntity() instanceof Player victim) {
|
||||||
Player damager = (Player) event.getDamager();
|
|
||||||
Player victim = (Player) event.getEntity();
|
|
||||||
|
|
||||||
Clan damagerClan = clanManager.getClanByMember(damager.getUniqueId());
|
Clan damagerClan = clanManager.getClanByMember(damager.getUniqueId());
|
||||||
Clan victimClan = clanManager.getClanByMember(victim.getUniqueId());
|
Clan victimClan = clanManager.getClanByMember(victim.getUniqueId());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue