- Redundancies:
- MySQLDB: Removed null check
- DeathEventListener: Removed warning suppression
- several Test classes: Removed public class identifier
- Unused private fields
- Constructors of abstract classes should be protected x31
- Added missing Parameterized types x2
- "throws" declerations for runtime EnableException
- Prevented Boxed Boolean from causing NPE in the future x15
- Renamed lesser scope variables that were hiding variables x12
- Some smaller ones that I was too tired to write down
* Improved Extension errors
* Removed scary reflective operation exception
* Additional context to SQL Exceptions
* Added error context to Listeners
* Added error context to most error logging places
* Ignore cyclomatic complexity of DBOpException
Adds context to almost all error logging situations, except those where it is unknown, or to commands that are being refactored on another branch.
Close#1245
CommonQueries#fetchCurrentSessionPlaytime,
requires Capability#QUERY_API_ACTIVE_SESSION_PLAYTIME
API version increased to v5.1-R0.3
Affects issues:
- #1384
- Added login.html and register.html
- Added .bg-gradient
- Added logonsine.js for a decoration.
- Added /login, /register, /auth/login, /auth/logout and /auth/register endpoints
- Redirects to /login if cookie not present with auth enabled.
- Basic login functionality using cookies
- Registration page allows new kind of registration that doesn't log passwords on console.
- Fixes a bug with stippets that blocked any cross-plugin modifications (PageExtension API)
- Fixes a typo with css snippet code that made the css not apply (PageExtension API)
- API 5.1-R0.2: Added ResolverService#getResolvers method
- /players/ now redirects to /players
- All error pages now have proper css
Affects issues:
- Fixed#1378
- Customizable resources
- Snippets
- Fixed issue with a web resource being fetched on enable (favicon in ResponseResolver)
- Fixed some issues with Config#addNode used in an orElse block of Optional
- Deprecated PlanFiles#getCustomizableResourceOrDefault
- Fixed issue where response code was not set
- Fixed ResponseSender not setting values for response headers
- Changed ResponseResolver to mostly use Response instead of _old
Some issues that were identified:
- Going to /debug/ makes the style requests return the debug page content
because the /debug resolver is used
- In the future when / is to be resolved it might override a bunch of requests.
- Use of RequestTarget as incompatible with URIPath for some reason which lead to infinite
redirect, so the attempted change was reverted before this commit.
- Some Responses are using PlanFiles to obtain a html file (SRP violation)
Rest of the pages still use the old resolution that is now deprecated.
Some optional values from different providers
were not included in ProviderInformation,
which lead to unnecessary instanceof usage and
weird static methods.
Added the optional info to ProviderInformation
and created a Builder, making much cleaner code
and removing those odd ball methods.
- Also fixed StoreProviderTransaction having
insert of Icon and Tab in wrong order
for BooleanProvider, DoubleProvider, PercentageProvider, NumberProvider,
StringProvider annotations.
When the parameter is set to 'true' the value from the Provider is shown
on a table alongside players.
Capability DATA_EXTENSION_SHOW_IN_PLAYER_TABLE added
Critical:
- String literal duplication fixed in a few places
- Cognitive complexity reduced in BooleanProviderValueGatherer
Major:
- Called Optional#isPresent before accessing value
16 instances in ProviderTransactions
- private constructor to Extension tables
- Missing deprecated tags to deprecated plugin tab stuff
- Unused class variable removal
- Throw dedicated exceptions in ServerServerInfo
- Unused method removal
Minor:
- Renamed 'API' field to 'service' in ExtensionService
- Unused variable removal
This is one of the most complex queries I have made.
- Select all fulfilled conditions for all players (conditionName when
true and not_conditionName when false)
- Left join with player value & provider tables when uuids match, and
when condition matches a condition in the query above.
- Filter the join query for values where the condition did not match
any provided condition in the join (Is null)
- Delete all player values with IDs that are returned by the left join
query after filtering
In addition:
- Added test for the transaction
- Added extension data removal to RemoveEverythingTransaction
- Added unregister method to ExtensionService
Implemented methods for extracting each kind of Provider annotation
related method information to a DataProvider.
DataProviders required some duplicate code due to type erasure of the
parameter class.
----
Added Display-priority to Providers, highest value is placed top most.
InvalidateMethod annotations are now extracted.