Fix zh_HK not being loaded due to case.

* Add more translations for flag and option UI.
* Add new config setting 'claim-block-task-move-threshold' to control
  the mininum threshold of movement (in blocks) required to receive
  accrued claim blocks.
This commit is contained in:
bloodshot 2020-12-31 14:24:41 -05:00
parent 15b253130e
commit c419c83de1
19 changed files with 141 additions and 36 deletions

View File

@ -298,6 +298,11 @@ public class MessageCache {
public Component FLAG_UI_CLICK_ALLOW;
public Component FLAG_UI_CLICK_DENY;
public Component FLAG_UI_CLICK_REMOVE;
public Component FLAG_UI_EVENT_CANCEL;
public Component FLAG_UI_HOVER_ACTIVE_RESULT;
public Component FLAG_UI_HOVER_DEFAULT_VALUE;
public Component FLAG_UI_HOVER_DEFINITION_CONTEXTS;
public Component FLAG_UI_HOVER_PARTIAL;
public Component FLAG_UI_INFO_CLAIM;
public Component FLAG_UI_INFO_DEFAULT;
public Component FLAG_UI_INFO_INHERIT;
@ -407,6 +412,7 @@ public class MessageCache {
public Component OPTION_DESCRIPTION_TAX_EXPIRATION_DAYS_KEEP;
public Component OPTION_DESCRIPTION_TAX_RATE;
public Component OPTION_UI_CLICK_REMOVE;
public Component OPTION_UI_NOT_DEFINED;
public Component OWNER_ADMIN;
public Component PERMISSION_ASSIGN_WITHOUT_HAVING;
public Component PERMISSION_CLAIM_CREATE;
@ -514,9 +520,12 @@ public class MessageCache {
public Component UI_CLICK_ADD_GROUP;
public Component UI_CLICK_ADD_PLAYER;
public Component UI_CLICK_CONFIRM;
public Component UI_CLICK_RECORD_CHAT;
public Component UI_CLICK_REMOVE;
public Component UI_CLICK_VIEW_TRANSACTIONS;
public Component UI_CONFLICT_DATA;
public Component UI_PAY_NEXT_DUE_DATE;
public Component UI_RECORD_CHAT;
public Component UNTRUST_NO_CLAIMS;
public Component UNTRUST_SELF;
@ -771,6 +780,11 @@ public class MessageCache {
FLAG_UI_CLICK_ALLOW = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-click-allow");
FLAG_UI_CLICK_DENY = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-click-deny");
FLAG_UI_CLICK_REMOVE = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-click-remove");
FLAG_UI_EVENT_CANCEL = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-event-cancel");
FLAG_UI_HOVER_ACTIVE_RESULT = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-hover-active-result");
FLAG_UI_HOVER_DEFAULT_VALUE = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-hover-default-value");
FLAG_UI_HOVER_DEFINITION_CONTEXTS = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-hover-definition-contexts");
FLAG_UI_HOVER_PARTIAL = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-hover-partial");
FLAG_UI_INFO_CLAIM = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-info-claim");
FLAG_UI_INFO_DEFAULT = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-info-default");
FLAG_UI_INFO_INHERIT = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-info-inherit");
@ -880,6 +894,7 @@ public class MessageCache {
OPTION_DESCRIPTION_TAX_EXPIRATION_DAYS_KEEP = MessageStorage.MESSAGE_DATA.getMessage("option-description-tax-expiration-days-keep");
OPTION_DESCRIPTION_TAX_RATE = MessageStorage.MESSAGE_DATA.getMessage("option-description-tax-rate");
OPTION_UI_CLICK_REMOVE = MessageStorage.MESSAGE_DATA.getMessage("option-ui-click-remove");
OPTION_UI_NOT_DEFINED = MessageStorage.MESSAGE_DATA.getMessage("option-ui-not-defined");
OWNER_ADMIN = MessageStorage.MESSAGE_DATA.getMessage("owner-admin");
PERMISSION_ASSIGN_WITHOUT_HAVING = MessageStorage.MESSAGE_DATA.getMessage("permission-assign-without-having");
PERMISSION_CLAIM_CREATE = MessageStorage.MESSAGE_DATA.getMessage("permission-claim-create");
@ -987,9 +1002,12 @@ public class MessageCache {
UI_CLICK_ADD_GROUP = MessageStorage.MESSAGE_DATA.getMessage("ui-click-add-group");
UI_CLICK_ADD_PLAYER = MessageStorage.MESSAGE_DATA.getMessage("ui-click-add-player");
UI_CLICK_CONFIRM = MessageStorage.MESSAGE_DATA.getMessage("ui-click-confirm");
UI_CLICK_RECORD_CHAT = MessageStorage.MESSAGE_DATA.getMessage("ui-click-record-chat");
UI_CLICK_REMOVE = MessageStorage.MESSAGE_DATA.getMessage("ui-click-remove");
UI_CLICK_VIEW_TRANSACTIONS = MessageStorage.MESSAGE_DATA.getMessage("ui-click-view-transactions");
UI_CONFLICT_DATA = MessageStorage.MESSAGE_DATA.getMessage("ui-conflict-data");
UI_PAY_NEXT_DUE_DATE = MessageStorage.MESSAGE_DATA.getMessage("ui-pay-next-due-date");
UI_RECORD_CHAT = MessageStorage.MESSAGE_DATA.getMessage("ui-record-chat");
UNTRUST_NO_CLAIMS = MessageStorage.MESSAGE_DATA.getMessage("untrust-no-claims");
UNTRUST_SELF = MessageStorage.MESSAGE_DATA.getMessage("untrust-self");

View File

@ -282,10 +282,10 @@ public abstract class ClaimFlagBase extends BaseCommand {
Component footer = null;
if (player.hasPermission(GDPermissions.ADVANCED_FLAGS)) {
footer = TextComponent.builder().append(whiteOpenBracket)
.append(TextComponent.of("PRESET").color(TextColor.GOLD)).append(whiteCloseBracket)
.append(MessageCache.getInstance().TITLE_PRESET.color(TextColor.GOLD)).append(whiteCloseBracket)
.append(" ")
.append(TextComponent.builder()
.append(TextComponent.of("ADVANCED").color(TextColor.GRAY)
.append(MessageCache.getInstance().TITLE_ADVANCED.color(TextColor.GRAY)
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createClaimFlagConsumer(src, claim, lastActiveMenu)))))
.build())
.build();
@ -681,14 +681,14 @@ public abstract class ClaimFlagBase extends BaseCommand {
TextComponent.Builder valueBuilder = TextComponent.builder();
if (!properResult) {
if (hasEditPermission) {
hoverBuilder.append("Conflict Data : \n");
hoverBuilder.append(MessageCache.getInstance().UI_CONFLICT_DATA).append(" : ").append("\n");
for (GDActiveFlagData definitionFlagData : definitionResults) {
hoverBuilder.append(definitionFlagData.getComponent(flagGroup))
.append("\n");
}
hasHover = true;
}
valueBuilder.append("partial");
valueBuilder.append(MessageCache.getInstance().FLAG_UI_HOVER_PARTIAL);
defaultResult = null;
} else {
TextColor valueColor = TextColor.GRAY;
@ -715,7 +715,7 @@ public abstract class ClaimFlagBase extends BaseCommand {
hasHover = true;
if (properResult) {
hoverBuilder.append("\nDefault Value: ", TextColor.AQUA);
hoverBuilder.append("\n").append(MessageCache.getInstance().FLAG_UI_HOVER_DEFAULT_VALUE.color(TextColor.AQUA)).append(": ");
final Tristate defaultValue = customFlag.getDefaultValue();
if (defaultValue == Tristate.UNDEFINED) {
hoverBuilder.append(customFlag.getDefaultValue().toString().toLowerCase(), TextColor.GRAY);
@ -727,7 +727,7 @@ public abstract class ClaimFlagBase extends BaseCommand {
if (src.getInternalPlayerData().canManageAdminClaims) {
if (!customFlag.getContexts().isEmpty()) {
hoverBuilder.append("\nDefinition Contexts: ");
hoverBuilder.append("\n").append(MessageCache.getInstance().FLAG_UI_HOVER_DEFINITION_CONTEXTS).append(": ");
hoverBuilder.append("\ngd_claim", TextColor.AQUA)
.append("=", TextColor.WHITE)
.append(claim.getUniqueId().toString(), TextColor.GRAY);
@ -761,11 +761,11 @@ public abstract class ClaimFlagBase extends BaseCommand {
if (src.getInternalPlayerData().canManageAdminClaims) {
for (FlagData flagData : customFlag.getFlagData()) {
hoverBuilder.append("\nFlag: ")
hoverBuilder.append("\n").append(MessageCache.getInstance().LABEL_FLAG).append(": ")
.append(flagData.getFlag().getName(), TextColor.GREEN);
if (!flagData.getContexts().isEmpty()) {
hoverBuilder.append("\nContexts: ");
hoverBuilder.append("\n").append(MessageCache.getInstance().LABEL_CONTEXT).append(": ");
}
for (Context context : flagData.getContexts()) {
hoverBuilder.append("\n");
@ -779,7 +779,7 @@ public abstract class ClaimFlagBase extends BaseCommand {
// show active value
final GDActiveFlagData activeData = this.getActiveDefinitionResult(claim, customFlag, flagData);
hoverBuilder.append("\nActive Result: ")
hoverBuilder.append("\n").append(MessageCache.getInstance().FLAG_UI_HOVER_ACTIVE_RESULT).append(": ")
.append("\nvalue", TextColor.DARK_AQUA)
.append("=", TextColor.WHITE)
.append(activeData.getValue().name().toLowerCase(), TextColor.GOLD)

View File

@ -678,7 +678,7 @@ public abstract class ClaimOptionBase extends BaseCommand {
}
TextComponent.Builder builder = TextComponent.builder()
.append("\n\nContexts: \n");
.append("\n\n").append(MessageCache.getInstance().LABEL_CONTEXT).append(": \n");
for (Context context : contexts) {
final String key = context.getKey();
@ -794,7 +794,7 @@ public abstract class ClaimOptionBase extends BaseCommand {
Integer value = getMenuTypeValue(TypeToken.of(Integer.class), currentValue);
if (leftArrow) {
if (value == null || value < 1) {
TextAdapter.sendComponent(src.getOnlinePlayer(), TextComponent.of("This value is NOT defined and cannot go any lower."));
TextAdapter.sendComponent(src.getOnlinePlayer(), MessageCache.getInstance().OPTION_UI_NOT_DEFINED.color(TextColor.RED));
} else {
if ((option == Options.MIN_LEVEL || option == Options.MAX_LEVEL || option == Options.MIN_SIZE_Y || option == Options.MAX_SIZE_Y) && value == 1) {
value = null;
@ -826,7 +826,7 @@ public abstract class ClaimOptionBase extends BaseCommand {
Double value = getMenuTypeValue(TypeToken.of(Double.class), currentValue);
if (leftArrow) {
if (value == null || value < 0) {
TextAdapter.sendComponent(src.getOnlinePlayer(), TextComponent.of("This value is NOT defined and cannot go any lower."));
TextAdapter.sendComponent(src.getOnlinePlayer(), MessageCache.getInstance().OPTION_UI_NOT_DEFINED.color(TextColor.RED));
} else {
value -= 0.1;
if (option == Options.ABANDON_RETURN_RATIO && value <= 0) {

View File

@ -43,6 +43,9 @@ public class ClaimCategory extends ConfigCategory {
public List<String> explosionEntitySurfaceBlacklist = new ArrayList<>();
@Setting(value = "explosion-surface-block-level", comment = "The 'Y' block level that is considered the surface for explosions. (Default: 63)")
public int explosionSurfaceBlockLevel = 63;
@Setting(value = "claim-block-task-move-threshold", comment = "The minimum threshold of movement (in blocks) required to receive accrued claim blocks. (Default: 0)"
+ "\nNote: The claim block task runs every 5 minutes which is the time each player will get to move the required amount of blocks.")
public int claimBlockTaskMoveThreshold = 0;
@Setting(value = "piston-protection-in-claims", comment = "Whether piston protection should be enabled within claims. Note: This does not affect pistons crossing into another claim, that is always protected. This only determines whether or not GD should process pistons if it doesn't cross into another claim.")
public boolean pistonProtectionInClaims = false;
@Setting(value = "auto-chest-claim-block-radius", comment = "Radius used (in blocks) for auto-created claim when a chest is placed. Set to -1 to disable chest claim creation.")

View File

@ -51,6 +51,7 @@ public class ClaimBlockTask extends BukkitRunnable {
@Override
public void run() {
for (World world : Bukkit.getServer().getWorlds()) {
final int blockMoveThreshold = GriefDefenderPlugin.getActiveConfig(world).getConfig().claim.claimBlockTaskMoveThreshold;
for (Player player : world.getPlayers()) {
final GDPlayerData playerData = GriefDefenderPlugin.getInstance().dataStore.getOrCreatePlayerData(player.getWorld(), player.getUniqueId());
final GDClaim claim = GriefDefenderPlugin.getInstance().dataStore.getClaimAtPlayer(playerData, player.getLocation());
@ -60,7 +61,7 @@ public class ClaimBlockTask extends BukkitRunnable {
Location lastLocation = playerData.lastAfkCheckLocation;
// if he's not in a vehicle and has moved at least three blocks since the last check and he's not being pushed around by fluids
if (player.getVehicle() == null &&
(lastLocation == null || lastLocation.getWorld() != player.getWorld() || lastLocation.distanceSquared(player.getLocation()) >= 0) &&
(lastLocation == null || lastLocation.getWorld() != player.getWorld() || lastLocation.distanceSquared(player.getLocation()) > (blockMoveThreshold * blockMoveThreshold)) &&
!NMSUtil.getInstance().isBlockWater(player.getLocation().getBlock())) {
int accruedBlocks = playerData.getBlocksAccruedPerHour() / 12;
if (accruedBlocks < 0) {

View File

@ -74,9 +74,9 @@ public class ChatCaptureUtil {
final Component chatSettings = TextComponent.builder()
.append(TextComponent.builder()
.append(whiteOpenBracket)
.append("RECORD-CHAT").color(TextColor.GOLD).append(whiteCloseBracket)
.append(MessageCache.getInstance().UI_RECORD_CHAT).color(TextColor.GOLD).append(whiteCloseBracket)
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createChatSettingsConsumer(player, claim, command, returnComponent))))
.hoverEvent(HoverEvent.showText(TextComponent.of("Click here to see recorded chat.")))
.hoverEvent(HoverEvent.showText(MessageCache.getInstance().UI_CLICK_RECORD_CHAT))
.build())
.append(TextComponent.builder()
.append(" ")

View File

@ -499,6 +499,11 @@ GriefDefender {
flag-ui-click-deny="Klicke hier, um die Einstellung auf Verboten zu setzen."
flag-ui-click-remove="Klicke hier, um die Einstellung zu entfernen."
flag-ui-click-toggle="Klicke hier, um zwischen den Einstellungen für {flag}&f zu wechseln."
flag-ui-event-cancel="Die Einstellungen konnten nicht geändert werden, das Event wurde von einem Plugin blockiert."
flag-ui-hover-active-result="Resultado Activo"
flag-ui-hover-default-value="Valor por defecto"
flag-ui-hover-definition-contexts="Contextos de definición"
flag-ui-hover-partial="parcial"
flag-ui-info-claim="Das Grundstück überschreibt Standardeinstellungen, um spezifische Einstellungen zu ermöglichen."
flag-ui-info-default="Standardeinstellungen werden zuletzt überprüft. Grundstücke und Überschreibende Einstellungen haben Priorität."
flag-ui-info-inherit="Vererbte Einstellungen können nicht abgeändert werden."
@ -629,6 +634,7 @@ GriefDefender {
option-set-target="&aSetze {type}&a für Option &b{option}&a auf {value}&a mit dem Kontext &7{contexts}&a für &6{target}&a."
option-ui-click-toggle="Klicke hier, um {option}&f umzuschalten."
option-ui-inherit-parent="Diese Option wird vererbt von {name}&f und &nkann nicht&f geändert werde."
option-ui-not-defined="Este valor NO está definido y no puede ser reducido."
option-ui-overridden="&cFehler. Die Option &f{option}&c wurde von einem Admin überschrieben."
option-ui-override-no-permission="Diese Option wurde von einem Admin überschrieben und kann &n&cNICHT&f geändert werden."
owner-admin="einem Administrator"
@ -829,10 +835,13 @@ GriefDefender {
ui-click-add-target="Klicke hier, um &6{target}&f hinzuzufügen"
ui-click-confirm="Bestätigen"
ui-click-filter-type="Filtern nach: {type}&f"
ui-click-record-chat="Click aquí para ver el chat guardado."
ui-click-remove="Klicke hier, um den Eintrag zu entfernen"
ui-click-return-command="&bZurück zu &6{command}"
ui-click-view="Zum Anzeigen von {target} hier klicken"
ui-click-view-transactions="Click here to view transactions."
ui-conflict-data="Información conflictiva"
ui-record-chat="GUARDAR-CHAT"
untrust-individual-all-claims="&6{target}&a Erlaubnisse für deine Grundstücke zurückgenommen. Um Berechtigungen einzelner Grundstücke zu entfernen, stelle dich drauf und nutze: &f/untrust&a."
untrust-individual-single-claim="&6{target}&a Erlaubnis für dieses Grundstück entfernt. Um Berechtigungen für alle Grundstücke zu entfernen, nutze: &f/untrustall&a."
untrust-no-claims="&cDu hast keine Grundstücke mit Rechten für andere Spieler."

View File

@ -499,6 +499,11 @@ GriefDefender {
flag-ui-click-deny="Click here to deny this flag."
flag-ui-click-remove="Click here to remove this flag."
flag-ui-click-toggle="Click here to toggle {flag}&f value."
flag-ui-event-cancel="Could not toggle flag definition! Event was cancelled by a plugin."
flag-ui-hover-active-result="Active Result"
flag-ui-hover-default-value="Default Value"
flag-ui-hover-definition-contexts="Definition Contexts"
flag-ui-hover-partial="partial"
flag-ui-info-claim="Claim is checked before default values. Allows claim owners to specify flag settings in claim only."
flag-ui-info-default="Default is last to be checked. Both claim and override take priority over this."
flag-ui-info-inherit="Inherit is an enforced flag set by a parent claim that cannot changed."
@ -629,6 +634,7 @@ GriefDefender {
option-set-target="&aSet {type}&a option &b{option}&a to {value}&a with contexts &7{contexts}&a on &6{target}&a."
option-ui-click-toggle="Click here to toggle {option}&f value."
option-ui-inherit-parent="This option is inherited from parent claim {name}&f and &ncannot&f be changed."
option-ui-not-defined="This value is NOT defined and cannot go any lower."
option-ui-overridden="&cFailed to set option. The option &f{option}&c has been overridden by an admin."
option-ui-override-no-permission="This option has been overridden by an administrator and can &n&cNOT&f be changed."
owner-admin="an administrator"
@ -829,10 +835,13 @@ GriefDefender {
ui-click-add-target="Click here to add &6{target}&f"
ui-click-confirm="Click to confirm"
ui-click-filter-type="Click here to filter by {type}&f"
ui-click-record-chat="Click here to see recorded chat."
ui-click-remove="Click here to remove"
ui-click-return-command="&bReturn to &6{command}"
ui-click-view="Click here to view {target}"
ui-click-view-transactions="Click here to view transactions."
ui-conflict-data="Conflict Data"
ui-record-chat="RECORD-CHAT"
untrust-individual-all-claims="&aRevoked &6{target}'s&a access to ALL your claims. To set permissions for a single claim, stand inside it and use &f/untrust&a."
untrust-individual-single-claim="&aRevoked &6{target}'s&a access to this claim. To unset permissions for ALL your claims, use &f/untrustall&a."
untrust-no-claims="&cYou have no claims to untrust."

View File

@ -499,6 +499,11 @@ GriefDefender {
flag-ui-click-deny="CLICK AQUI para DENEGAR este flag."
flag-ui-click-remove="CLICK AQUI para ELIMINAR este flag."
flag-ui-click-toggle="CLICK AQUI para ALTERNAR el valor &6&o'{flag}'"
flag-ui-event-cancel="No se ha podido activar esta flag. El evento ha sido cancelado por otro plugin."
flag-ui-hover-active-result="Resultado Activo"
flag-ui-hover-default-value="Valor por defecto"
flag-ui-hover-definition-contexts="Contextos de definición"
flag-ui-hover-partial="parcial"
flag-ui-info-claim="Claim se comprueba antes de los valores predeterminados. Permite a los dueños del terreno especificar las configuraciones de Flag's de ese Claim."
flag-ui-info-default="Predeterminado es lo último en comprobarse. Claim y Override tienen prioridad sobre este."
flag-ui-info-inherit="Herencia es forzada a establecer un flag por los Parent del Claim que no pueden ser cambiados."
@ -629,6 +634,7 @@ GriefDefender {
option-set-target="&aEstablecido ( &e&o{type}&a ) una opción ( &b&o{option} &a)&a en (&6&o {value} &a)&a con el Contexto de (&7&o {contexts} &a)&a en el Objetivo de ( &c&o{target} &a)"
option-ui-click-toggle="&6&lCLICK-AQUI &fpara &aACTIVAR&f/&cDESACTIVAR &fel valor &6&o'{option}'"
option-ui-inherit-parent="&fEsta opción se hereda de un Parent Claim ( &6&o{name} &f) y &4&lNO&c puede ser modificada&f."
option-ui-not-defined="Este valor NO está definido y no puede ser reducido."
option-ui-overridden="&4&l[ERROR] &cLa opción &6&o'{option}'&c no se puede establecer porque ha sido sobrescrita por la &4Administración&c."
option-ui-override-no-permission="&4&l[ERROR] &cEsta opción ha sido sobrescrita por la &4Administración &cy &4&lNO&c tienes permiso para modificarla."
owner-admin="la Administración"
@ -829,10 +835,13 @@ GriefDefender {
ui-click-add-target="Click aquí para añadir &6{target}&f"
ui-click-confirm="CLICK para Confirmar"
ui-click-filter-type="CLICK para filtar por &6&o{type}&f"
ui-click-record-chat="Click aquí para ver el chat guardado."
ui-click-remove="Click aqui para eliminar"
ui-click-return-command="&bRegresar a &6{command}"
ui-click-view="Click aquí para ver{target}"
ui-click-view-transations="Click aquí para ver las transacciones."
ui-conflict-data="Información conflictiva"
ui-record-chat="GUARDAR-CHAT"
untrust-individual-all-claims="&4&l[ACCESO-ANULADO] &C➜ &6{target}&c a TODOS tus terrenos.\n&4&l[NOTA] &cPara denegar permisos de Confianza en un SOLO terreno tienes que estar dentro de él y usar &6&o'/untrust'&c."
untrust-individual-single-claim="&4&l[ACCESO-ANULADO] &C➜ &6{target}&c a ESTE terreno.\n&4&l[NOTA] &cPara denegar permisos de Confianza en TODOS tus terrenos tienes que usar &6&o'/untrustall'&c."
untrust-no-claims="&4&l[ERROR] &cNo tienes terrenos para quitar permisos de Confianza."

View File

@ -499,6 +499,11 @@ GriefDefender {
flag-ui-click-deny="Clique ici pour interdire ce flag."
flag-ui-click-remove="Clique ici pour supprimer ce flag."
flag-ui-click-toggle="Clique ici pour basculer la valeur de {flag}&f."
flag-ui-event-cancel="N'a pas réussi à basculer la définition du drapeau! Évènement annulé par un plugin."
flag-ui-hover-active-result="Résultat actif"
flag-ui-hover-default-value="Valeur défaut"
flag-ui-hover-definition-contexts="Context de définition"
flag-ui-hover-partial="partiel"
flag-ui-info-claim="La protection est vérifiée avant les valeurs par défaut. Autorise les propriétaires de protection de spécifier le paramètre de flag dans leurs protections seulement."
flag-ui-info-default="Default est le dernier à être vérifié. Protection et Outrepassant prenent la priorité sur cela."
flag-ui-info-inherit="Héritage est un flag forcé par la protection parente et ne peut être changé."
@ -629,6 +634,7 @@ GriefDefender {
option-set-target="&aDéfinis {type}&a de l'option &b{option}&a à {value}&a avec le contexte &7{contexts}&a sur la cible &6{target}&a."
option-ui-click-toggle="Clique ici pour changer la valeur de {option}&f."
option-ui-inherit-parent="Cette option est héritée depuis la protection parente {name}&f et ne peut &nPAS&f être changée."
option-ui-not-defined="Cette valeur n'est PAS défini et ne peut pas être aller plus bas."
option-ui-overridden="&cÉchec de la définition de l'option. L'option &f{option}&c a été outrepassée par un admin."
option-ui-override-no-permission="Cette option a été outrepassée par un administration et ne peut &n&cPAS&f être changée."
owner-admin="un administrateur"
@ -829,10 +835,13 @@ GriefDefender {
ui-click-add-target="Clique ici pour ajouter &6{target}&f"
ui-click-confirm="Clique pour confirmer"
ui-click-filter-type="Clique ici pour filtrer par {type}&f"
ui-click-record-chat="Clique ici pour voir le chat enregistré."
ui-click-remove="Clique ici pour supprimer"
ui-click-return-command="&bRetour à &6{command}"
ui-click-view="Clique ici pour voir {target}"
ui-click-view-transactions="Clique ici pour voir les transactions."
ui-conflict-data="Conflit de données"
ui-record-chat="CHAT ENREGISTRÉ"
untrust-individual-all-claims="&aRévoque &6{target}&a accès à l'ENSEMBLE de tes protections. Pour définir la permission pour une seule protection, va dedans et utilises &f/untrust&a."
untrust-individual-single-claim="&aRévoque &6{target}&a accès à cette protection. Pour définir la permission pour l'ENSEMBLE de tes protections, utilises &f/untrustall&a."
untrust-no-claims="&cTu n'as pas de protection où enlever la confiance."

View File

@ -499,6 +499,11 @@ GriefDefender {
flag-ui-click-deny="Kliknij, aby ustawić flagę negatywną."
flag-ui-click-remove="Kliknij by usunąć tę flagę."
flag-ui-click-toggle="Kliknij, aby przełączyć opcję flagi {flag}&f."
flag-ui-event-cancel="Nie udało się przełączyć definicji flagi! Zdarzenie anulowane przez plugin."
flag-ui-hover-active-result="Aktualny wynik"
flag-ui-hover-default-value="Wartość domyślna"
flag-ui-hover-definition-contexts="Konteksty definicji"
flag-ui-hover-partial="część"
flag-ui-info-claim="Działka jest ważniejsza niż domyślne właściwości okolicy. Można zmieniać flagi jedynie na działce."
flag-ui-info-default="Domyślne właściwości są najmniej ważne. Działka oraz zasady nadpisane ręcznie mają pierwszeństwo."
flag-ui-info-inherit="Dziedziczenie jest flagą podstawową dla tego typu działek i nie może być zmienione."
@ -629,6 +634,7 @@ GriefDefender {
option-set-target="&aUstaw opcję &b{option}&a dla typu {type}&a na wartość {value}&a używając kontekstów &7{contexts}&a na obiekcie &6{target}&a."
option-ui-click-toggle="Kliknij aby przełączyć opcję {option}&f."
option-ui-inherit-parent="Ta opcja jest dziedziczona z działki {name}&f i &nnie może&f być zmieniona."
option-ui-not-defined="Wartość nie jest ustalona i nie można jej zmniejszyć."
option-ui-overridden="&cNie udało się zmienić opcji. Opcja &f{option}&c została nadpisana przez administrację."
option-ui-override-no-permission="Ta opcja została nadpisana przez admina i &n&cNIE MOŻE&f być zmieniona."
owner-admin=administrator
@ -829,10 +835,13 @@ GriefDefender {
ui-click-add-target="Kliknij aby dodać &6{target}&f"
ui-click-confirm="Kliknij aby potwierdzić"
ui-click-filter-type="Kliknij aby posortować według typu {type}&f"
ui-click-record-chat="Kliknij aby zobaczyć zapisany czat."
ui-click-remove="Kliknij aby usunąć"
ui-click-return-command="&bPowrót do &6{command}"
ui-click-view="Kliknij aby podejrzeć {target}"
ui-click-view-transactions="Kliknij, aby wyświetlić transakcje."
ui-conflict-data="Konfliktujące dane"
ui-record-chat="ZAPISZ-CZAT"
untrust-individual-all-claims="&aOdebrano &6{target}&a dostęp do WSZYSTKICH Twoich działek. Aby odebrać permisje do pojedynczej działki, stań na niej i użyj komendy &f/untrust&a."
untrust-individual-single-claim="&aOdebrano &6{target}&a dostęp do tej działki. Aby odebrać dostęp do WSZYSTKICH działek użyj komendy, use &f/untrustall&a."
untrust-no-claims="&cNie masz działek żeby to zrobić."

View File

@ -499,6 +499,11 @@ GriefDefender {
flag-ui-click-deny="Нажмите здесь, чтобы запретить этот флаг."
flag-ui-click-remove="Нажмите здесь, чтобы удалить этот флаг."
flag-ui-click-toggle="&fНажмите здесь, чтобы переключить значение флага &r{flag}&f."
flag-ui-event-cancel="Переключить значение флага не удалось: действие отменено другоим плагином."
flag-ui-hover-active-result="Текущее значение"
flag-ui-hover-default-value="Стандартное значение"
flag-ui-hover-definition-contexts="Контексты флага"
flag-ui-hover-partial="частично"
flag-ui-info-claim="Значения в регионе проверяются перед стандартными. Позволяет владельцам регионов определять значения флагов только для определённого региона."
flag-ui-info-default="Стандартные значения проверяются последними. Значения из переопределения и региона имеют высший приоритет."
flag-ui-info-inherit="Наследование - флаг, устанавливаемый родительским регионом, который не может быть изменён."
@ -629,6 +634,7 @@ GriefDefender {
option-set-target="&aОпция &b{option}&a вида &b{type}&a с контекстами &7{contexts}&a установлена в значение {value}&a для &6{target}&a."
option-ui-click-toggle="Нажмите здесь, чтобы переключить опцию &f{option}&r."
option-ui-inherit-parent="Эта опция унаследована от родительского региона {name}&f и &nне может&f быть изменена."
option-ui-not-defined="Значение НЕ определено и не может быть снижено."
option-ui-overridden="&cНе удалось установить опцию &f{option}&c. Значение опции переопределено администратором."
option-ui-override-no-permission="Значение опции было переопределено администратором, она &n&cНЕ&f может быть изменена."
owner-admin=Администратор
@ -829,10 +835,13 @@ GriefDefender {
ui-click-add-target="Нажмите, чтобы добавить &6{target}&f"
ui-click-confirm="Нажмите для подтверждения"
ui-click-filter-type="&7Нажмите здесь, чтобы вывести только &f{type}"
ui-click-record-chat="Нажмите, чтобы увидеть запись чата."
ui-click-remove="Нажмите здесь, чтобы убрать"
ui-click-return-command="&bВернуться к &6{command}"
ui-click-view="Нажмите, чтобы отобразить {target}"
ui-click-view-transactions="Нажмите, чтобы отобразить переводы."
ui-conflict-data="Данные конфликта"
ui-record-chat="ЗАПИСЬ ЧАТА"
untrust-individual-all-claims="&aОтозваны все разрешения игрока &6{target}&a во ВСЕХ ваших регионах. Чтобы настраивать разрешения в одном регионе, войдите в него и используйте &f/untrust&a."
untrust-individual-single-claim="&aОтозваны все разрешения игрока &6{target}&a в этом регионе. Чтобы настроаивать разрешения во ВСЕХ ваших регионах, воспользуйтесь &f/untrustall&a."
untrust-no-claims="&cУ вас нет регионов, из которых можно было бы выписать игрока."

View File

@ -499,6 +499,11 @@ GriefDefender {
flag-ui-click-deny="點擊這裡禁止這個設定."
flag-ui-click-remove="點擊這裡移除這個設定."
flag-ui-click-toggle="點擊這裡去切換 {flag}&f 的值."
flag-ui-event-cancel="無法切換領地已定義設定! 此舉動已被一個插件阻止."
flag-ui-hover-active-result="當前結果"
flag-ui-hover-default-value="預設值"
flag-ui-hover-definition-contexts="定義內容"
flag-ui-hover-partial="一部分"
flag-ui-info-claim="領地已經在預設資料使用之前檢查。允許領主指定領地設定僅在領地內."
flag-ui-info-default="預設是最後被檢查。領地及預設的權限高過此."
flag-ui-info-inherit="繼承是一個強制執行的設定,由父母(主)領地設定,不能更改."
@ -509,7 +514,7 @@ GriefDefender {
flag-ui-return-flags=回到領地設定頁面
label-accessors=存取者
label-all=所有
label-area=區域
label-area=區域大小
label-available=可用
label-balance=餘額
label-blocks=格數
@ -629,6 +634,7 @@ GriefDefender {
option-set-target="&a設定 {type}&a 的選項 &b{option}&a 成為 {value}&a 並設定 &7{contexts}&a 向 &6{target}&a對象."
option-ui-click-toggle="點擊這裡切換 {option}&f 數值."
option-ui-inherit-parent="這個設定繼承主(父母)領地 {name}&f 並且 &n無法&f 更改."
option-ui-not-defined="此數值未被定義並且不可以調低."
option-ui-overridden="&c無法設定選項. 選項 &f{option}&c 已經被管理員複寫."
option-ui-override-no-permission="這個設定已經被管理員複寫並且 &n&c不可&f 更改."
owner-admin=管理員
@ -656,7 +662,7 @@ GriefDefender {
permission-command-trust="&c你沒有權限去使用這種類的trust(信任)權限身份."
permission-cuboid="&c你沒有權限去使用3D模式創作或者更改基本領地."
permission-edit-claim="&c你沒有權限去編輯這個領地."
permission-false="沒有"
permission-false="禁止"
permission-fire-spread="&c你沒有權限去在這個領地進火蔓延."
permission-flag-arg="&c你沒有權限去使用有參數的領地設定指令."
permission-flag-defaults="&c你沒有權限去管理領地預設設定."
@ -688,7 +694,7 @@ GriefDefender {
permission-tax="&c你沒有權限管理這個領地的稅收情況."
permission-teleport-from="&c你沒有 &6{player} &c的權限從這個領地傳送."
permission-teleport-to="&c你沒有 &6{player} &c給予的權限去傳送到指定地點."
permission-true="擁有"
permission-true="允許"
permission-trust="&c你沒有 &6{player}&c 的權限去管理這裡的強項."
permission-undefined="未定義"
permission-visual-claims-nearby="&c你沒有去可視化附近領地."
@ -829,10 +835,13 @@ GriefDefender {
ui-click-add-target="點擊這裡增加 &6{target}&f"
ui-click-confirm=點擊這裡確認
ui-click-filter-type="點擊這裡過濾到只顯示 {type}&f"
ui-click-record-chat="點擊這裡觀看聊天記錄."
ui-click-remove=點擊這裡羽翼
ui-click-return-command="&b返回頁面 &6{command}"
ui-click-view="點擊這裡觀看 {target}"
ui-click-view-transactions="點擊這裡觀看所有交易."
ui-conflict-data="衝突數據"
ui-record-chat="記錄-聊天"
untrust-individual-all-claims="&a已經移除 &6{target}&a 的存取者權限身份在你所有的領地內. 如果你只需要設定一個領地的權限, 請站在該領地內並且使用指令 &f/untrust&a."
untrust-individual-single-claim="&a已經移除 &6{target}&a 的存取者權限身份在這個領地內. 如果你需要同時設定所有領地的設定, 請使用指令 &f/untrustall&a."
untrust-no-claims="&c你沒有領地可以取消信任權限身份組."

View File

@ -298,6 +298,11 @@ public class MessageCache {
public Component FLAG_UI_CLICK_ALLOW;
public Component FLAG_UI_CLICK_DENY;
public Component FLAG_UI_CLICK_REMOVE;
public Component FLAG_UI_EVENT_CANCEL;
public Component FLAG_UI_HOVER_ACTIVE_RESULT;
public Component FLAG_UI_HOVER_DEFAULT_VALUE;
public Component FLAG_UI_HOVER_DEFINITION_CONTEXTS;
public Component FLAG_UI_HOVER_PARTIAL;
public Component FLAG_UI_INFO_CLAIM;
public Component FLAG_UI_INFO_DEFAULT;
public Component FLAG_UI_INFO_INHERIT;
@ -407,6 +412,7 @@ public class MessageCache {
public Component OPTION_DESCRIPTION_TAX_EXPIRATION_DAYS_KEEP;
public Component OPTION_DESCRIPTION_TAX_RATE;
public Component OPTION_UI_CLICK_REMOVE;
public Component OPTION_UI_NOT_DEFINED;
public Component OWNER_ADMIN;
public Component PERMISSION_ASSIGN_WITHOUT_HAVING;
public Component PERMISSION_CLAIM_CREATE;
@ -514,9 +520,12 @@ public class MessageCache {
public Component UI_CLICK_ADD_GROUP;
public Component UI_CLICK_ADD_PLAYER;
public Component UI_CLICK_CONFIRM;
public Component UI_CLICK_RECORD_CHAT;
public Component UI_CLICK_REMOVE;
public Component UI_CLICK_VIEW_TRANSACTIONS;
public Component UI_CONFLICT_DATA;
public Component UI_PAY_NEXT_DUE_DATE;
public Component UI_RECORD_CHAT;
public Component UNTRUST_NO_CLAIMS;
public Component UNTRUST_SELF;
@ -771,6 +780,11 @@ public class MessageCache {
FLAG_UI_CLICK_ALLOW = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-click-allow");
FLAG_UI_CLICK_DENY = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-click-deny");
FLAG_UI_CLICK_REMOVE = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-click-remove");
FLAG_UI_EVENT_CANCEL = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-event-cancel");
FLAG_UI_HOVER_ACTIVE_RESULT = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-hover-active-result");
FLAG_UI_HOVER_DEFAULT_VALUE = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-hover-default-value");
FLAG_UI_HOVER_DEFINITION_CONTEXTS = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-hover-definition-contexts");
FLAG_UI_HOVER_PARTIAL = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-hover-partial");
FLAG_UI_INFO_CLAIM = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-info-claim");
FLAG_UI_INFO_DEFAULT = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-info-default");
FLAG_UI_INFO_INHERIT = MessageStorage.MESSAGE_DATA.getMessage("flag-ui-info-inherit");
@ -880,6 +894,7 @@ public class MessageCache {
OPTION_DESCRIPTION_TAX_EXPIRATION_DAYS_KEEP = MessageStorage.MESSAGE_DATA.getMessage("option-description-tax-expiration-days-keep");
OPTION_DESCRIPTION_TAX_RATE = MessageStorage.MESSAGE_DATA.getMessage("option-description-tax-rate");
OPTION_UI_CLICK_REMOVE = MessageStorage.MESSAGE_DATA.getMessage("option-ui-click-remove");
OPTION_UI_NOT_DEFINED = MessageStorage.MESSAGE_DATA.getMessage("option-ui-not-defined");
OWNER_ADMIN = MessageStorage.MESSAGE_DATA.getMessage("owner-admin");
PERMISSION_ASSIGN_WITHOUT_HAVING = MessageStorage.MESSAGE_DATA.getMessage("permission-assign-without-having");
PERMISSION_CLAIM_CREATE = MessageStorage.MESSAGE_DATA.getMessage("permission-claim-create");
@ -987,9 +1002,12 @@ public class MessageCache {
UI_CLICK_ADD_GROUP = MessageStorage.MESSAGE_DATA.getMessage("ui-click-add-group");
UI_CLICK_ADD_PLAYER = MessageStorage.MESSAGE_DATA.getMessage("ui-click-add-player");
UI_CLICK_CONFIRM = MessageStorage.MESSAGE_DATA.getMessage("ui-click-confirm");
UI_CLICK_RECORD_CHAT = MessageStorage.MESSAGE_DATA.getMessage("ui-click-record-chat");
UI_CLICK_REMOVE = MessageStorage.MESSAGE_DATA.getMessage("ui-click-remove");
UI_CLICK_VIEW_TRANSACTIONS = MessageStorage.MESSAGE_DATA.getMessage("ui-click-view-transactions");
UI_CONFLICT_DATA = MessageStorage.MESSAGE_DATA.getMessage("ui-conflict-data");
UI_PAY_NEXT_DUE_DATE = MessageStorage.MESSAGE_DATA.getMessage("ui-pay-next-due-date");
UI_RECORD_CHAT = MessageStorage.MESSAGE_DATA.getMessage("ui-record-chat");
UNTRUST_NO_CLAIMS = MessageStorage.MESSAGE_DATA.getMessage("untrust-no-claims");
UNTRUST_SELF = MessageStorage.MESSAGE_DATA.getMessage("untrust-self");

View File

@ -281,10 +281,10 @@ public abstract class ClaimFlagBase extends BaseCommand {
Component footer = null;
if (player.hasPermission(GDPermissions.ADVANCED_FLAGS)) {
footer = TextComponent.builder().append(whiteOpenBracket)
.append(TextComponent.of("PRESET").color(TextColor.GOLD)).append(whiteCloseBracket)
.append(MessageCache.getInstance().TITLE_PRESET.color(TextColor.GOLD)).append(whiteCloseBracket)
.append(" ")
.append(TextComponent.builder()
.append(TextComponent.of("ADVANCED").color(TextColor.GRAY)
.append(MessageCache.getInstance().TITLE_ADVANCED.color(TextColor.GRAY)
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createClaimFlagConsumer(src, claim, lastActiveMenu)))))
.build())
.build();
@ -680,14 +680,14 @@ public abstract class ClaimFlagBase extends BaseCommand {
TextComponent.Builder valueBuilder = TextComponent.builder();
if (!properResult) {
if (hasEditPermission) {
hoverBuilder.append("Conflict Data : \n");
hoverBuilder.append(MessageCache.getInstance().UI_CONFLICT_DATA).append(" : ").append("\n");
for (GDActiveFlagData definitionFlagData : definitionResults) {
hoverBuilder.append(definitionFlagData.getComponent(flagGroup))
.append("\n");
}
hasHover = true;
}
valueBuilder.append("partial");
valueBuilder.append(MessageCache.getInstance().FLAG_UI_HOVER_PARTIAL);
defaultResult = null;
} else {
TextColor valueColor = TextColor.GRAY;
@ -714,7 +714,7 @@ public abstract class ClaimFlagBase extends BaseCommand {
hasHover = true;
if (properResult) {
hoverBuilder.append("\nDefault Value: ", TextColor.AQUA);
hoverBuilder.append("\n").append(MessageCache.getInstance().FLAG_UI_HOVER_DEFAULT_VALUE.color(TextColor.AQUA)).append(": ");
final Tristate defaultValue = customFlag.getDefaultValue();
if (defaultValue == Tristate.UNDEFINED) {
hoverBuilder.append(customFlag.getDefaultValue().toString().toLowerCase(), TextColor.GRAY);
@ -726,7 +726,7 @@ public abstract class ClaimFlagBase extends BaseCommand {
if (src.getInternalPlayerData().canManageAdminClaims) {
if (!customFlag.getContexts().isEmpty()) {
hoverBuilder.append("\nDefinition Contexts: ");
hoverBuilder.append("\n").append(MessageCache.getInstance().FLAG_UI_HOVER_DEFINITION_CONTEXTS).append(": ");
hoverBuilder.append("\ngd_claim", TextColor.AQUA)
.append("=", TextColor.WHITE)
.append(claim.getUniqueId().toString(), TextColor.GRAY);
@ -760,11 +760,11 @@ public abstract class ClaimFlagBase extends BaseCommand {
if (src.getInternalPlayerData().canManageAdminClaims) {
for (FlagData flagData : customFlag.getFlagData()) {
hoverBuilder.append("\nFlag: ")
hoverBuilder.append("\n").append(MessageCache.getInstance().LABEL_FLAG).append(": ")
.append(flagData.getFlag().getName(), TextColor.GREEN);
if (!flagData.getContexts().isEmpty()) {
hoverBuilder.append("\nContexts: ");
hoverBuilder.append("\n").append(MessageCache.getInstance().LABEL_CONTEXT).append(": ");
}
for (Context context : flagData.getContexts()) {
hoverBuilder.append("\n");
@ -778,7 +778,7 @@ public abstract class ClaimFlagBase extends BaseCommand {
// show active value
final GDActiveFlagData activeData = this.getActiveDefinitionResult(claim, customFlag, flagData);
hoverBuilder.append("\nActive Result: ")
hoverBuilder.append("\n").append(MessageCache.getInstance().FLAG_UI_HOVER_ACTIVE_RESULT).append(": ")
.append("\nvalue", TextColor.DARK_AQUA)
.append("=", TextColor.WHITE)
.append(activeData.getValue().name().toLowerCase(), TextColor.GOLD)
@ -938,6 +938,7 @@ public abstract class ClaimFlagBase extends BaseCommand {
permissionContexts.remove(ClaimContexts.GLOBAL_DEFAULT_CONTEXT);
permissionContexts.add(claim.getDefaultTypeContext());
permissionContexts.add(ClaimContexts.USER_DEFAULT_CONTEXT);
result = PermissionUtil.getInstance().getPermissionValue(claim, (GDPermissionHolder) flagDefinition.getSubject(), flagData.getFlag().getPermission(), permissionContexts, PermissionDataType.TRANSIENT);
if (result != Tristate.UNDEFINED) {
return new GDActiveFlagData(flagDefinition, flagData, result, permissionContexts, GDActiveFlagData.Type.DEFAULT);

View File

@ -677,7 +677,7 @@ public abstract class ClaimOptionBase extends BaseCommand {
}
TextComponent.Builder builder = TextComponent.builder()
.append("\n\nContexts: \n");
.append("\n\n").append(MessageCache.getInstance().LABEL_CONTEXT).append(": \n");
for (Context context : contexts) {
final String key = context.getKey();
@ -793,7 +793,7 @@ public abstract class ClaimOptionBase extends BaseCommand {
Integer value = getMenuTypeValue(TypeToken.of(Integer.class), currentValue);
if (leftArrow) {
if (value == null || value < 1) {
TextAdapter.sendComponent(src.getOnlinePlayer(), TextComponent.of("This value is NOT defined and cannot go any lower."));
TextAdapter.sendComponent(src.getOnlinePlayer(), MessageCache.getInstance().OPTION_UI_NOT_DEFINED.color(TextColor.RED));
} else {
if ((option == Options.MIN_LEVEL || option == Options.MAX_LEVEL || option == Options.MIN_SIZE_Y || option == Options.MAX_SIZE_Y) && value == 1) {
value = null;
@ -825,7 +825,7 @@ public abstract class ClaimOptionBase extends BaseCommand {
Double value = getMenuTypeValue(TypeToken.of(Double.class), currentValue);
if (leftArrow) {
if (value == null || value < 0) {
TextAdapter.sendComponent(src.getOnlinePlayer(), TextComponent.of("This value is NOT defined and cannot go any lower."));
TextAdapter.sendComponent(src.getOnlinePlayer(), MessageCache.getInstance().OPTION_UI_NOT_DEFINED.color(TextColor.RED));
} else {
value -= 0.1;
if (option == Options.ABANDON_RETURN_RATIO && value <= 0) {

View File

@ -43,6 +43,9 @@ public class ClaimCategory extends ConfigCategory {
public List<String> explosionEntitySurfaceBlacklist = new ArrayList<>();
@Setting(value = "explosion-surface-block-level", comment = "The 'Y' block level that is considered the surface for explosions. (Default: 63)")
public int explosionSurfaceBlockLevel = 63;
@Setting(value = "claim-block-task-move-threshold", comment = "The minimum threshold of movement (in blocks) required to receive accrued claim blocks. (Default: 0)"
+ "\nNote: The claim block task runs every 5 minutes which is the time each player will get to move the required amount of blocks.")
public int claimBlockTaskMoveThreshold = 0;
@Setting(value = "worldedit-schematics", comment = "Whether to use WorldEdit for schematics. Default: false"
+ "\nNote: If you were using schematics in older GD/GP versions and want old schematics to work then you should keep this setting disabled.")
public boolean useWorldEditSchematics = false;

View File

@ -32,7 +32,6 @@ import com.griefdefender.claim.GDClaim;
import com.griefdefender.permission.GDPermissionManager;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.data.manipulator.mutable.entity.VehicleData;
import org.spongepowered.api.data.property.block.MatterProperty;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.service.economy.Currency;
import org.spongepowered.api.service.economy.account.Account;
@ -50,16 +49,15 @@ public class ClaimBlockTask implements Runnable {
@Override
public void run() {
for (World world : Sponge.getServer().getWorlds()) {
final int blockMoveThreshold = GriefDefenderPlugin.getActiveConfig(world.getProperties()).getConfig().claim.claimBlockTaskMoveThreshold;
for (Player player : world.getPlayers()) {
final GDPlayerData playerData = GriefDefenderPlugin.getInstance().dataStore.getOrCreatePlayerData(player.getWorld(), player.getUniqueId());
final GDClaim claim = GriefDefenderPlugin.getInstance().dataStore.getClaimAtPlayer(playerData, player.getLocation());
final int accrualPerHour = GDPermissionManager.getInstance().getInternalOptionValue(TypeToken.of(Integer.class), player, Options.BLOCKS_ACCRUED_PER_HOUR, claim);
if (accrualPerHour > 0) {
final Location<World> lastLocation = playerData.lastAfkCheckLocation;
final Optional<MatterProperty> matterProperty = player.getLocation().getBlock().getProperty(MatterProperty.class);
if (!player.get(VehicleData.class).isPresent() &&
(lastLocation == null || lastLocation.getPosition().distanceSquared(player.getLocation().getPosition()) >= 0) &&
matterProperty.isPresent() && matterProperty.get().getValue() != MatterProperty.Matter.LIQUID) {
(lastLocation == null || lastLocation.getPosition().distanceSquared(player.getLocation().getPosition()) > (blockMoveThreshold * blockMoveThreshold))) {
int accruedBlocks = playerData.getBlocksAccruedPerHour() / 12;
if (accruedBlocks < 0) {
accruedBlocks = 1;

View File

@ -74,9 +74,9 @@ public class ChatCaptureUtil {
final Component chatSettings = TextComponent.builder()
.append(TextComponent.builder()
.append(whiteOpenBracket)
.append("RECORD-CHAT").color(TextColor.GOLD).append(whiteCloseBracket)
.append(MessageCache.getInstance().UI_RECORD_CHAT).color(TextColor.GOLD).append(whiteCloseBracket)
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createChatSettingsConsumer(player, claim, command, returnComponent))))
.hoverEvent(HoverEvent.showText(TextComponent.of("Click here to see recorded chat.")))
.hoverEvent(HoverEvent.showText(MessageCache.getInstance().UI_CLICK_RECORD_CHAT))
.build())
.append(TextComponent.builder()
.append(" ")