mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-28 11:44:42 +02:00
Could you implement this setting? xD
This commit is contained in:
@ -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());
|
||||
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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";
|
||||
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user