From eaed2149f9f018a4486828fea612c7322af32171 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Mon, 25 Apr 2022 18:39:58 +0200 Subject: Added .gitignore --- .../java/com/encrox/instanceddungeons/Section.java | 263 --------------------- 1 file changed, 263 deletions(-) delete mode 100644 src/main/java/com/encrox/instanceddungeons/Section.java (limited to 'src/main/java/com/encrox/instanceddungeons/Section.java') diff --git a/src/main/java/com/encrox/instanceddungeons/Section.java b/src/main/java/com/encrox/instanceddungeons/Section.java deleted file mode 100644 index 0c40b24..0000000 --- a/src/main/java/com/encrox/instanceddungeons/Section.java +++ /dev/null @@ -1,263 +0,0 @@ -package com.encrox.instanceddungeons; - -import java.io.File; -import java.util.ArrayDeque; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.HandlerList; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerMoveEvent; -import org.bukkit.plugin.Plugin; -import org.json.JSONArray; -import org.json.JSONObject; - -import com.encrox.instancedregions.InstancedProtectedCuboidRegion; -import com.sk89q.worldedit.BlockVector; - -public class Section { - - private Schematic schematic; - private String schematicFileName; - private Map exitMap; - private ArrayList players; - private BlockVector[] exits; - private BlockVector size; - private int index, depth; - private InstancedProtectedCuboidRegion region; - private Listener moveOutOfLoadingZoneListener, moveIntoLoadingZoneListener; - private volatile boolean justEntered, portal; - - public Section(JSONObject descriptor, int index, int depth) { - this.index = index; - this.depth = depth; - players = new ArrayList(); - schematicFileName = descriptor.getString("file"); - JSONArray size = descriptor.getJSONArray("size"); - this.size = new BlockVector(size.getInt(0), size.getInt(1), size.getInt(2)); - JSONArray exits = descriptor.getJSONArray("exits"); - this.exits = new BlockVector[exits.length()]; - for(int i = 0; i(); - this.schematic = new Schematic(new File(InstancedDungeons.schematicsDirectory, schematicFileName)); - if(index <= depth) { - Section next; - ArrayList
usable = new ArrayList
(); - for(int i = 0; i sections = exitMap.values().iterator(); - while(sections.hasNext()) - sections.next().addPlayer(player); - } - } - - public void removePlayer(Player player) { - players.add(player); - if(region != null) - region.removePlayer(player); - if(exitMap != null) { - Iterator
sections = exitMap.values().iterator(); - while(sections.hasNext()) - sections.next().removePlayer(player); - } - } - -} -- cgit v1.2.1