Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bleeding branch v3.3.0 alpha.17 #262

Merged
merged 92 commits into from
Apr 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
38f14be
doc updates...
rbluer Nov 22, 2023
db5b101
Localizable: Bug fix. Blanks were being removed by the use of trim() …
rbluer Nov 22, 2023
83e6b45
Mines: Added support for '*all*' for mine names for the following min…
rbluer Nov 24, 2023
dc73e59
Docs - allow players to place blocks in mines and allow them to break…
rbluer Nov 27, 2023
7e00583
Bug Fix: GUI ranks, mines, and prestiges were not using the default i…
rbluer Nov 30, 2023
a78e1d0
Bug Fix: Mine resets and block constraints.
rbluer Dec 6, 2023
522bec6
Upgrade XSeries to v9.7.0 from v9.4.0.
rbluer Dec 6, 2023
8251833
Update a few comments...
rbluer Dec 6, 2023
6c5a67b
BlockEvents: Added the ability to update block events instead of dele…
rbluer Dec 10, 2023
33fb99f
Mine resets: If a suggested block is null, then set it to air. This …
rbluer Dec 10, 2023
db3327b
Performance: Changed the defaults for the mine reset settings to help…
rbluer Dec 10, 2023
dd64e71
Mine resets: If a mine reset takes longer than 4 minutes, then that i…
rbluer Dec 16, 2023
d94f8f4
AutoFeatures auto permissions: enable the ability to 'disable' the pe…
rbluer Dec 16, 2023
1724894
config.yml - changed the default values for remapping aliases and res…
rbluer Dec 16, 2023
2967fae
Upgrade XSeries from v9.7.0 to v9.8.0.
rbluer Dec 21, 2023
a7984e8
Breaking change in XSeries: GRASS has been changed to SHORT_GRASS for…
rbluer Dec 21, 2023
a8f74c5
Fix issue with BlockEvent's SellAll when isAutoSellIfInventoryIsFullF…
rbluer Dec 28, 2023
96ba5ac
Bug fix: Fixed the command `/mines set accessPermission` where it was…
rbluer Jan 22, 2024
507c996
Prison Block change: Add support for display name, which is optional.
rbluer Jan 22, 2024
5f40aae
Mines unit tests: Setup a new constructor for mines that is only to b…
rbluer Jan 24, 2024
78f1793
Mines: Fixes an issue for when mines are disabled and they are being …
rbluer Jan 24, 2024
67d5219
alpha.16a - 2023-12-28
rbluer Jan 24, 2024
3a7c86e
2023-12-28 alpha.16a -- was not committed back when it was made - cha…
rbluer Feb 17, 2024
c464b6c
Bug fix: block constraints: fix an issue with the selection of lower …
rbluer Feb 18, 2024
ac31dd0
Add debug statements to identify how each block was calculated during…
rbluer Feb 18, 2024
827a203
Bug fix: Player manager startup: fixed a problem where all players we…
rbluer Feb 18, 2024
9bfda73
Placeholders: topn players - bug fix. If a player did not have a pre…
rbluer Feb 19, 2024
eb38614
Bug fix: Prison command handler. When players are de-op'd, and they …
rbluer Feb 20, 2024
ca0683b
ranks ladder: applyRanksCostMultiplier command was changed to allow t…
rbluer Feb 20, 2024
4affe2c
Mines set resetTime: fix typo in the description where it shows '*all…
rbluer Feb 20, 2024
e4e7f2a
Placeholders: Top player rank was using the wrong ladder, which was i…
rbluer Feb 20, 2024
a7cb7d0
v3.3.0-alpha.16b 2024-02-20
rbluer Feb 20, 2024
c34bf9b
Bug fix: prison support submit: if the bukkit system cannot extract a…
rbluer Feb 22, 2024
8ce44a2
Add prison debug option to filter on blockConstraints when regenerati…
rbluer Feb 24, 2024
b5234b5
Bug fix: GUI configuration: Found a problem that when configuring the…
rbluer Feb 24, 2024
4c24fd2
Prison startup bug: There was an issue with the prison startup when t…
rbluer Feb 24, 2024
fb00fa1
Add prison debug option to filter on blockConstraints when regenerati…
rbluer Feb 24, 2024
54c927e
File saving: alternative technique for saving files.
rbluer Feb 24, 2024
a427d38
Prison Command Handler: using config.yml you can now change all of pr…
rbluer Feb 25, 2024
355eb61
Import Mines: Added the ability to import mines from JetPrisonMines c…
rbluer Feb 25, 2024
3288a0c
Import Mines: Added the ability to import mines from JetPrisonMines c…
rbluer Feb 25, 2024
df44436
Player sellall Multipliers: Fixed the ranks multiplier to include all…
rbluer Feb 26, 2024
456d298
Mine skip reset: If a mine is reset, send a message to players, but o…
rbluer Feb 26, 2024
c09e250
Mine imports: Fix some minor issues to get this to work even better.
rbluer Feb 26, 2024
052c927
Sellall and GUI message failures: a number of messages that would ind…
rbluer Feb 26, 2024
337892b
Mine reset: Under heavy load when performing a mine import, there wer…
rbluer Feb 26, 2024
11c9203
Mine skip reset messaging: Did not have it hooked up in the correct l…
rbluer Feb 27, 2024
5c4133d
AutoSell: Bug fix: When autosell and sell on inventory is full was al…
rbluer Feb 27, 2024
c714319
Mines import: prevent the processing of an importing of a mine if the…
rbluer Mar 1, 2024
761adb9
Sellall and autosell: Refinements were made to the handling of the se…
rbluer Mar 1, 2024
ede2856
Mine bombs: Ability to prevent a bomb's blocks from count towards the…
rbluer Mar 2, 2024
10b064b
File output technique: Changes to how the "replace" existing files wo…
rbluer Mar 5, 2024
466d1b9
Block lists: Added the total chance percentage to be displayed with t…
rbluer Mar 5, 2024
1ef64b3
Mines block layerStats: Added a new command that shows which blocks a…
rbluer Mar 5, 2024
f3f3e7c
File format: Eliminate the check for file types since there is only o…
rbluer Mar 5, 2024
cf483f9
Bug fix: the check for the time the reset has been going on was incor…
rbluer Mar 5, 2024
cc86030
Version 3.3.0-alpha.16c 2024-03-05
rbluer Mar 5, 2024
dda5f06
Mine reset: added a force to the reset so it will ignore an existing …
rbluer Mar 7, 2024
521d527
Mines block layer: Added colors for same IDs so it's easier to read. …
rbluer Mar 7, 2024
4670be2
mines block layerStats: rewrote to improve and get rid of the collect…
rbluer Mar 8, 2024
c0378ee
Mine resets: Reworked how prison is selecting random blocks per layer…
rbluer Mar 9, 2024
578ea86
Test: minor changes to check something.
rbluer Mar 9, 2024
c8ea544
Mines: eliminate a field no longer used: includeInLayerCalculations. …
rbluer Mar 9, 2024
c81d1db
New feature: TopN customization now possible. The messages and place…
rbluer Mar 10, 2024
fa10d0a
Last adjustment to the topN formatting.
rbluer Mar 10, 2024
f9a35a3
Promote & Demote: Improved upon reporting issues with the command. T…
rbluer Mar 10, 2024
bce00a8
Prison support listeners: added support for listening to and providin…
rbluer Mar 11, 2024
8ea1664
Prison support listeners: added support for listening to and providin…
rbluer Mar 11, 2024
2d3b8ce
Add support for getting the "hand" from the BlockPlaceEvent.
rbluer Mar 11, 2024
8d21821
Prison's NBT: Add support for using NBTs with bukkit's Block.
rbluer Mar 11, 2024
785cead
Mine bombs: add support for BlockPlacementEvent so if someone is usin…
rbluer Mar 11, 2024
1138afc
XSeries: Upgrade from v9.8.0 to v9.9.0
rbluer Mar 11, 2024
1afda97
PlaceholderAPI: Upgrade from v2.11.2 to v2.11.5
rbluer Mar 11, 2024
43e2752
Initial setup of sellall lore filtering
rbluer Mar 14, 2024
77e58e8
Sellall: a little clean up.
rbluer Mar 14, 2024
2ec6277
Prison ItemStack: remove enchantments from the core ItemStack since p…
rbluer Mar 15, 2024
7557316
Mine Bombs: wrapped up the changes to enable the placement of a mine …
rbluer Mar 15, 2024
ff1c930
Prison Player: Added a new sendMessage function using Lists of Strings.
rbluer Mar 15, 2024
994d474
SpigotPlayer: Fixed a potential issue if trying to use getRankPlayer(…
rbluer Mar 15, 2024
d5e5a78
Sellall: New command: '/sellall items inspect'
rbluer Mar 15, 2024
631d97e
Players: Shift the function of getting a player object to the Player …
rbluer Mar 15, 2024
25bf92c
Prison API: Added a few new functions to work with ItemStacks.
rbluer Mar 15, 2024
7aee372
Economy: For economies that prison supports that has a method to chec…
rbluer Mar 17, 2024
be2512c
Localization: If admin adds extra parameters, or other parsing failur…
rbluer Mar 28, 2024
23dedde
Localization: If admin adds extra parameters, or other parsing failur…
rbluer Mar 28, 2024
391b37c
Added a comment in the ranks message files indicating that there is n…
rbluer Apr 8, 2024
66a3068
Localizable: Secondary placeholders: Rewrote the whole support of se…
rbluer Apr 8, 2024
5dc094f
Player Manager: Secondary Placeholders: Setup the secondary placehol…
rbluer Apr 8, 2024
917ef27
Placeholder bug: The placeholder 'prison_rankup_cost_percent' uses th…
rbluer Apr 21, 2024
5933336
Mines messages: Secondary placeholders. Added support for mines' mes…
rbluer Apr 21, 2024
27cfffa
v3.3.0-alpha.17 - Set the version to alpha.17 so it can be posted to …
rbluer Apr 21, 2024
e499773
Update the changelogs for v3.3.0-alpha.17 support.
rbluer Apr 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
AutoSell: Bug fix: When autosell and sell on inventory is full was al…
…l turned off, it would still sell.

This fixes some of the logic to simplify the code, and to fix those issues.
rbluer committed Feb 27, 2024
commit 5c4133deb48d5e8e17c7807cae17c816d64156ea
4 changes: 4 additions & 0 deletions docs/changelog_v3.3.x.md
Original file line number Diff line number Diff line change
@@ -17,6 +17,10 @@ These change logs represent the work that has been going on within prison.
# 3.3.0-alpha.16b 2024-02-27


* **AutoSell: Bug fix: When autosell and sell on inventory is full was all turned off, it would still sell.**
This fixes some of the logic to simplify the code, and to fix those issues.


* **Mine skip reset messaging: Did not have it hooked up in the correct location, so the skip messages were not happening.**


Original file line number Diff line number Diff line change
@@ -939,7 +939,7 @@ protected int autoPickup( PrisonMinesBlockBreakEvent pmEvent,
// !"false".equalsIgnoreCase( getMessage( AutoFeatures.permissionAutoSellPerBlockBreakEnabled ) ) &&
// player.hasPermission( getMessage( AutoFeatures.permissionAutoSellPerBlockBreakEnabled ) );

boolean autoSellByPerm = pmEvent.getSpigotPlayer().isAutoSellByPermEnabled( isPlayerAutosellEnabled );
boolean autoSellByPerm = pmEvent.getSpigotPlayer().isAutoSellByPermEnabled( isPlayerAutosellEnabled, pmEvent.getDebugInfo() );


// Try to autosell if enabled in any of the following ways:
@@ -1468,7 +1468,7 @@ protected void dropExtra( HashMap<Integer, SpigotItemStack> extra,

boolean isPlayerAutosellEnabled = sPlayer.isAutoSellEnabled( debugInfo );

boolean isPlayerAutoSellByPerm = sPlayer.isAutoSellByPermEnabled( isPlayerAutosellEnabled );
boolean isPlayerAutoSellByPerm = sPlayer.isAutoSellByPermEnabled( isPlayerAutosellEnabled, debugInfo );

if ( isPlayerAutosellEnabled || isPlayerAutoSellByPerm ) {

Original file line number Diff line number Diff line change
@@ -516,7 +516,8 @@ else if ( cancelBy == EventListenerCancelBy.drops ) {
// isBoolean(AutoFeatures.isAutoSellPerBlockBreakEnabled);


boolean isPlayerAutoSellByPerm = pmEvent.getSpigotPlayer().isAutoSellByPermEnabled( isPlayerAutosellEnabled );
boolean isPlayerAutoSellByPerm = pmEvent.getSpigotPlayer().isAutoSellByPermEnabled(
isPlayerAutosellEnabled, pmEvent.getDebugInfo() );



Original file line number Diff line number Diff line change
@@ -935,7 +935,8 @@ else if ( results && pmEvent.getBbPriority().isMonitor() && mine != null ) {
// pmEvent.getPlayer() ));


boolean isPlayerAutoSellByPerm = pmEvent.getSpigotPlayer().isAutoSellByPermEnabled( isPlayerAutosellEnabled );
boolean isPlayerAutoSellByPerm = pmEvent.getSpigotPlayer()
.isAutoSellByPermEnabled( isPlayerAutosellEnabled, pmEvent.getDebugInfo() );



Original file line number Diff line number Diff line change
@@ -864,22 +864,36 @@ public boolean isAutoSellEnabled( StringBuilder debugInfo ) {

if ( SpigotPrison.getInstance().isSellAllEnabled() ) {

boolean isAutoSellPerUserToggleable = SellAllUtil.get().isAutoSellPerUserToggleable;

boolean isPlayerAutoSellTurnedOff = isAutoSellPerUserToggleable &&
!SellAllUtil.get().isSellallPlayerUserToggleEnabled(
getWrapper() );

if ( debugInfo != null && isPlayerAutoSellTurnedOff ) {
debugInfo.append( Output.get().getColorCodeWarning() );
debugInfo.append( "(Player toggled off autosell) " );
debugInfo.append( Output.get().getColorCodeDebug() );
if ( SellAllUtil.get().isAutoSellPerUserToggleable ) {
debugInfo.append( "(sellallEnabled:userToggleable)" );

// boolean isAutoSellPerUserToggleable = SellAllUtil.get().isAutoSellPerUserToggleable;

boolean isPlayerAutoSellTurnedOn =
SellAllUtil.get().isSellallPlayerUserToggleEnabled( getWrapper() );

if ( debugInfo != null ) {
debugInfo.append( Output.get().getColorCodeWarning() );
debugInfo.append(
String.format(
"(Player toggled %s autosell) ",
isPlayerAutoSellTurnedOn ? "on" : "off" ) );
debugInfo.append( Output.get().getColorCodeDebug() );
}

// This will return true (allow autosell) unless players can toggle autosell and they turned it off:
// This is to be used with other auto sell setting, but never on it's own:
results = isPlayerAutoSellTurnedOn;

}
else {
debugInfo.append( "(sellallEnabled)" );
results = true;
}

// This will return true (allow autosell) unless players can toggle autosell and they turned it off:
// This is to be used with other auto sell setting, but never on it's own:
results = !isAutoSellPerUserToggleable ||
isPlayerAutoSellTurnedOff;
}
else {
debugInfo.append( "(sellallDisabled)" );
}

return results;
@@ -898,8 +912,8 @@ public boolean isAutoSellEnabled( StringBuilder debugInfo ) {
*
* @return
*/
public boolean isAutoSellByPermEnabled() {
return isAutoSellByPermEnabled( isAutoSellEnabled() );
public boolean isAutoSellByPermEnabled( StringBuilder debugInfo ) {
return isAutoSellByPermEnabled( isAutoSellEnabled(), debugInfo );
}

/**
@@ -915,26 +929,38 @@ public boolean isAutoSellByPermEnabled() {
* @param isPlayerAutosellEnabled
* @return
*/
public boolean isAutoSellByPermEnabled( boolean isPlayerAutosellEnabled ) {
public boolean isAutoSellByPermEnabled( boolean isPlayerAutosellEnabled, StringBuilder debugInfo ) {

boolean autoSellByPerm = false;

AutoFeaturesWrapper afw = AutoFeaturesWrapper.getInstance();

boolean isSellallEnabled = SpigotPrison.getInstance().isSellAllEnabled();

if ( isSellallEnabled && isPlayerAutosellEnabled && !isOp() ) {
if ( isSellallEnabled && isPlayerAutosellEnabled &&
afw.isBoolean(AutoFeatures.isAutoSellPerBlockBreakEnabled) ) {

String perm = afw.getMessage( AutoFeatures.permissionAutoSellPerBlockBreakEnabled );

autoSellByPerm =

if ( !"disable".equalsIgnoreCase( perm ) &&
!"false".equalsIgnoreCase( perm ) ) {

if ( isOp() ) {
debugInfo.append( "(autosellByPerm:Op-Disabled)" );
}
else {

autoSellByPerm = hasPermission( perm );

afw.isBoolean(AutoFeatures.isAutoSellPerBlockBreakEnabled) &&
!"disable".equalsIgnoreCase( perm ) &&
!"false".equalsIgnoreCase( perm ) &&
hasPermission( perm );
debugInfo.append(
String.format(
"(autosellByPerm:%s)",
autoSellByPerm ? "hasPerm" : "noPerm") );
}

}

}


return autoSellByPerm;
}