mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Merge branch 'breaking' of https://github.com/IntellectualSites/PlotSquared into breaking
This commit is contained in:
commit
1341100f03
@ -126,6 +126,7 @@ permissions:
|
|||||||
plots.toggle: true
|
plots.toggle: true
|
||||||
plots.toggle.titles: true
|
plots.toggle.titles: true
|
||||||
plots.toggle.chat: true
|
plots.toggle.chat: true
|
||||||
|
plots.toggle.time: true
|
||||||
plots.set.biome: true
|
plots.set.biome: true
|
||||||
plots.set.home: true
|
plots.set.home: true
|
||||||
plots.set.alias: true
|
plots.set.alias: true
|
||||||
|
@ -75,6 +75,18 @@ import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@CommandDeclaration(command = "time", permission = "plots.toggle.time",
|
||||||
|
description = "Toggle plot time settings")
|
||||||
|
public void time(Command command, PlotPlayer player, String[] args,
|
||||||
|
RunnableVal3<Command, Runnable, Runnable> confirm,
|
||||||
|
RunnableVal2<Command, CommandResult> whenDone) {
|
||||||
|
if (toggle(player, "disabletime")) {
|
||||||
|
MainUtil.sendMessage(player, Captions.TOGGLE_ENABLED, command.toString());
|
||||||
|
} else {
|
||||||
|
MainUtil.sendMessage(player, Captions.TOGGLE_DISABLED, command.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean toggle(PlotPlayer player, String key) {
|
public boolean toggle(PlotPlayer player, String key) {
|
||||||
if (player.getAttribute(key)) {
|
if (player.getAttribute(key)) {
|
||||||
player.removeAttribute(key);
|
player.removeAttribute(key);
|
||||||
|
@ -52,6 +52,7 @@ public enum Captions {
|
|||||||
PERMISSION_WORLDEDIT_BYPASS("plots.worldedit.bypass", "static.permissions"),
|
PERMISSION_WORLDEDIT_BYPASS("plots.worldedit.bypass", "static.permissions"),
|
||||||
PERMISSION_PLOT_TOGGLE_TITLES("plots.toggle.titles", "static.permissions"),
|
PERMISSION_PLOT_TOGGLE_TITLES("plots.toggle.titles", "static.permissions"),
|
||||||
PERMISSION_PLOT_TOGGLE_CHAT("plots.toggle.chat", "static.permissions"),
|
PERMISSION_PLOT_TOGGLE_CHAT("plots.toggle.chat", "static.permissions"),
|
||||||
|
PERMISSION_PLOT_TOGGLE_TIME("plots.toggle.time", "static.permissions"),
|
||||||
PERMISSION_ADMIN_UPDATE_NOTIFICATION("plots.admin.update.notify", "static.permissions"),
|
PERMISSION_ADMIN_UPDATE_NOTIFICATION("plots.admin.update.notify", "static.permissions"),
|
||||||
PERMISSION_ADMIN_EXIT_DENIED("plots.admin.exit.denied", "static.permissions"),
|
PERMISSION_ADMIN_EXIT_DENIED("plots.admin.exit.denied", "static.permissions"),
|
||||||
PERMISSION_ADMIN_ENTRY_DENIED("plots.admin.entry.denied", "static.permissions"),
|
PERMISSION_ADMIN_ENTRY_DENIED("plots.admin.entry.denied", "static.permissions"),
|
||||||
|
@ -44,7 +44,7 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
Files.readAllBytes(sideRoad.toPath())));
|
Files.readAllBytes(sideRoad.toPath())));
|
||||||
}
|
}
|
||||||
File intersection =
|
File intersection =
|
||||||
MainUtil.getFile(PlotSquared.get().IMP.getDirectory(), "intersection.schem");
|
MainUtil.getFile(PlotSquared.get().IMP.getDirectory(), dir + "intersection.schem");
|
||||||
if (intersection.exists()) {
|
if (intersection.exists()) {
|
||||||
files.add(new FileBytes(newDir + "intersection.schem",
|
files.add(new FileBytes(newDir + "intersection.schem",
|
||||||
Files.readAllBytes(intersection.toPath())));
|
Files.readAllBytes(intersection.toPath())));
|
||||||
|
@ -122,7 +122,7 @@ public class PlotListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Optional<Long> timeFlag = plot.getFlag(Flags.TIME);
|
Optional<Long> timeFlag = plot.getFlag(Flags.TIME);
|
||||||
if (timeFlag.isPresent()) {
|
if (timeFlag.isPresent() && !player.getAttribute("disabletime")) {
|
||||||
try {
|
try {
|
||||||
long time = timeFlag.get();
|
long time = timeFlag.get();
|
||||||
player.setTime(time);
|
player.setTime(time);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
This will increase a player's allowed plots by the provided value
|
This will increase a player's allowed plots by the provided value
|
||||||
/plot debugexec runasync addperm <player> <amount>
|
/plot debugexec runasync addplots.js <player> <amount>
|
||||||
*/
|
*/
|
||||||
var uuid = UUIDHandler.getUUID('%s0', null);
|
var uuid = UUIDHandler.getUUID('%s0', null);
|
||||||
if (uuid === null) {
|
if (uuid === null) {
|
||||||
|
@ -1,32 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Need to script something quick with PlotSquared?
|
|
||||||
/plot debugexec runasync automerge.js <removeroads>
|
|
||||||
|
|
||||||
This is an example script that will auto merge all plots
|
This is an example script that will auto merge all plots
|
||||||
|
/plot debugexec runasync automerge.js <removeroads>
|
||||||
The following utility classes are usable:
|
|
||||||
- PlotSquared
|
|
||||||
- TaskManager
|
|
||||||
- TitleManager
|
|
||||||
- ConsolePlayer
|
|
||||||
- SchematicHandler
|
|
||||||
- ChunkManager
|
|
||||||
- BlockManager
|
|
||||||
- SetupUtils
|
|
||||||
- EventUtil
|
|
||||||
- UUIDHandler
|
|
||||||
- DBFunc
|
|
||||||
- HybridUtils
|
|
||||||
- IMP ( BukkitMain or SpongeMain)
|
|
||||||
- MainCommand
|
|
||||||
- MainUtil
|
|
||||||
- Settings
|
|
||||||
- StringMan
|
|
||||||
- MathMan
|
|
||||||
- C ( use C_ )
|
|
||||||
- Permissions ( use Permissions_ )
|
|
||||||
|
|
||||||
For more information see: https://github.com/IntellectualSites/PlotSquared/wiki/Scripting
|
|
||||||
*/
|
*/
|
||||||
var plots = PS.sortPlotsByTemp(PS.getPlots());
|
var plots = PS.sortPlotsByTemp(PS.getPlots());
|
||||||
PS.class.static.log("Attempting to auto merge " + plots.size() + " plots");
|
PS.class.static.log("Attempting to auto merge " + plots.size() + " plots");
|
||||||
|
Binary file not shown.
@ -1,31 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Need to script something quick with PlotSquared?
|
Fixes border around plots
|
||||||
/plot debugexec runasync fixborder.js <id>
|
/plot debugexec runasync fixborder.js <Plot ID>
|
||||||
|
|
||||||
|
|
||||||
The following utility classes are usable:
|
|
||||||
- PS
|
|
||||||
- TaskManager
|
|
||||||
- TitleManager
|
|
||||||
- ConsolePlayer
|
|
||||||
- SchematicHandler
|
|
||||||
- ChunkManager
|
|
||||||
- BlockManager
|
|
||||||
- SetupUtils
|
|
||||||
- EventUtil
|
|
||||||
- UUIDHandler
|
|
||||||
- DBFunc
|
|
||||||
- HybridUtils
|
|
||||||
- IMP ( BukkitMain or SpongeMain)
|
|
||||||
- MainCommand
|
|
||||||
- MainUtil
|
|
||||||
- Settings
|
|
||||||
- StringMan
|
|
||||||
- MathMan
|
|
||||||
- C ( use C_ )
|
|
||||||
- Permissions ( use Permissions_ )
|
|
||||||
|
|
||||||
For more information see: https://github.com/IntellectualSites/PlotSquared/wiki/Scripting
|
|
||||||
*/
|
*/
|
||||||
var plots = PS.sortPlotsByTemp(PS.getPlots());
|
var plots = PS.sortPlotsByTemp(PS.getPlots());
|
||||||
PS.class.static.log("Attempting to fix border for " + plots.size() + " plots");
|
PS.class.static.log("Attempting to fix border for " + plots.size() + " plots");
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -119,6 +119,7 @@ permissions:
|
|||||||
plots.toggle: true
|
plots.toggle: true
|
||||||
plots.toggle.titles: true
|
plots.toggle.titles: true
|
||||||
plots.toggle.chat: true
|
plots.toggle.chat: true
|
||||||
|
plots.toggle.time: true
|
||||||
plots.set.biome: true
|
plots.set.biome: true
|
||||||
plots.set.home: true
|
plots.set.home: true
|
||||||
plots.set.alias: true
|
plots.set.alias: true
|
||||||
|
Loading…
Reference in New Issue
Block a user