Commit Graph

21 Commits

Author SHA1 Message Date
Len 88c3ee39ec Add support for IslandTrust and IslandUnTrust. 2024-04-23 10:44:11 +02:00
destro174 9cbcab4a82
Ore generators (#14)
* Add alias `ch` for challenge command

* Add base layer for Ore Generators.

* Fix default ore for generators
2024-03-04 12:44:43 +01:00
destro174 efc6b62b2f
Add a base layer for challenges.
Implement a challenge system. This allows players to work towards them and add some goals to reach.
Demo challenges are included in file challenges.yml. This should provide details on how to create your own challenges.

---------

Co-authored-by: Teriuihi <teriuihi@alttd.com>
2024-02-25 14:02:51 +01:00
Len 53d4549573 Set a default island name if unset. 2024-02-21 16:20:44 +01:00
Stijn 0974423e3f
Island name (#8)
* Add island name checking and renaming functionality

Added a method in the IslandData class to check for duplicate island names and a new class IslandName to handle island name-related commands. These changes allow players to rename their islands while enforcing uniqueness and certain length restrictions on the names.

* Update island name in island data cache when renamed

Modified the 'islandName' method in the 'Island' class to make sure that any changes made to an island's name are also updated in the island data cache. This ensures that all references to the island's name are consistent and accurate throughout the application.
2024-02-20 03:50:55 +01:00
Stijn b78736fcc3
Is top (#7)
* Add IslandTop command with refresh cooldown

The "IslandTop" command has been added. This provides a sorted list of top-performing islands. A configuration for refresh cooldown was also added. The sorted island list is updated once the specified minutes in the configuration have passed to improve performance. The ranking display for the player's island is highlighted in green text.

* Update IslandTop command

On plugin startup the IslandData is now loaded in. IslandData was moved to its own file and gets updated when a new island is created or when one levels up. The IslandData gets deleted when the owner leaves the island, destroying it.

* Update island name formatting in IslandData

The method which formats island name in IslandData class has been updated. If the island name is null, it now defaults to "Unnamed Island". This adjustment makes the information clearer when the island name is not defined.

* Set default name for islands during creation

Ensured that the 'owner' method in the 'Island' class set's the island name when an owner is set/changed. This will only happen if the island name is either null or blank. This is done to ensure island's always have a name when created.
2024-02-20 03:50:21 +01:00
Stijn 4b2cadb419
Events (#4)
* Refactor island and island player classes to interfaces

Refactored the existing Island and IslandPlayer classes to interfaces and created the implementation classes, IslandImpl and IslandPlayerImpl.

* Add event handling for player island actions

Implemented new event classes for handling player activities related to islands. These include IslandPlayerJoinEvent, IslandPlayerLeaveEvent, IslandPlayerJoinIslandEvent, and IslandPlayerLeaveIslandEvent, facilitating better tracking and handling of player actions on islands for other plugins.

* Implement Island interfaces in IslandImpl and IslandPlayerImpl

Updated the IslandImpl and IslandPlayerImpl classes to implement the Island and IslandPlayer interfaces respectively.

* Refactor IslandPlayer Interface

Removed player() method and added islandOwner() method in the IslandPlayer interface. This change reflects way the IslandPlayerImpl currently works.

* Implement event triggers for island join/leave and server join/leave events

Added triggers for IslandPlayer events in the relevant island management methods. Also, modified IslandPlayerJoinEvent and IslandPlayerLeaveEvent to remove unnecessary references to Island-object.

* Reverting in events

* Replace interfaces with records in event parameters

The commit replaces the usage of interfaces Island and IslandPlayer with record classes in event parameters. It also adds methods to convert instances to respective records in Island and IslandPlayer classes. The interfaces are then removed as they are no longer needed.

* Replace interfaces with records in event parameters

The commit replaces the usage of interfaces Island and IslandPlayer with record classes in event parameters. It also adds methods to convert instances to respective records in Island and IslandPlayer classes. The interfaces are then removed as they are no longer needed.
2024-02-19 03:52:17 +01:00
Stijn d1c8d29cde
Add IslandTop command with refresh cooldown (#1)
* Add IslandTop command with refresh cooldown

The "IslandTop" command has been added. This provides a sorted list of top-performing islands. A configuration for refresh cooldown was also added. The sorted island list is updated once the specified minutes in the configuration have passed to improve performance. The ranking display for the player's island is highlighted in green text.

* Update IslandTop command

On plugin startup the IslandData is now loaded in. IslandData was moved to its own file and gets updated when a new island is created or when one levels up. The IslandData gets deleted when the owner leaves the island, destroying it.
2024-02-18 14:22:17 +01:00
Len 06869871f1 Add island::broadcast as a way to announce information to all the island members and owner. 2024-02-17 23:18:12 +01:00
Len 333e8e9b8d Allow expanding the island WorldBorderLevel 2024-02-17 21:55:17 +01:00
Len 9062caf862 Teleport back to island when logging in. 2024-02-17 12:05:42 +01:00
Len 34e9aa240a Save members list when adding new members 2024-02-11 16:30:59 +01:00
Len e546a8f748 Fix island.level config path 2024-02-11 16:14:04 +01:00
Len f4bf8e8964 add base for IslandRestart.java 2024-02-10 22:12:15 +01:00
Len ebf2894ccf Add IslandInvite.java 2024-02-10 21:50:01 +01:00
Len 8847430ed9 Rework the GUI 2024-02-09 19:46:39 +01:00
Len b7f5b15534 Tweak some stuff and implement cobblegens. 2024-02-05 15:03:39 +01:00
Len 93f38561b0 Progress on island stuff 2024-02-04 21:44:57 +01:00
Len a363382a0f Start working on actual island generation and saving the data 2024-02-04 00:51:10 +01:00
Len 20a5b09a39 Add a base for commands 2024-01-25 17:45:18 +01:00
Len d8b9a96355 add island struct 2024-01-18 08:58:21 +01:00