Skip to content

Commit

Permalink
Revert breaking changes and files that should be ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
Narimm committed Mar 3, 2018
1 parent ed36764 commit af72f0d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 37 deletions.
9 changes: 0 additions & 9 deletions .classpath

This file was deleted.

17 changes: 0 additions & 17 deletions .project

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void onEntityDamageByEntityEvent(EntityDamageByEntityEvent event) {
} else {
// Seeker damaged by hider
if (!arena.hidersCanHurtSeekers) {
event.setCancelled(false);
event.setCancelled(true);
return;
}
}
Expand Down
12 changes: 2 additions & 10 deletions src/nl/Steffion/BlockHunt/Listeners/OnPlayerQuitEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,12 @@
import org.bukkit.event.player.PlayerQuitEvent;

public class OnPlayerQuitEvent implements Listener {

public ArrayList<String> leftPlayer = new ArrayList<String>();
public LocationSerializable spawnWarp;


@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerQuitEvent(PlayerQuitEvent event) {
Player playerLeaving = event.getPlayer();
for (Arena arena : W.arenaList) {
if (arena.playersInArena.contains(playerLeaving)) {
spawnWarp = arena.spawnWarp;
leftPlayer.add(playerLeaving.getUniqueId().toString());
ArenaHandler.playerLeaveArena(playerLeaving, true, true);
}
}
Expand All @@ -34,9 +29,6 @@ public void onPlayerQuitEvent(PlayerQuitEvent event) {
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerJoinEvent(PlayerJoinEvent event) {
Player playerJoining = event.getPlayer();
if(leftPlayer.contains(playerJoining.getUniqueId().toString())) {
playerJoining.teleport(spawnWarp);
leftPlayer.remove(playerJoining.getUniqueId().toString());
}
playerJoining.teleport(playerJoining.getWorld().getSpawnLocation());
}
}

0 comments on commit af72f0d

Please sign in to comment.