Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: StrategyCraft/StrategyCraft
base: 6101da621e
...
head fork: StrategyCraft/StrategyCraft
compare: f74524318f
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
11 net/lotrcraft/strategycraft/Config.java
@@ -75,6 +75,8 @@ public static void load() {
StrategyCraft.log.info("[StrategyCraft] Finished loading buildings.");
+
+
Configuration config = StrategyCraft.config;
config.load();
coreBlock = getInt("coreBlock", 49, config);
@@ -119,11 +121,14 @@ public static void load() {
}
int z = playerConfig.getInt("Castle.Citadel.Z", -1);
- StrategyCraft.log.info(Bukkit.getWorlds().get(1).getName());
- World world = Bukkit.getWorld(playerConfig.getString("Castle.Citadel.world", null));
+ if (isNull("Castle.Citadel.World", playerConfig)){
+ StrategyCraft.log.info("[StrategyCraft] Config for " + playerName + " missing World for citadel. Rejecting...");
+ continue;
+ }
+ World world = Bukkit.getWorld(playerConfig.getString("Castle.Citadel.World", "world"));
if (world == null) {
- StrategyCraft.log.info("[StrategyCraft] Config for " + playerName + " missing world for citadel. Rejecting...");
+ StrategyCraft.log.info("[StrategyCraft] Server is missing world defined for " + playerName + "'s citadel. Rejecting...");
continue;
}
View
11 net/lotrcraft/strategycraft/buildings/Building.java
@@ -38,11 +38,19 @@ public void build(Location l){
}
*/
+
for (int y = 0; y < s.getHeight(); y++){
for (int x = 0; x < s.getWidth(); x++){
for (int z = 0; z < s.getLength(); z++){
- l.getWorld().getBlockAt(location.getBlockX() - (s.getWidth()/2), location.getBlockY() - (s.getHeight()/2), location.getBlockZ() - (s.getLength()/2)).setData(bytes[y*s.getHeight() + x*s.getWidth() + z]);
+
+ Location tmpLoc = new Location(location.getWorld(),
+ location.getBlockX() - (s.getWidth()/2) + x,
+ location.getBlockY() - (s.getHeight()/2) + y,
+ location.getBlockZ() - (s.getLength()/2) + z);
+
+ System.out.println(tmpLoc);
+ l.getWorld().getBlockAt(tmpLoc).setData(bytes[y*s.getHeight() + x*s.getWidth() + z]);
}
}
}
@@ -66,7 +74,6 @@ public String getName(){
}
public Schematic getSchematic(){
- StrategyCraft.log.info(getName());
try {
return new Schematic(getClass().getClassLoader().getResourceAsStream(getName() + ".schematic"));
} catch (MissingSchematicError e) {
View
5 net/lotrcraft/strategycraft/buildings/Castle.java
@@ -4,6 +4,7 @@
import java.util.List;
import net.lotrcraft.strategycraft.Config;
+import net.lotrcraft.strategycraft.StrategyCraft;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@@ -27,7 +28,7 @@ public Castle (Location l, String playerName){
/**
* Gets a building at a specific location.
- * @param l
+ * @param l The Location
* @return The building if this castle has a building registered at the location. Null if not.
*/
public Building getBuildingAtLoc(Location l){
@@ -52,7 +53,7 @@ public boolean isBuildingLeft(){
*
* @param building Building to add.
* @param blockFace
- * @param blockLoc
+ * @param blockLoc Location of Core Block
* @return True if succesful
*/
public boolean addBuilding(Building building, Location blockLoc, BlockFace blockFace){
View
8 net/lotrcraft/strategycraft/units/UnitManager.java
@@ -1,9 +1,15 @@
package net.lotrcraft.strategycraft.units;
+import org.bukkit.Location;
+import org.bukkit.entity.Entity;
+
public class UnitManager {
public Entity[] getUnitsAtLoc(Location loc){
return null;
}
- public Entity[] getUnitsAtLoc(Location loc, int )
+ public Entity[] getUnitsAtLoc(Location loc, int x){
+ return null;
+
+ }
}

No commit comments for this range

Something went wrong with that request. Please try again.