File tree Expand file tree Collapse file tree
common/src/main/java/journeymap/api/v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626import journeymap .api .v2 .client .display .Displayable ;
2727import journeymap .api .v2 .client .event .MappingEvent ;
2828import journeymap .api .v2 .client .util .UIState ;
29+ import journeymap .api .v2 .common .CommonAPI ;
2930import journeymap .api .v2 .common .waypoint .Waypoint ;
3031import journeymap .api .v2 .common .waypoint .WaypointGroup ;
3132import net .minecraft .resources .ResourceKey ;
4243 * Definition for the JourneyMap Client API.
4344 */
4445@ ParametersAreNonnullByDefault
45- public interface IClientAPI
46+ public interface IClientAPI extends CommonAPI
4647{
4748 String API_OWNER = "journeymap" ;
4849 String API_VERSION = "2.0.0-SNAPSHOT" ;
Original file line number Diff line number Diff line change 3232 * Implementation classes must have a no-arg constructor and also have the {@link JourneyMapPlugin} annotation.
3333 */
3434@ ParametersAreNonnullByDefault
35- public interface IClientPlugin extends IJourneyMapPlugin
35+ public interface IClientPlugin extends IJourneyMapPlugin < IClientAPI >
3636{
3737 /**
3838 * Called by JourneyMap during the init phase of mod loading. Your implementation
Original file line number Diff line number Diff line change 1+ package journeymap .api .v2 .common ;
2+
3+ public interface CommonAPI
4+ {
5+ }
Original file line number Diff line number Diff line change 33import org .jetbrains .annotations .ApiStatus ;
44
55@ ApiStatus .Internal
6- public interface IJourneyMapPlugin
6+ public interface IJourneyMapPlugin < T extends CommonAPI >
77{
88 /**
99 * Used by JourneyMap to associate your mod id with your plugin instance.
1010 */
1111 String getModId ();
1212
13+ void initialize (final T api );
1314}
Original file line number Diff line number Diff line change 11package journeymap .api .v2 .server ;
22
3+ import journeymap .api .v2 .common .CommonAPI ;
34import journeymap .api .v2 .common .waypoint .Waypoint ;
45import net .minecraft .server .level .ServerPlayer ;
56
1011 * Currently unused, just a placeholder. Please do not code any of this as it will likely change.
1112 */
1213@ Deprecated
13- public interface IServerAPI
14+ public interface IServerAPI extends CommonAPI
1415{
1516 /**
1617 * Gets all the waypoints stored for the target Server Player.
Original file line number Diff line number Diff line change 88 * <p>
99 * Implementation classes must have a no-arg constructor and also have the {@link JourneyMapPlugin} annotation.
1010 */
11- public interface IServerPlugin extends IJourneyMapPlugin
11+ public interface IServerPlugin extends IJourneyMapPlugin < IServerAPI >
1212{
1313 /**
1414 * Called by JourneyMap during the init phase of mod loading. Your implementation
@@ -19,6 +19,6 @@ public interface IServerPlugin extends IJourneyMapPlugin
1919 *
2020 * @param jmServerApi Client API implementation
2121 */
22+ @ Override
2223 void initialize (final IServerAPI jmServerApi );
23-
2424}
You can’t perform that action at this time.
0 commit comments