MCCore
MCCore
MC Core is an attempt to provide a foundation for several aspects of bukkit plugin development to help new coders get started more easily, provide a framework for new plugins (or old ones that decide to convert) to be more compatible, and just in general provide many tools to speed up the development process. This plugin acts as a library for many different functions so that people can avoid coding the same things over again, and possibly do some things they didn't think were possible. Without further ado, here are the tools that MC Core has to offer:
Scoreboard
- Many scoreboards can be registered at once
- Scoreboards can optionally cycle through all registered ones or be chosen via a command (controlled by players)
- There are new types of scoreboards provided that give easy functionality:
StatBoard
- Automatically updating stats
- A one-method interface provided allows you to turn your player data into something that can be used with this scoreboard!
TextBoard
- Easily display lines of text on the scoreboard (You don't need to worry about length requirements, it wraps it automatically)
- Option to automatically divide up messages
This is the TextBoard in-game with the "separateMessages" option as true. This was created and displayed in only 6 lines of code (4 of them were just simply adding the text!)
Chat Management
- Ability to have many plugins providing prefixes without conflict
- Can have colorful display names and many prefixes
Plugin Prefixes
- Applied in code only
- One prefix per plugin name
- Great way to apply important prefixes without conflicting with other plugins
Unlockable Prefixes
- Can have an unlimited amount (more or less)
- Players get to choose which one they want showing and change whenever
Display Names
- Color support via the ampersand character '&'
- Command requiring permissions so you control who uses it
Command Tools
- Simple, flexible system for setting up commands
- Can make as many levels to your commands as you want (e.g. /root, sub1 sub2 sub3 args)
- Commands using ConfigurableCommand are automatically configurable for users
- Configuration includes enabling/disabling commands, changing the command names, and changing the descriptions
- Commands are automatically arranged into pages for command usage
- Text buttons for switching between pages is included for versions 1.7.9 and later!
Config
- Has the basic implementation from the Bukkit tutorial included
- Added the ability to create configs in new folders
- Added the ability to add savable objects to them for easy saving
- Configs obtained through the MCCore method automatically save on disable!
Name Translations
- Mob, enchantment, and item conversions between bukkit and vanilla names
- Mobs have the option of detailed names with attributes like sheep color or villager profession!
Text Manipulation
TextFormatter
- Formats strings into UpperCamelCase, lowerCamelCase, or General Form For Titles
TextSizer
- Measures the legnth of strings for the chat box
- Can add spacing to strings in front or in back to square everything up nicely
- More accurate than what can be achieved by manually adding spaces alone!
TypeChecker
- Allows you to check whether or not a string is an integer, double, or other type before trying to parse it
TextSplitter
- More for scoreboard usage
- Divides up messages into 16 characters per line
Regions
New to 1.9 are region helpers. There are currenlty 2:
Cuboid
- Allows you to define a cuboid from a number of options
- Easily get the contents of the cuboid such as the blocks or players
- Check whether a certain player is inside
Sphere
- Same as the cuboid except with spheres
Commands
Scoreboard Commands
- /board - Displays usage for scoreboard commands
- /board cycle - Enables scoreboard cycling
- /board list - Shows a list of all active boards
- /board show <boardName> - Switches to the board with the given name
- /board stop - Stops scoreboard cycling
Chat Commands
- /chat list - Displays a list of unlocked prefixes
- /chat name <displayName> - Sets display name (colors via '&' are supported)
- /chat prefix <prefixName> - Sets the prefix as the displayed one
- /chat reset - Resets display name
Permissions
- core.* - all privileges
- core.board - all permissions for scoreboards
- core.board.cycle - board cycle command (default true)
- core.board.list - board list command (default true)
- core.board.show - board show command (default true)
- core.board.stop - board stop command (default true)
- core.chat - all permissions for chat
- core.chat.list - chat list command (default true)
- core.chat.name - chat name command (default op)
- core.chat.prefix - chat prefix command (default true)
- core.chat.reset - chat reset command (default op)
About
I wanted to make a central set of tools for me to work off of to make things easier. I've decided to also share that with everyone else so that maybe plugins can be a little more compatible and help other developers make things much more easily. I plan on adding a lot to this (before you ask, yes, I will be adding permissions for various things) so feel free to provide suggestions as it progresses along!
*
While I try my best at testing for bugs, I can't find them all, especially when I have to test solo and create some things that are for multiple people. Please let me know of any bugs that you find and I apologize for them in advance. (In fact, I appear to be off to a bad start already >_<)
Hey there I've got a very strange bug, which I narrowed down to be caused by MCCore by removing plugin by plugin and only once I add MCCORE not Skillapi this issue occurs.
So when you are not OP you can't place armor stands anywhere. OP players can, after removing MCCORE the issue goes away. I am running 1.10.2 spigot.
on spigot 1.83 scoreboard does not display and i get console error on startup
http://hastebin.com/wunalunibu.vbs
i use latest versions of skillapi and mccore as of this posting time
JavaDocs down?
Error with parties info: SKILLAPI comment plz fix
Cool plugin dude! use it alot!
@ Eniripsa96
tried with the newest mccore error remains. I just found out that the s. coreboard no longer refreshes after each mob kill but will only update if you relog I downloaded the mccore.jar from this site jso the chance of the tampered file should be minimal
http://hastebin.com/arijekuvey.css
Spigot 1.8.7 server build #40 R: MCCore v1.39 for 1.8.1 May 24, 2015 Apparently MCCore is 9 versions behind? can someone please upload the links? [16:58:05] [Thread-19/INFO]: [MCCore] Logger => You are 9 version(s) behind
Cool!
Can you possibly add support for permissions group prefixes?
Also, found a bug with chat names where it does not display for some reason.
Uploaded a new version (v1.28) which includes:
I get this errror during startup: http://pastebin.com/8TnV1WJs Spigot 1.8.1 and latest MCCore
Would you mind altering the command '/board show' such that if no board is named it will display the first board in /board list or any board at all in the cycle?
I'm using a plugin that uses the scoreboard for NPC conversations and isn't likely to build compatibility with MCCore. However, I can force the player to use commands when the conversation with the NPC is over, but I'm unable to fetch their class name. So, I am forced to have the player run /board show Class1, /board show Class2, /board show Class3, etc and this spams their chat with errors.
https://github.com/Eniripsa96/MCCore/issues/2
@Eniripsa96
Thanks Alot! :D
Just uploaded a new version that will hopefully act as a hotfix for the version errors with 1.7.10 until I get back from college and can more accurately address the problem. It should be approved and available soon.
Update to 1.7.10 please its giving a lot of players
[20:06:39 INFO]: [MCCore] Enabling MCCore v1.23 [20:06:39 INFO]: Detected Cauldron build MCPC [20:06:39 ERROR]: Error occurred while enabling MCCore v1.23 (Is it up to date?)
java.lang.NumberFormatException: For input string: "MCPC" at java.lang.NumberFormatException.forInputString(Unknown Source) [?:1. 8.0_25]
errors
Much thanks in advance
@Eniripsa96
Please update it to version 1.7.10
We have been needing a way to reset a players class for them as well as remove points.
Maybe a /class reset <ign> for us admins.
@q1w2e3r4t5z6u7i8o9p0
After I upload versions. BukkitDev staff need to go and approve it, which can take a few days. During this time you cannot see the new version.
Is it just me or why cant i see the new update 1.23? Just asking