Commit Graph

102 Commits

Author SHA1 Message Date
Len 433329be36 Add EssentiaListener.java to listen and interact with Essentia events. 2024-05-26 11:46:27 +02:00
Len 9a560cd8c6 Build changes 2024-05-26 11:33:20 +02:00
Len 92664eb636 Fix some issues with ore generators 2024-05-10 22:03:38 +02:00
Len 18cb07f34e Add KickFromBungeeCommand 2024-04-26 09:50:03 +02:00
Len b2eab51b72 Rework listeners and add EntityListener. 2024-04-23 10:54:56 +02:00
Len 88c3ee39ec Add support for IslandTrust and IslandUnTrust. 2024-04-23 10:44:11 +02:00
Len 72daaca943 Fix exp not being dropped for generated ores. 2024-04-23 09:09:30 +02:00
destro174 c081eb24ff
Ore gen v2 (#16)
* Fix typo in island gui

* Add glow for challenges that are completed.

* Enhance ore generators to generate the ore when the block is broken.

* Fix worlds not unloading.

* Fix generating ore for obsidian.
2024-04-21 18:47:40 +02:00
destro174 94b3abb0f5
Ore generators V2 (#15)
* Fix typo in island gui

* Add glow for challenges that are completed.

* Enhance ore generators to generate the ore when the block is broken.
2024-04-20 15:00:35 +02:00
Len 09525f0be1 Add challenges node to IslandGUI.java 2024-04-12 22:02:49 +02:00
Len 528c15db9b Prevent repeating certain challenge types. 2024-04-12 14:33:05 +02:00
Len 7bec99b78e Add option to load loottables as challenge rewards. 2024-04-06 09:10:34 +02:00
Len 0957308a12 Do not clear inventory and enderchest when creating a new island. 2024-04-05 15:40:36 +02:00
Len f33c841583 Do not generate ores for stone generators. 2024-03-24 08:54:13 +01:00
Len b773e7f0f3 Use a LinkedHashMap to store challenges. 2024-03-22 20:27:03 +01:00
Len 875d770742 Fix Unhandled exception when executing command is top
During early game if there are less then 10 islands the IntStream.range fails. We add Math.min to either select the amount of islands available or a top of 10.
2024-03-09 10:19:01 +01:00
Len 49c5cc94c1 Merge branch 'main' of github.com:Altitude-Devs/CometSkyBlock 2024-03-09 10:12:57 +01: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
Len 30ab288af1 Add alias ch for challenge command 2024-02-25 17:11:01 +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
Len 3ac9b7dd89 Display the next cobblestone tier in the UpgradesGUI.java 2024-02-21 16:17:42 +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 69cd686d04
Implement teleportation to island in 'VisitRequest' accept method (#9)
Fixed the accept function in the 'VisitRequest' class by adding teleportation to the island of the target. Additionally, validation checks for this were added. Specifically, it now verifies the existence of both the player and the requested island before carrying out the teleportation command.
2024-02-18 23:26:49 +01:00
Stijn 2b69335b2e
Improved Player Experience Display (#6)
Updated the Player Experience Display in the UpgradesGUI to show both the current experience of the player and the experience required to level up. This provides a clearer oversight for players on their progress towards the next island level. This changes only affects the user interface.
2024-02-18 16:43:39 +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
destro174 d09e8567ac
Merge pull request #2 from Altitude-Devs/IslandBroadcasts
Add island::broadcast as a way to announce information
2024-02-17 23:28:28 +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 0851570d16 Fix players leaving an island resetting the island owner. 2024-02-17 22:54:15 +01:00
Len 333e8e9b8d Allow expanding the island WorldBorderLevel 2024-02-17 21:55:17 +01:00
Len 05926df76e Fix playerheads in the GUI 2024-02-17 21:25:50 +01:00
Len 084b3ea5de Allow bucketing obsidian to lava. 2024-02-17 15:30:36 +01:00
Len cccd301cbb Set world seed to 4894934811986575177 2024-02-17 15:22:55 +01:00
Len d065d7b2f1 Set difficulty to normal by default 2024-02-17 15:10:52 +01:00
Len 17b62d6a01 Set gamerule DO_INSOMNIA to false when creating islands. 2024-02-17 15:03:56 +01:00
Len fefeba33be Add WorldLoader.java and WorldManager.java 2024-02-17 13:23:11 +01:00
Len 79953416d1 Load island difficulty when loading islandworld 2024-02-17 12:15:23 +01:00
Len 9062caf862 Teleport back to island when logging in. 2024-02-17 12:05:42 +01:00
Len 8a51c9d99c Add IslandRestart 2024-02-16 10:32:00 +01:00
Len 92b445f2a2 Clean up GUI Titles 2024-02-16 10:27:32 +01:00
Len dc6293eb45 Add some more output to commands 2024-02-16 10:25:11 +01:00
Len b04fc5d8a1 Fix interactions in the overworld 2024-02-13 17:17:43 +01:00
Len eb5d538657 Fix typo in MessageConfiguration.java 2024-02-11 17:05:49 +01:00
Len 64bcbdfe5f Add CobbleStone generator level to upgrades GUI 2024-02-11 16:58:35 +01:00
Len dd6b9b6c92 Update islandId when creating a new island. 2024-02-11 16:39:42 +01:00
Len 4286856f84 Update island owner when leaving island 2024-02-11 16:36:15 +01:00
Len 34e9aa240a Save members list when adding new members 2024-02-11 16:30:59 +01:00
Len f4b67c93c3 Add back button to GUI 2024-02-11 16:22:22 +01:00