Could you implement this setting? xD

This commit is contained in:
Sauilitired
2014-09-22 20:22:30 +02:00
parent b60a8fd6f9
commit deed728f93
5 changed files with 202 additions and 115 deletions

View File

@ -129,8 +129,6 @@ public class PlayerFunctions {
return plots.get(id);
}
}
else {
}
return new Plot(id, null, Biome.FOREST, new ArrayList<UUID>(), new ArrayList<UUID>(), world.getName());
}

View File

@ -574,10 +574,6 @@ public class PlotMain extends JavaPlugin {
Settings.DB.DATABASE = storage.getString("mysql_database");
}
{
Settings.Update.AUTO_UPDATE = config.getBoolean("auto_update");
//Web
Web.ENABLED = config.getBoolean("web.enabled");
Web.PORT = config.getInt("web.port");
@ -645,7 +641,7 @@ public class PlotMain extends JavaPlugin {
}
else {
ChunkGenerator gen = world.getGenerator();
if (gen==null || gen.toString().equals("PlotSquared")) {
if (gen==null || !gen.toString().equals("PlotSquared")) {
Logger.add(LogLevel.WARNING, "World '"+node+"' in settings.yml is not using PlotSquared generator");
}
}

View File

@ -1,9 +1,9 @@
package com.intellectualcrafters.plot;
import java.util.ArrayList;
import org.bukkit.Material;
import java.util.ArrayList;
public class PlotWorld {
/**
* Road Height
@ -159,5 +159,9 @@ public class PlotWorld {
* Blocks available in /p set
*/
public static ArrayList<Material> BLOCKS = new ArrayList<Material>();
public boolean SCHEMATIC_ON_CLAIM = false;
public String SCHEMATIC_FILE = "null";
}

View File

@ -55,6 +55,12 @@ public class Claim extends SubCommand{
if(teleport) {
PlotMain.teleportPlayer(player, player.getLocation(), plot);
}
PlotWorld world = PlotMain.getWorldSettings(plot.getWorld());
if(world.SCHEMATIC_ON_CLAIM) {
SchematicHandler handler = new SchematicHandler();
SchematicHandler.Schematic schematic = handler.getSchematic(world.SCHEMATIC_FILE);
handler.paste(player.getLocation(), schematic, plot);
}
}
return event.isCancelled();
}