155 Commits

Author SHA1 Message Date
chickeneer 2d1fe63b6f Merge pull request #430 from benwoo1110/feat/openbukkitrootcommand
Open BukkitRootCommand implementations for extension
2025-04-12 10:33:36 -05:00
chickeneer a2cf22892c Improve MethodHandle API PR for ACFBukkitLocalesListener 2025-04-12 09:25:20 -05:00
Ben Woo 254164bc49 Open BukkitRootCommand implementations for extension 2025-04-08 13:52:40 +08:00
Intybyte 11fd673a6e Use MethodHandle API 2025-03-26 15:11:53 +01:00
chickeneer 5efec647c5 Fix issue with 1.8 paper having a different named method when locale changes 2025-03-25 16:13:53 -05:00
chickeneer 2b2e81c5ae During setPlayerLocale store the LocaleString
Without this change, we have to manually put this value on each
call to setPlayerLocale.
2025-03-23 20:15:35 -05:00
Ben Woo 89575e67bd Use PlayerLocaleChangeEvent instead of repeating task when available (#423) 2025-03-23 20:11:27 -05:00
chickeneer 229ca53d99 Fix an issue with CommandManager#usePerIssuerLocale(false)
It was not effectively disabled in the Bukkit module.
This should fix that issue
2025-02-22 11:28:28 -06:00
chickeneer 1d285db1aa Allow extension of module specific context classes
I am uncertain whether this is an api feature we want
to 'advertise', but I do not see a compelling reason
we need to block extending the classes.
2025-01-28 19:01:41 -06:00
Jeremy Wood d2d8833b9d Open CommandIssuer implementations for extension. (#416) 2025-01-28 18:55:16 -06:00
chickeneer 8f9c0d141b Fix locale reading for non-paper bukkit for 1.20.2+ #405 2024-01-25 07:13:04 -06:00
chickeneer 26d72f27c6 Use the player locale api instead of reflection to fix issues #402 2023-10-02 16:25:35 -05:00
chickeneer 651a558a68 Try to fix readPlayerLocale from 1.20.2 #402 2023-10-01 21:41:16 -05:00
chickeneer b50215e2fa Move all scheduler initialization to BukkitCommandManager #394
The create Locale task is happening DURING object construction so initializing the scheduler in the
PaperCommandManager initialization step is too late due to the bukkit/paper modules extending.
This should fix the issues
2023-06-26 18:11:01 -05:00
chickeneer 8c56e992a6 Improve AsyncScheduler detection #394
Since paper now has the AsyncScheduler, we can add detection for the AsyncScheduler to Paper itself instead of Folia specifically
2023-06-26 16:24:21 -05:00
chickeneer e9ca4fcd65 Change valid name checking to a configurable predicate #382
I see the value in allowing acf users to disable the valid name check.
I think others may want to go a step further and create their own
valid name verification. Those that want to truly accept all names can simply
do `CommandManager#setValidNamePredicate(name -> true)` with the new API.
Another solution I considered was having users override the isValidName method
on their CommandManager, but this functionality seemed more friendly.
2023-04-02 16:41:26 -05:00
AlexProgrammerDE 260a772903 Add backwards api support 2023-04-02 06:52:44 -05:00
AlexProgrammerDE 905d5406ec Add allow illegal name manager option 2023-04-02 06:52:44 -05:00
chickeneer f607076412 Cleanup some formatting on folia PR 2023-04-02 06:31:59 -05:00
creatorfromhell 8b87af631f Remove Folia Module.
- Add a scheduler assign check into the BukkitCommandManager
2023-04-01 13:19:45 -04:00
creatorfromhell 6cfe46e532 Add support for Folia.
- Added a new Scheduler class to managing all scheduling.
2023-04-01 12:36:22 -04:00
chickeneer a1578baea3 Deprecate bukkit command manager getTimings and remove creation of timing calls #385
There is an acknowledged loss in functionality with this approach for older versions of
Minecraft and also Bukkit/Spigot servers which still have continued access to timings.
This change was implemented on the current acf snapshot version knowing this,
to enable plugin authors to simply recompile to fix this issue without making
the small change of upgrading the dependency.
2023-03-30 00:00:47 -05:00
GrowlyX b397cf6ab4 Fix NullPointerException when attempting to parsing a location relative to the player's position with the ~ term 2022-07-30 20:01:10 -05:00
chickeneer 3652ceb975 Send invalid name feedback only after no player is returned #365 2022-04-27 17:22:49 -05:00
Christopher Nethercott 44616313a0 feat: add plugin description to dependency injection 2022-02-24 18:36:33 -06:00
RoinujNosde dcbc28c931 Fixes /help <plugin> messages not localized #296 2022-01-31 05:51:24 -06:00
chickeneer 153a636fa1 Fix isOptional usage in onlinePlayer context resolvers
Null should not be returned when something is provided as an argument
2022-01-15 13:45:55 -06:00
chickeneer 61904737e0 Revert "Short circuit getOnlinePlayer if empty lookup"
This reverts commit 1a06f4f801.
2022-01-15 12:10:36 -06:00
chickeneer 1a06f4f801 Short circuit getOnlinePlayer if empty lookup
This is to fix an issue where findPlayerSmart sends error messaging to the issuer
2022-01-15 12:00:08 -06:00
chickeneer 4d3b0192fc Miscellaneous grammar improvements 2021-12-21 20:46:53 -06:00
chickeneer 3295b82df6 Remove redundant inspection suppressions 2021-12-21 20:46:36 -06:00
Alberto Migliorato 24d97bb3eb Added Velocity 3.0.x support 2021-09-13 16:28:54 +02:00
chickeneer f145659dd0 Improve cached bukkit locale lookup - #GH-342 2021-08-29 17:36:14 -05:00
vSKAH 1e7a6b194b Update BukkitCommandManager.java
Increases the time of the loop that watches the players online. Why does it do this? Because every 5 ticks is an overkill. 
https://i.imgur.com/psuPuYk.png
2021-08-29 17:34:30 -05:00
JOO200 a28e0f5ce2 Optimize OfflinePlayer context (#306)
* Only allow valid usernames in OfflinePlayer context resolver

* optimize OfflinePlayer context resolver
2021-01-26 13:14:44 -05:00
JOO200 9c5e9fbcdd Fix NPE for plugins without special log prefix (#294) 2020-09-25 15:53:05 -04:00
Jake Potrebic fd25a31c63 Fix Bukkit log prefix for custom prefixes (#237) 2020-09-24 22:39:09 -04:00
Hannes Greule e164852783 Allow properly nesting of messages (#262)
- Messages can now be defined everywhere instead of second-level only
- The data types double, int, long and boolean are supported
2020-09-24 22:35:03 -04:00
Frank van der Heijden 7044d189b6 Implement PluginIdentifiableCommand in BukkitRootCommand (#271) 2020-06-09 22:07:33 -04:00
Aikar 1eddc2cb8b Clean up build scripts and rework shading/relocation
ACF deps such as timings lib and expiring map will now properly
be relocated into ACF.

This will avoid version conflicts with ExpiringMap and TimingsLib

Sadly, because locales is an exposed API, we can not relocate locales...

It will still be on plugins to add the locales relocation themselves.
Will update wiki to document this.

also updated maven plugins to newest versions, minus surefire, as
3.0 doesn't work with current setup. Went to latest 2.x there.

Got rid of a lot of duplicated shade configuration stuff across
submodules too.
2020-04-26 17:43:08 -04:00
Hasan Demirtaş 5953e6a99e toLowerCase method with Locale.ENGLISH parameter.
Fixes #255
2020-04-12 13:19:35 -04:00
chickeneer 586afc6193 Set locale field to be accessible - GH-234 2019-08-14 11:11:24 -05:00
chickeneer 625171b206 Fix an infinite loop issue on server shutdown
Related to GH-215
2019-06-17 16:09:47 -05:00
Niklas Eicker b175f092d8 resolves #214 (#215) 2019-06-07 01:25:08 -05:00
JanTuck 4880a02371 Fix memory leak in unregister command (#208)
Fixes #198
2019-04-15 10:15:58 -04:00
Aikar a0c4cd7a50 Register ACF help system into bukkit 2019-03-15 01:48:24 -04:00
Aikar 9c1521a456 Implement Bukkit Description for /help 2019-03-14 23:18:41 -04:00
Aikar f6a8c68d80 Add Logger and FileConfiguration as default bukkit dependencies 2019-03-14 22:37:51 -04:00
Aikar 4e103adca4 Add Proper support for Default Completion Handlers 2019-03-14 22:34:56 -04:00
Aikar 67d631d47c Move to an improved CommandRouter, improve routing logic
now supports splitting commands over multiple BaseCommands better
should now only match probable @Default handlers, so @CatchUnknown
can still work in obviously wrong scenarios.

@HelpCommand no longer implies @Default as @CatchUnknown will pick it up
2019-02-25 21:45:12 -05:00