mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-21 14:54:43 +02:00
Compare commits
4 Commits
feat/v6/co
...
6.5.0
Author | SHA1 | Date | |
---|---|---|---|
78125ff1e2 | |||
d7c8715b25 | |||
34f005c244 | |||
6fbd1376ca |
@ -102,7 +102,7 @@ public enum CommandCategory implements Caption {
|
|||||||
*
|
*
|
||||||
* @param player The player to check against
|
* @param player The player to check against
|
||||||
* @return {@code true} if at least one command of this category can be executed by the player, {@code false} otherwise
|
* @return {@code true} if at least one command of this category can be executed by the player, {@code false} otherwise
|
||||||
* @since TODO
|
* @since 6.5.0
|
||||||
*/
|
*/
|
||||||
boolean canAccess(PlotPlayer<?> player) {
|
boolean canAccess(PlotPlayer<?> player) {
|
||||||
return !MainCommand.getInstance().getCommands(this, player).isEmpty();
|
return !MainCommand.getInstance().getCommands(this, player).isEmpty();
|
||||||
|
@ -181,6 +181,10 @@ public class ComponentPresetManager {
|
|||||||
}
|
}
|
||||||
allowedPresets.add(componentPreset);
|
allowedPresets.add(componentPreset);
|
||||||
}
|
}
|
||||||
|
if (allowedPresets.isEmpty()) {
|
||||||
|
player.sendMessage(TranslatableCaption.of("preset.empty"));
|
||||||
|
return null;
|
||||||
|
}
|
||||||
final int size = (int) Math.ceil((double) allowedPresets.size() / 9.0D);
|
final int size = (int) Math.ceil((double) allowedPresets.size() / 9.0D);
|
||||||
final PlotInventory plotInventory = new PlotInventory(this.inventoryUtil, player, size,
|
final PlotInventory plotInventory = new PlotInventory(this.inventoryUtil, player, size,
|
||||||
TranslatableCaption.of("preset.title").getComponent(player)) {
|
TranslatableCaption.of("preset.title").getComponent(player)) {
|
||||||
|
@ -174,21 +174,9 @@ public class PlotListener {
|
|||||||
String greeting = plot.getFlag(GreetingFlag.class);
|
String greeting = plot.getFlag(GreetingFlag.class);
|
||||||
if (!greeting.isEmpty()) {
|
if (!greeting.isEmpty()) {
|
||||||
if (!Settings.Chat.NOTIFICATION_AS_ACTIONBAR) {
|
if (!Settings.Chat.NOTIFICATION_AS_ACTIONBAR) {
|
||||||
player.sendMessage(
|
plot.format(StaticCaption.of(greeting), player, false).thenAcceptAsync(player::sendMessage);
|
||||||
TranslatableCaption.of("flags.greeting_flag_format"),
|
|
||||||
Template.of("world", plot.getWorldName()),
|
|
||||||
Template.of("plot_id", plot.getId().toString()),
|
|
||||||
Template.of("alias", plot.getAlias()),
|
|
||||||
Template.of("greeting", greeting)
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
player.sendActionBar(
|
plot.format(StaticCaption.of(greeting), player, false).thenAcceptAsync(player::sendActionBar);
|
||||||
TranslatableCaption.of("flags.greeting_flag_format"),
|
|
||||||
Template.of("world", plot.getWorldName()),
|
|
||||||
Template.of("plot_id", plot.getId().toString()),
|
|
||||||
Template.of("alias", plot.getAlias()),
|
|
||||||
Template.of("greeting", greeting)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,21 +401,9 @@ public class PlotListener {
|
|||||||
String farewell = plot.getFlag(FarewellFlag.class);
|
String farewell = plot.getFlag(FarewellFlag.class);
|
||||||
if (!farewell.isEmpty()) {
|
if (!farewell.isEmpty()) {
|
||||||
if (!Settings.Chat.NOTIFICATION_AS_ACTIONBAR) {
|
if (!Settings.Chat.NOTIFICATION_AS_ACTIONBAR) {
|
||||||
player.sendMessage(
|
plot.format(StaticCaption.of(farewell), player, false).thenAcceptAsync(player::sendMessage);
|
||||||
TranslatableCaption.of("flags.farewell_flag_format"),
|
|
||||||
Template.of("world", plot.getWorldName()),
|
|
||||||
Template.of("plot_id", plot.getId().toString()),
|
|
||||||
Template.of("alias", plot.getAlias()),
|
|
||||||
Template.of("farewell", farewell)
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
player.sendActionBar(
|
plot.format(StaticCaption.of(farewell), player, false).thenAcceptAsync(player::sendActionBar);
|
||||||
TranslatableCaption.of("flags.farewell_flag_format"),
|
|
||||||
Template.of("world", plot.getWorldName()),
|
|
||||||
Template.of("plot_id", plot.getId().toString()),
|
|
||||||
Template.of("alias", plot.getAlias()),
|
|
||||||
Template.of("farewell", farewell)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ public class PlotInventory {
|
|||||||
* @param item the item to place
|
* @param item the item to place
|
||||||
* @return {@code true} if the item could be placed, otherwise {@code false}
|
* @return {@code true} if the item could be placed, otherwise {@code false}
|
||||||
* @see InventoryUtil#setItemChecked(PlotInventory, int, PlotItemStack)
|
* @see InventoryUtil#setItemChecked(PlotInventory, int, PlotItemStack)
|
||||||
* @since TODO
|
* @since 6.5.0
|
||||||
*/
|
*/
|
||||||
public boolean setItemChecked(int index, PlotItemStack item) {
|
public boolean setItemChecked(int index, PlotItemStack item) {
|
||||||
if (!this.inventoryUtil.setItemChecked(this, index, item)) {
|
if (!this.inventoryUtil.setItemChecked(this, index, item)) {
|
||||||
|
@ -54,7 +54,7 @@ public class PlotItemStack {
|
|||||||
* @param amount Amount of items in the stack
|
* @param amount Amount of items in the stack
|
||||||
* @param name The display name of the item stack
|
* @param name The display name of the item stack
|
||||||
* @param lore The item stack lore
|
* @param lore The item stack lore
|
||||||
* @since TODO
|
* @since 6.5.0
|
||||||
*/
|
*/
|
||||||
public PlotItemStack(
|
public PlotItemStack(
|
||||||
final ItemType type, final int amount, final String name,
|
final ItemType type, final int amount, final String name,
|
||||||
|
@ -45,7 +45,7 @@ public abstract class InventoryUtil {
|
|||||||
* @param index The index where to place the item
|
* @param index The index where to place the item
|
||||||
* @param item The item to place into the inventory
|
* @param item The item to place into the inventory
|
||||||
* @return {@code true} if the item could be placed, {@code false} otherwise (e.g. item not available in current version)
|
* @return {@code true} if the item could be placed, {@code false} otherwise (e.g. item not available in current version)
|
||||||
* @since TODO
|
* @since 6.5.0
|
||||||
*/
|
*/
|
||||||
public abstract boolean setItemChecked(
|
public abstract boolean setItemChecked(
|
||||||
final PlotInventory plotInventory, final int index,
|
final PlotInventory plotInventory, final int index,
|
||||||
|
@ -464,6 +464,7 @@
|
|||||||
"preset.preset_lore_economy_disabled": "<gray>Cost: </gray><red>Economy is disabled</red>",
|
"preset.preset_lore_economy_disabled": "<gray>Cost: </gray><red>Economy is disabled</red>",
|
||||||
"preset.preset_lore_component": "<gray>Component: </gray><gold><component></gold>",
|
"preset.preset_lore_component": "<gray>Component: </gray><gold><component></gold>",
|
||||||
"preset.title": "Plot Components",
|
"preset.title": "Plot Components",
|
||||||
|
"preset.empty": "<prefix><red>No plot component presets available.</red>",
|
||||||
"preset.economy_disabled": "<prefix><red>The component preset '<preset>' has a price set but economy is disabled.</red>",
|
"preset.economy_disabled": "<prefix><red>The component preset '<preset>' has a price set but economy is disabled.</red>",
|
||||||
"generic.generic_other": "<gray>other</gray>",
|
"generic.generic_other": "<gray>other</gray>",
|
||||||
"generic.generic_merged": "<gray>merged</gray>",
|
"generic.generic_merged": "<gray>merged</gray>",
|
||||||
@ -622,8 +623,6 @@
|
|||||||
"flags.flag_error_title": "Flag value must be in the format </red><grey>\"A title\" \"The subtitle\"</grey><red>.",
|
"flags.flag_error_title": "Flag value must be in the format </red><grey>\"A title\" \"The subtitle\"</grey><red>.",
|
||||||
"flags.area_flags": "<prefix><gray>Area flags: </gray><dark_aqua><flags></dark_aqua>",
|
"flags.area_flags": "<prefix><gray>Area flags: </gray><dark_aqua><flags></dark_aqua>",
|
||||||
"flags.road_flags": "<prefix><gray>Road flags: </gray><dark_aqua><flags></dark_aqua>",
|
"flags.road_flags": "<prefix><gray>Road flags: </gray><dark_aqua><flags></dark_aqua>",
|
||||||
"flags.greeting_flag_format": "<prefix><gold>[<world>;<plot_id>]:</gold> <greeting>",
|
|
||||||
"flags.farewell_flag_format": "<prefix><gold>[<world>;<plot_id>]:</gold> <farewell>",
|
|
||||||
"commands.description.add": "<gray>Allow a user to build in a plot while the plot owner is online.</gray>",
|
"commands.description.add": "<gray>Allow a user to build in a plot while the plot owner is online.</gray>",
|
||||||
"commands.description.alias": "<gray>Set the plot alias.</gray>",
|
"commands.description.alias": "<gray>Set the plot alias.</gray>",
|
||||||
"commands.description.area": "<gray>Create a new plot area.</gray>",
|
"commands.description.area": "<gray>Create a new plot area.</gray>",
|
||||||
|
@ -18,7 +18,7 @@ plugins {
|
|||||||
idea
|
idea
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "6.4.1-SNAPSHOT"
|
version = "6.5.0"
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "com.plotsquared"
|
group = "com.plotsquared"
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
Reference in New Issue
Block a user