rumsfield / konquest Goto Github PK
View Code? Open in Web Editor NEWKonquest plugin for Spigot Minecraft territory control
License: GNU General Public License v3.0
Konquest plugin for Spigot Minecraft territory control
License: GNU General Public License v3.0
Figure out how to create a Maven repo for Konquest? So other projects can include it for API reasons.
Assign linked players a role for their kingdom, if one exists. Check the Discord server (guild) if a role exists that matches the name of the kingdom.
Give a player that role when:
Remove a kingdom role when:
When a kingdom is removed or renamed, do nothing. The old role in Discord should have no affect, because any kingdom messages, for renamed kingdoms, will not go to the linked channel any more.
Allow users to include "shortcode" or placeholders in messages used with discord, like image files and user/role mentions.
Maybe create a separate config file, just for discord messages. Users would have to put the image files into the plugins/Konquest folder that they want to embed in the messages.
Allow users to set colors and emojis in Discord messages.
Currently, only player data is stored in the SQL database. All territory data is stored in YML files. This may not scale very well. Investigate ways to store territory data in the SQL database instead. If a good solution is found, then implement data storage for
Also, to support version migration, implement a system for transferring old YML data into the SQL database.
From https://github.com/Rumsfield/konquest-doc/issues/67
Test the placeholders with latest hologram display plugins, scoreboards, etc.
https://www.spigotmc.org/resources/bluemap.83557/
In the database it still shows the prefixes they set when they had kingdoms.
MariaDB [konquest]> SELECT * FROM players;
+--------------------------------------+------------+--------------+-----------+---------+----------+--------+
| uuid | kingdom | exileKingdom | barbarian | prefix | prefixOn | custom |
+--------------------------------------+------------+--------------+-----------+---------+----------+--------+
| redacted UUID | Barbarians | Barbarians | 1 | PEASANT | 0 | |
| redacted UUID | Barbarians | Barbarians | 1 | NOBLE | 1 | |
| redacted UUID | Barbarians | Barbarians | 1 | PEASANT | 0 | |
| redacted UUID | Barbarians | Barbarians | 1 | CLERIC | 1 | |
| redacted UUID | Barbarians | Barbarians | 1 | PEASANT | 1 | |
| redacted UUID | Barbarians | Barbarians | 1 | BARON | 1 | |
+--------------------------------------+------------+--------------+-----------+---------+----------+--------+
6 rows in set (0.001 sec)
MariaDB [konquest]>
We made 3 kingdoms on MC 1.19.4 using Konquest 0.11.2. When I updated the server jar to the paper 1.20 (build 19), then everyone logged in and it said, "You are now a barbarian" in chat, and their places weren't kingdoms anymore. We haven't tried remaking the kingdoms yet, that might work.
Example log:
https://pastebin.com/DeHR5bUQ
Add a core config option to allow barbarian players to join their camp to a clan when all clan members are offline.
Copied from #95
Similar to core.kingdoms.no_enemy_travel
, create a new option core.camps.no_enemy_travel
, which prevents any player that is no the owner from traveling while inside of a camp.
The current logic will prevent non-barbarians from traveling while inside of a camp, but any barbarian can travel inside of any camp.
Konquest can integrate with QuickShop in order to add shop constraints based on territories and player relationships. This integration has gotten out of date and only supports an older version of QuickShop.
Update to the latest version of QuickShop (maybe using Gradle) and make sure chest shops work as described on the public Konquest wiki.
Also, investigate other chest shop plugins to integrate, maybe Chest Shop if that's still around and updated.
shop
- allows all players to create shopsUpdate everything to allow players to make kingdoms.
Reference: https://github.com/Rumsfield/konquest-doc/issues/65
Allow other plugins to instantiate an API interface class for getting info about Konquest. Also provide events.
Update the project to use Gradle for dependencies, build automation, etc.
Context is that there's a kingdom with a master and an officer. The master exceeds the offline timeout and attempts to be pruned. During the forced exile, the officer was set as the new master, and the old master's UUID was removed from the kingdom's membership list. However, it appears that the old master's kingdom was not updated to Barbarians, and their isBarbarian
flag remains false. This data is not flushed to the database either.
On subsequent offline timeout pruning intervals, the old master is identified as not a Barbarian at attempts to force exile again, but it always errors out because the player is not a member of their kingdom, error shown below:
Things to investigate:
When setting up the konquest repository with IntelliJ in macOS 13.3.1, the following exception is thrown during the Gradle sync:
java.lang.IllegalStateException: Module entity with name: konquest should be available
This appears to be an issue with the latest version of IntelliJ as documented in this YouTrack ticket: https://youtrack.jetbrains.com/issue/IDEA-317606/
The workaround at the moment is to change the casing of the root project name in settings.gradle.kts from uppercase to all lowercase.
/k kingdom
to set the web map color of a kingdom./k kingdom webcolor X
- master only/k admin kingdom (kingdom) webcolor X
The argument X can be any enum name of the Color enum (e.g. RED, NAVY, PURPLE, etc). It can also be a hex string with format #RRGGBB
. Including the color argument sets the color. Omitting the color argument displays the current color.
Add a core.yml option to enable kingdom masters to set the webcolor, or let only admins do it.
The webcolor needs to be a new field in the KonKingdom class, and needs to be stored in kingdoms.yml.
Like admin reload...?
konquest.create.camp
konquest.create.town
konquest.create.kingdom
When a player opens the chat box, somehow display whether they are in global or kingdom chat mode.
Add API manager and methods for creating and managing ruins.
The ruin manager and ruin model classes already exist, but needs to include methods for managing critical blocks and spawn points for ruin golems.
JOIN
- allows players to join or be invitedLEAVE
- allows players to leave or be kickedPROMOTE
- allows player promotion to knight/officerDEMOTE
- allows player demotion to resident/memberTRANSFER
- allows lord/master to transferAdd a config option to core.yml under core.database.mysql
, called prefix
, which is by default a string kq_
.
The option will be used (when not an empty string) to prepend to the SQL table names:
This prefix option should help prevent the likelihood of conflicting table names in databases shared with other plugins.
There also needs to be logic to attempt to recover old Konquest tables and copy them into the new tables when the prefix changes, and when upgrading from the original non-prefixed tables.
Create a default english.yml file for all chat notices, messages, errors, menu text, stats, accomplishment prefixes, etc.
I don't know if this is practical for Konquest, but it would be really neat if there were automated unit tests to verify lots of core functionality of the plugin. Right now, every feature and mechanic is tested manually in a Spigot or Paper server. I only test with 2 player accounts, so I could possibly miss some big issues related to larger scale servers.
Ideally, there would be some kind of virtual Spigot server with virtual players, and a test suite that simulates a player joining, creating towns, and doing other common things. There would also be lower-level unit tests for all of the manager and model classes.
This would take a lot of work to complete, so initially just research possible approaches/solutions to see if this is feasible. Document findings in this issue.
Currently town monuments are pasted from template all in one tick. Update the BlockPaster class to extend BukkitRunnable to only paste a single Y level of the monument every tick until it is complete.
When Konquest is included as a dependency in other projects, either as an imported JAR or maven repo, API methods should display a tooltip with javadoc info displayed.
See this example in Eclipse, when a Java String method is being typed:
But when a Konquest API method is hovered:
I want the Konquest methods to show info from the javadoc found in the doc
folder. I'm assuming that doc
must be included in the Konquest JAR somehow, and maybe some other options are needed during the build.
Let admins force the prefix title of online and offline players.
Also update a player's prefix in the admin stat command when stats change.
Give towns a central bank, where town lord is the owner. Bank is re-created for new lords and transfers funds. Town residents can deposit into bank, which uses funds to pay for upgrades etc.
Add config options for kingdom taxes and banks:
Every interval, all kingdom members who are residents of at least 1 town have percentage of account balance withdrawn. If set to global disbursement, all members taxes are totaled and divided equally between towns with enabled tax income. If local disbursement, a player's taxes will only go to the towns they are resident of.
Allow town lords to enable tax income (disabled by default) to pull a percentage of total kingdom taxes. The more towns with enabled income tax, the less each one gets, given fixed kingdom population.
Town info displays bank balance, tax rate, etc.
Server admins can choose an interest rate on central bank accounts to grow savings. Or add tax rate, interest rate to per-kingdom flags.
If economy provider does not implement banks, use original bankless system of pulling from lord's player account for town upgrades. Taxes will be disabled, as well as interest rates.
Towns have a central account, either a bank "owned" by lord, or the lord's player account.
Add town options for:
Taxes will be deposited into each town's central account. Only online players are taxed.
Increase health and attack damage
Level 1: Health increased by 1 heart
Level 2: Health increased by 2 hearts, damage increased by 1
Level 3: Health increased by 3 hearts, damage increased by 2
When upgrade is applied, search for all nearby iron golems to apply buff. When new golems are created, check for upgrade and apply buffs.
Apply some potion effect for visual indicator of buffed golem.
Spawns a killer bunny to defend critical blocks in the monument.
Target enemies that interact with critical blocks. Stop target when they leave monument chunk or die. Try to path to keep within monument? or teleport if it gets too far away... ?
Publish develop
35d776f to main
as patch version 0.11.3.
Implement remaining features and fixes for public beta release v0.1.0.
From https://github.com/Rumsfield/konquest-doc/issues/68
Make sure that when enough players log off from a kingdom, that it can still be attacked during the offline protection warmup.
Change the command framework to be more modular and easier to manage the commands, currently, there is a lot of repetitive code that does similar things, and could be refactored to be more optimized and easier to work with.
Loot chests should have a visual indicator above them displaying the time left remaining before a loot chest can be opened, or if it is ready to be opened, the name tag should be "READY"
The plugin fails to load in 1.16.5.
Check all version compatibilities.
Make info more clear (which integrations are enabled, all checks, loading info, etc).
Improve info about plugin mechanics.
Work on minor fixes and adjustments.
When a command is executed with incorrect arguments, instead of printing just the generic invalid params message, also print that command's help usage.
Also, update auto-complete so that it shows the expected next argument, if there is one.
Prevent any hangables like torches and lanterns from dropping when the blocks of a monument are removed from capture or town removal.
Log actions to file:
Capture actions in database table.
Add command to query logs with filtering.
Add MySQL and any other support options for databases in config.
Add more data to the database.
By default, the SQL database uses SQLite with a Konquest.db file. This file can potentially become corrupted by external means. Add a feature in Konquest which periodically backs up the DB file every N days, up to X times before deleting the oldest backup.
Maybe also include an auto-restore feature where if the database cannot be loaded when a SQLITE_NOTADB error is detected, or other standard SQLITE malformed error, revert to the most recent backup file.
Change the project IDE to IntelliJ. From a fresh repo clone, the project should
The hard-coded String paths must be replaced with their counterpart enums in CorePath. Throughout the code, core.yml options are fetched using this common approach:
refreshTimeSeconds = konquest.getConfigManager().getConfig("core").getLong("core.monuments.loot_refresh",(long)0.0);
Most major classes have a reference to the main Konquest instance, konquest
, either directly or via a superclass method getKonquest()
. Core.yml settings are loaded into memory on plugin enable, and are accessed via the ConfigManager class, which can access the core config. Because this is so common, there is a convenience method, Konquest#getCore()
.
So, there are two changes for every occurrence of this core config access:
konquest.getConfigManager().getConfig("core")
with konquest.getCore()
."core.monuments.loot_refresh"
with CorePath.MONUMENTS_LOOT_REFRESH.getPath()
.Search for all occurrences of getConfigManager().getConfig("core")
to find most of these areas. If any String paths do not have a matching CorePath enum, leave it alone and record its location in this issue.
Work on improvements for next public release.
All user input for names are validated against common criteria. One check is for only alpha-numeric characters. Change this to allow an exception for underscores. I think it shouldn't break anything.
Change the mechanics of barbarian camps so that they are created by placing a campfire, instead of a bed. This will allow the player to more freely use beds as a home spawn, while also having a camp spawn at the campfire.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.