Compatibility
Minecraft: Java Edition
Platforms
Supported environments
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
Changelog
CraftPresence Changes
v2.0.0 (06/01/2023)
A Detailed Changelog from the last release is available here
See the Mod Description or README for more info regarding the mod.
Changes
- Java 7 is no longer supported! (You should be using at least Java 8 by now!)
- The mod will still display as using Java 7 bytecode on legacy versions, but will be utilizing Java 8 APIs
- The mod will crash on initialization with a
UnsupportedOperationException
when used on anything below Java 8
- Reworked the way placeholders are interpreted to utilize Starscript
- This integration will allow for significantly more flexibility and overall control over placeholders and how they can be used
- Due to this change, all placeholder names have been adjusted (See the
Placeholders
section of this changelog) - Over 40+ new functions have also been added, including Reflection, JSON, and additional backend utilities for users to create custom placeholders with!
- Additionally, the
allowPlaceholderOperators
option has been removed, due to being redundant - Several new commands, such as
/cp compile
and/cp search
have also been implemented
- Adjusted module logic to perform within their own sub-threads, in an effort to avoid waiting on them to retrieve data
- IE the initial retrieval of data when a module is first enabled is now multithreaded, taking up much less time!
- Migrated the Config Systems from
Properties
toGSON
- A one-time migration layer has been put into place to migrate your v1.x settings over to the v2.x format
- The logic behind data validation has been condensed to be more performant, and this change allows config settings to be more easily migrated across major updates
- Background Options, such as the tooltip and GUI backgrounds, have been reset, since
splitCharacter
was also removed, since we don't use Arrays in this new system
- Added the ability for Module elements to supply their own
PresenceData
- When supplied and enabled, this will do one of two things:
- If
useAsMain
is enabled, this will allow an event to become the generic event rather than simple argument replacement, which is similar to the way SimpleRPC (By Hypherion) presents its data. - Otherwise, if
useAsMain
is disabled, this allows a placeholder to be interpreted differently depending on the RPC field that placeholder is within. An example of this would be being able to make a module's placeholder ([module].message, [module].icon
) equalthis
if it is used in theDetails
Presence Field, while equalingthat
if used in theGame State
Presence Field.
- If
- When supplied and enabled, this will do one of two things:
- Added more flexibility and usage to endpoint icons, including the addition of the
allowEndpointIcons
- For users, the new usages also include fetching the server icon in the Server Settings Scroll Lists, if the Base64 icon is unavailable
- It also allows for fetching a dynamic server icon if the icon's the module is looking for do not exist within the Discord Asset List, and doing similar activity for the player's head icon.
- Multiple Accessibility improvements have been made to the GUI in an effort to be more descriptive and user-friendly
- Added support for the per-gui, per-item, and per-entity systems to have RPC Icon Support
- Added support for transferring a SimpleRPC (By Hypherion) config to CraftPresence (With permission, of course!)
- Removed the ViveCraft Message Option and Fallback Placeholder Message
- Developer Note: You can now use Starscript functions to make custom placeholders for specific brands
- UUIDs are now refreshed in the Entity Module List when the Server's Player List changes
- This prevents a lot of extra elements from coming into the module list, which should keep things cleaner
- Backend: Increased the default text limit for all
ExtendedTextControl
's- Due to this change, minified placeholder support has been removed from the backend
Fixes
- Fixed the GUI module systems not working properly on 1.14+ ports
- Note: Different Loaders may have different screen names, depending on mappings
- Fixed improper options being available in the Dynamic Editor Screen when adding data that was preliminary-supplied from other modules
- Fixed interpreting Dynamic Icons with Spaces in them
- As part of this fix,
formatAsIcon
is now ignored for Custom Assets, but null checks do remain
- As part of this fix,
- Fixed Texture saving issues for the
tooltipBackgroundColor
,tooltipBorderColor
,guiBackgroundColor
, andbuttonBackgroundColor
setting - Backend: Fixed issues that could occur when
ExtendedTextControl#setControlMessage
was fired with a null argument - Fixed the UUID placeholders in
&IGN&
(Now known asplayer.*
) being available, even if it wasn't a valid UUID - Fixed a regression in MultiMC-type instance detection from
v1.9.0
that caused a normal error to not be suppressed properly - Fixed multiple issues that were preventing the ability to hide placeholder output depending on a per-module value
- IE You can now set the
textOverride
to be an empty string in the frontend, and the mod will respect that
- IE You can now set the
- Fixed preliminary-supplied data being able to be removed via the Dynamic Editor Screen
- Only the config entry should have been effected, not the actual module data list
- Fixed Out-Of-Bound issues when there are less than 3 or 4 search results in a Scrollable List
- This issue caused no elements to display until you scrolled, causing it to clamp back to normal values
- The list will now reset the scroll when the list is updated
- Fixed Issues where data relying on the
children
list was unavailable in 1.13+ ports (Tab-Focus changing) - Fixed Issues where the focus status was not being checked for
keyPressed
andcharTyped
on 1.13+ ports- This also fixes hearing a clicking sound when
KP_ENTER
,ENTER
or the spacebar was pushed while focused on a text box
- This also fixes hearing a clicking sound when
- Backend: Fixed
ImageUtils
dynamic texture creation not complying with 1.13+ namespace requirements
Placeholders
One of the foundational changes that have been made to CraftPresence, is with placeholder interpretation.
With the integration of Starscript, several changes, additions, and removals have been made to placeholders and their related systems:
-
Placeholders can now be used anywhere, without restrictions
-
Programmer expressions (Such as formatting, operators, as well as custom functions) have been implemented to allow an even greater level of configurability then we've ever had prior
- See their wiki for some standard functions now available
-
The OR operator, initially added in v1.9.x, has been replaced with Starscript usages
- Prior usages will migrate to an
{getOrDefault(foo, bar)}
format to replicate the prior behavior
- Prior usages will migrate to an
-
All Placeholders have been renamed, converting to an
{foo.bar}
format instead of&FOO:BAR&
- All prior usages from v1 configs will also be migrated to follow the new names as mentioned below:
-
Renamed Placeholders (
old
=>new
, Surround with{}
when using new names):&DEFAULT&
=>general.icon
(Icons Only)&MAINMENU&
=>menu.message
,menu.icon
(Depends on config setting)&BRAND&
=>general.brand
&MCVERSION&
=>general.version
&IGN&
=>custom.player_info_out
,player.icon
(Depends on config setting)&IGN:NAME&
,&NAME&
(FromplayerOuterInfoPlaceholder
) =>player.name
&IGN:UUID&
,&UUID&
(FromplayerOuterInfoPlaceholder
) =>player.uuid.short
&IGN:UUID_FULL&
,&UUID_FULL&
(FromplayerOuterInfoPlaceholder
) =>player.uuid.full
&MODS
=>custom.mods
&MODS:MODCOUNT&
,&MODCOUNT&
(FrommodsPlaceholder
) =>general.mods
&PACK&
=>custom.pack
,pack.icon
(Depends on config setting)&PACK:NAME&
,&NAME&
(FrommodpackMessage
) =>pack.name
&DIMENSION:DIMENSION&
,&DIMENSION&
(From Dimension Settings) =>dimension.name
&DIMENSION:ICON&
,&ICON&
(From Dimension Settings) =>dimension.icon
&DIMENSION&
=>dimension.message
,dimension.icon
(Depends on config setting)&BIOME:BIOME&
,&BIOME&
(From Biome Settings) =>biome.name
&BIOME:ICON&
,&ICON&
(From Biome Settings) =>biome.icon
&BIOME&
=>biome.message
,biome.icon
(Depends on config setting)&SERVER:IP&
,&IP&
(From Server Settings) =>server.address.short
&SERVER:NAME&
,&NAME&
(From Server Settings) =>server.name
&SERVER:MOTD&
,&MOTD&
(From Server Settings) =>server.motd.raw
&SERVER:ICON&
,&ICON&
(From Server Settings) =>server.icon
&SERVER&
=>server.message
,server.icon
(Depends on config setting)&SERVER:PLAYERS&
,&PLAYERS&
(From Server Settings) =>custom.players
&SERVER:WORLDINFO&
,&WORLDINFO&
(From Server Settings) =>custom.world_info
&SERVER:PLAYERINFO&
,&PLAYERINFO&
(From Server Settings) =>custom.player_info_in
&SERVER:PLAYERINFO:COORDS&
,&PLAYERINFO:COORDS&
(From Server Settings),&COORDS&
( FromplayerInnerInfoPlaceholder
) =>custom.player_info_coordinate
&SERVER:PLAYERINFO:HEALTH&
,&PLAYERINFO:HEALTH&
(From Server Settings),&HEALTH&
( FromplayerInnerInfoPlaceholder
) =>custom.player_info_health
&SERVER:PLAYERINFO:COORDS:xPosition&
,&PLAYERINFO:COORDS:xPosition&
(From Server Settings) ,&COORDS:xPosition&
(FromplayerInnerInfoPlaceholder
),&xPosition&
(FromplayerCoordinatePlaceholder
) =>player.position.x
&SERVER:PLAYERINFO:COORDS:yPosition&
,&PLAYERINFO:COORDS:yPosition&
(From Server Settings) ,&COORDS:yPosition&
(FromplayerInnerInfoPlaceholder
),&yPosition&
(FromplayerCoordinatePlaceholder
) =>player.position.y
&SERVER:PLAYERINFO:COORDS:zPosition&
,&PLAYERINFO:COORDS:zPosition&
(From Server Settings) ,&COORDS:zPosition&
(FromplayerInnerInfoPlaceholder
),&zPosition&
(FromplayerCoordinatePlaceholder
) =>player.position.z
&SERVER:PLAYERINFO:HEALTH:CURRENT&
,&PLAYERINFO:HEALTH:CURRENT&
(From Server Settings),&HEALTH:CURRENT&
( FromplayerInnerInfoPlaceholder
),&CURRENT&
(FromplayerHealthPlaceholder
) =>player.health.current
&SERVER:PLAYERINFO:HEALTH:MAX&
,&PLAYERINFO:HEALTH:MAX&
(From Server Settings),&HEALTH:MAX&
( FromplayerInnerInfoPlaceholder
),&MAX&
(FromplayerHealthPlaceholder
) =>player.health.max
&SERVER:PLAYERS:CURRENT&
,&PLAYERS:CURRENT&
(From Server Settings),&CURRENT&
(FromplayerListPlaceholder
) =>server.players.current
&SERVER:PLAYERS:MAX&
,&PLAYERS:MAX&
(From Server Settings),&MAX&
(FromplayerListPlaceholder
) =>server.players.max
&SERVER:WORLDINFO:DIFFICULTY&
,&WORLDINFO:DIFFICULTY&
(From Server Settings),&DIFFICULTY&
( FromworldDataPlaceholder
) =>world.difficulty
&SERVER:WORLDINFO:WORLDNAME&
,&WORLDINFO:WORLDNAME&
(From Server Settings),&WORLDNAME&
( FromworldDataPlaceholder
) =>world.name
&SERVER:WORLDINFO:WORLDTIME&
,&WORLDINFO:WORLDTIME&
(From Server Settings),&WORLDTIME&
( FromworldDataPlaceholder
) =>world.time.format_24
&SERVER:WORLDINFO:WORLDTIME12&
,&WORLDINFO:WORLDTIME12&
(From Server Settings),&WORLDTIME12&
( FromworldDataPlaceholder
) =>world.time.format_12
&SERVER:WORLDINFO:WORLDDAY&
,&WORLDINFO:WORLDDAY&
(From Server Settings),&WORLDDAY&
( FromworldDataPlaceholder
) =>world.time.day
&SCREEN:SCREEN&
,&SCREEN&
(From Gui Settings) =>screen.name
&SCREEN:ICON&
,&ICON&
(From Gui Settings) =>screen.icon
&SCREEN:CLASS&
,&CLASS&
(From Gui Settings) =>data.screen.class
&SCREEN&
=>screen.message
,screen.icon
(Depends on config setting)&TARGETENTITY:ENTITY&
,&ENTITY&
(From Target Entity Settings) =>entity.target.name
&TARGETENTITY:ICON&
,&ICON&
(From Target Entity Settings) =>entity.target.icon
&TARGETENTITY&
=>entity.target.message
,entity.target.icon
(Depends on config setting)&RIDINGENTITY:ENTITY&
,&ENTITY&
(From Riding Entity Settings) =>entity.riding.name
&RIDINGENTITY:ICON&
,&ICON&
(From Riding Entity Settings) =>entity.riding.icon
&RIDINGENTITY&
=>entity.riding.message
,entity.riding.icon
(Depends on config setting)&TILEENTITY:[SLOT]&
,&[SLOT]&
(FromplayerItemsPlaceholder
) =>item.[slotIdentifier].message
&TILEENTITY&
=>item.message.default
&ITEM&
(From Item Settings) =>item.message.holding
-
Added Placeholders:
data.server.motd.line.*
added to display only the specified line fromserver.motd.raw
world.time.format_12
added to displayworld.time.format_24
in anxx:xx AM/PM
formatplayer.icon
added ifallowEndpointIcons
is active and a validplayerSkinEndpoint
is supplied*.instance
and*.class
placeholders added to relevant Modules
-
Removed (or moved) Placeholders:
- NBT placeholders have been removed for the entity and item modules, replaced by the
getNbt
function player.position.*
andplayer.health.*
placeholders now identify asDouble
instead of Stringsserver.players.*
placeholders now identify asInteger
instead of Strings
- NBT placeholders have been removed for the entity and item modules, replaced by the
Translations
The following changes have been made for translations:
- Added:
craftpresence.command.[compile,search]
(New Commands)craftpresence.command.usage.[compile,search]
(New Commands)craftpresence.command.usage.main
(Modified for/cp compile
and/cp search
addition)craftpresence.command.usage.view
(Modified for/cp view placeholders
addition)craftpresence.command.export.progress
(Added Progress notifier for/cp export assets
)craftpresence.logger.error.compiler
(Error message for new/cp compile
command)craftpresence.logger.error.config.backup
(Logging added for Backing up a Config)craftpresence.logger.error.pack
(Replacement of Pack Error Translations, previously underfile.*
)craftpresence.logger.error.parser
(Error message for new/cp compile
command)craftpresence.logger.error.verbose
(GeneralizedVerbose Mode
error addition)craftpresence.logger.info.config.outdated
(Logging for Migration Layers in outdated Configs)craftpresence.logger.info.pack.[init,loaded]
(Replacement for old pack initialization/loaded logging)gui.config.[name,comment].advanced.allow_endpoint_icons
(Added Property)gui.config.comment.button.reset.config
(Added tooltip for theReset Config
Button)gui.config.[name,comment].display.dynamic_variables
(Added Property)gui.config.[name,comment].display.enabled
(Added Property)gui.config.name.display.[start,end]_timestamp
(Added Property)gui.config.[name,comment].display.use_as_main
(Added Property)gui.config.[name,comment].general.detect_atlauncher_instance
(Added Property)gui.config.message.button.remove
(Used in Dynamic Editors)gui.config.message.button.wiki
(Used in the About Gui)gui.config.message.editor.description
(Used in Scroll List tooltips)gui.config.message.editor.original
(Used in Scroll List tooltips)gui.config.message.editor.usage
(Used in Scroll List tooltips)
- Modified:
craftpresence.defaults.*
(Related toPlaceholders
Section)craftpresence.logger.error.data.close
(Modifified for Consistency fixes)craftpresence.logger.error.updater.failed
(Fixed a typo between debug mode and verbose mode)craftpresence.logger.info.updater.*
(Consistency passthrough for Update Checker Rewrites)craftpresence.placeholders.*
(SeePlaceholders
Section)gui.config.comment.advanced.[gui,item,entity_target,entity_riding]_messages
(Modified to remove obsolete info)gui.config.comment.[biome,dimension,server]_messages.[biome,dimension,server]_messages
(Modified to remove obsolete info)gui.config.comment.button.sync.config
(Modified for new config systems)gui.config.comment.display.[button_messages,dynamic_icons]
(Modified to remove outdated info)gui.config.message.changelog
(Consistency passthrough for Update Checker Rewrites)gui.config.message.presence.[generalArgs,iconArgs]
(Edited to move duplicated data tocraftpresence.placeholders.notes
)
- Removed:
craftpresence.exception.config.prop.null
(Obsolete, removed from Config System Upgrade)craftpresence.logger.error.config.adjust.global
(Obsolete, removed from Config System Upgrade)craftpresence.logger.error.config.invalid.icon.[pre,post]
(Obsolete, Invalid Icons no longer are replaced)craftpresence.logger.error.file.*
(Removed old pack translations, replaced bycraftpresence.logger.error.pack
)craftpresence.logger.error.technic.limitation
(Obsolete, removed in Pack Implementation Rewrites)craftpresence.logger.error.updater.changelog
(Obsolete, removed in Mod Update Checker Rewrites)craftpresence.logger.info.config.notice
(Obsolete, removed from Config System Upgrade)craftpresence.logger.info.[instance,manifest,mcupdater,technic].*
(Removed old pack translations, replaced bycraftpresence.logger.info.pack.*
)craftpresence.logger.info.update.dynamic
(Obsolete and Redundant logging for Reflection updates)craftpresence.logger.info.updater.receive.changelog
(Redundant Logging,craftpresence.logger.info.updater.receive.data
)craftpresence.logger.info.updater.status
(Redundant Logging)craftpresence.logger.warning.updater.data.missing
(Obsolete, dummy data is no longer supplied)craftpresence.logger.warning.updater.homepage
(Obsolete, removed in Mod Update Checker Rewrites)craftpresence.logger.warning.updater.incompatible.json
(Obsolete, removed in Mod Update Checker Rewrites)craftpresence.multiplayer.status.*
(Obsolete, related code migrated to check MC's Translations instead)gui.config.[name,comment].advanced.allow_placeholder_operators
(Removed Property)gui.config.[name,comment].advanced.enable_commands
(Removed Property)gui.config.[name,comment].advanced.split_character
(Removed Property)gui.config.[name,comment].general.show_time
(Obsolete Property, replaced withPresence Data
Edits)gui.config.[name,comment].status_messages.fallback.pack_placeholder_message
(Removed Property)gui.config.[name,comment].status_messages.placeholder.*
(Removed Properties, Moved to theDynamic Variables
UI)gui.config.message.remove
(Obsolete, Replaced via button in related areas)gui.config.message.tags
(Obsolete, Merged into main placeholder tooltips)
More Information
Known Issues
Despite configuration compatibility being ensured between v1.8.x/v1.9.x and v2.0, caution is advised to ensure the best experience, while also baring in mind that features can be adjusted, removed, or added/iterated upon between releases.
The following known issues are present in this build:
- Text with colors do not retain those colors if that text moves to a newline in the CraftPresence UIs
- The HypherionMC Config Layer (To Convert a Simple RPC config to CraftPresence) contains the following known issues:
- Placeholders related to the realm event are currently unimplemented and parse as
{''}
.
- Placeholders related to the realm event are currently unimplemented and parse as
Snapshot Build Info
Some Versions of this Mod are for Minecraft Snapshots or Experimental Versions, and as such, caution should be noted.
Any Snapshot Build released will be marked as ALPHA to match its Snapshot Status depending on tests done before release and issues found.
Snapshot Builds, depending on circumstances, may also contain changes for a future version of the mod, and will be noted
as so if this is the case with the -Staging
label.
Files
Metadata
Release channel
ReleaseVersion number
v2.0.0+1.14.4Loaders
Game versions
1.14.4Downloads
18Publication date
June 1, 2023 at 4:07 PMPublisher
CDAGaming
Owner