TradingCards
TradingCards!
With this plugin, you can collect Trading cards through a variety of different ways. From mob drops to spending time on the server. You can collect them and trade them with your friends! There are card binders that you can store your cards in! The lore of the card binders will automatically update to show you how many cards are in each binder.
UPDATE v1.0.4 has Default Cards!
WARNING
If you are using NoLagg, make sure you either disable item stacking or exclude BOOK and PAPER from being stacked. Otherwise, users will be able to stack multiple cards together to get a whole stack of one card.
GITHUB - Please check out the Github for source code and to track progress on updates!
1.1 Planned
- Crafting perms
- Block card drops
- Card Decks
- Economy support
- Per-Mob drop chances
- If you have more suggestions add them HERE.
Bleeding Edge/Testing
For Bleeding edge builds, contact me on skype: travja4 and make sure that you include TradingCards in your invite request :D
Crafting
This is how to craft a card binder:
Quote from Travja:NOTE: To craft say a Card Binder 2, simply put a Card Binder 1 and a regular book inside a crafting table, this will create a Card Binder 2. For 3, put in a 2 and a book. So on! :D
This is how to craft cards of varying rarities:
Have a feature request?
Add it here: https://github.com/travja/TradingCards/issues
Commands
Commands are as follows:
- /tc help - Displays help page!
- /tc list - Shows a list of available cards
- /tc create <Card Name> <Type> <Series> <Attack> <Defense> <Rarity> [Details] - Creates a new card!
- /tc edit <Card Name> <Property> <Property Value> - Edits the card, properties are Type, Series, ATK, DEF, Rarity, and Details
- /tc delete <Card Name> - Deletes the given card! THIS REMOVES ALL DATA FROM THE CARD AND YOU CAN NO LONGER USE IT!
- /tc rename <Card Name> <New Name> - Renames the new card!
- /tc reload - Reloads the plugin!
- /tc give <Card Name> - Gives you the specified card!
- /tc giveaway - Gives all online players a random card!
Permissions
Permissions are:
tradingcards.*: description: Gives full access to trading cards default: op children: tradingcards.reward: true tradingcards.give: true tradingcards.giveaway: true tradingcards.create: true tradingcards.rename: true tradingcards.delete: true tradingcards.reload: true tradingcards.reward: description: Gives ability to get card every x hours default: true tradingcards.give: description: Gives ability to use /tc give <name> default: op tradingcards.giveaway: description: Grants access to /tc giveaway default: op tradingcards.create: description: Grants access to /tc create default: op tradingcards.rename: description: Grants access to /tc rename and /tc edit default: op tradingcards.delete: description: Grants access to /tc delete default: op tradingcards.reload: #Coming SOON! :D description: Grants access to /tc reload default: op
Configuration
Configuration is as follows:
# default config.yml ################################################# # \/\/\/\/ This is all you should really care about! #Cards: # List: # - Pikachu # - Pika # Rarity: # Common: # - Pikachu # Uncommon: # - Pika # defaults: # After creating cards, this is a list of cards that will automatically show up in a players binder # - Pikachu # - Pika ################################################# Reward: # How often all online players should be given a card (Minutes) Time: 60 # What rarity of card should be given Rarity: Common # When using programmed crafting item, this rarity of card should be crafted # You can add say Apple and a rarity and then can use Apples to craft # You MUST make the first letter capital and the following lowercase Crafting: Leather: Common Iron_ingot: Uncommon Gold_ingot: Rare Diamond: Ultra-Rare # % out of 100 that a card will drop from the mob, and then what type of mob will drop what rarity of card. Drops: Hostile: Chance: 5 BLAZE: Ultra-Rare CAVE_SPIDER: Uncommon CREEPER: Rare GHAST: Ultra-Rare MAGMA_CUBE: Rare SILVERFISH: Uncommon SKELETON: Common SLIME: Uncommon SPIDER: Common WITCH: Ultra-Rare WITHER_SKELETON: Rare ZOMBIE: Common Neutral: Chance: 10 ENDERMAN: Rare PIG_ZOMBIE: Uncommon WOLF: Uncommon Passive: Chance: 3 BAT: Uncommon CHICKEN: Common COW: Common MUSHROOM_COW: Rare PIG: Common SHEEP: Common SQUID: Common VILLAGER: Common Bosses: Chance: 100 ENDER_DRAGON: Ultra-Rare WITHER: Ultra-Rare # DEFAULT CARDS, You can add to this for your own cards or use the in-game commands! Cards: List: - Ponyta - Charmander - Beldum - Pidgey - Regigigas - Gyarados - Seel - Pikachu - Kabutops Rarity: Common: - Ponyta - Charmander - Pidgey - Seel - Pikachu Rare: - Regigigas Ultra-Rare: - Gyarados Uncommon: - Beldum Ponyta: Type: Fire Series: 2007 ATK: '30' DEF: '60' Rarity: Common Details: A Basic Fire Pokemon Charmander: Type: Fire Series: 2008 ATK: '30' DEF: '50' Rarity: Common Details: A Basic Fire Pokemon Beldum: Type: Metal Series: 2007 ATK: '30' DEF: '50' Rarity: Uncommon Details: A Basic Metal Pokemon Pidgey: Type: Normal Series: 2007 ATK: '20' DEF: '50' Rarity: Common Details: A Basic Normal Pokemon Regigigas: Type: Normal Series: 2008 ATK: '60' DEF: '100' Rarity: Rare Details: A Rare Normal Pokemon Gyarados: Type: Water Series: 2006 ATK: '80' DEF: '90' Rarity: Ultra-Rare Details: A Ultra-Rare Water Pokemon, Weak to electricity Seel: Type: Water Series: 1995 ATK: '10' DEF: '60' Rarity: Common Details: A Basic Water Pokemon Pikachu: Type: Electricity Series: 2008 ATK: '40' DEF: '70' Rarity: Common Details: A Basic Electric Pokemon Kabutops: Type: Electricity Series: 2006 ATK: '40' DEF: '100' Rarity: Ultra-Rare Details: Very Rare Electric Pokemon defaults: - Charmander - Pidgey - Seel
If you want more awesome plugins, be sure to hit this button
More information will be added as Development increases! For now, post your suggestions! :D
There should be away to fight with these trading cards. and people can set the arena by doing /tc create arena {name}
/tc spawn1 {name of arena}
/tc spawn2 {name of arena}
/tc set getCards {true or false} <- means if you lose then all cards you lost during battle go to the winner
@Debzy86
thanks for the report! This error shouldn't be crashing the server, but that is one of the things I am yet to find out what is causing it. This log should help me out though.
Hello, I keep getting these errors and it's crashing the server at random:
2013-08-01 21:52:51 [SEVERE] Could not pass event InventoryClickEvent to TradingCards v1.0 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:30) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:478) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:463) at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:1399) at net.minecraft.server.v1_6_R2.Packet102WindowClick.handle(SourceFile:31) at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:230) at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116) at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37) at org.spigotmc.netty.NettyServerConnection.b(NettyServerConnection.java:125) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:592) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:239) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:481) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:413) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582) Caused by: java.lang.NullPointerException at me.Travja.TradingCards.InventoryL.click(InventoryL.java:155) at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 15 more
@travja
Ok sounds good. Looking forward to your work.
@Blacksmithkazuma
You can change their rarity to Discontinued. The plugin allows for any string as the rarity. So basically set it to whatever and just don't set it to drop from anything.
@islandmat
Could be like 2 weeks, I've had camp this week and have had no time to work on this at all... But I'll get working as efficiently as I can when I have the opportunity
@Blacksmithkazuma
Does it happen whenever you open/close your inventory or is it not consistent with that?
You need a ticket link - get this stack error quite a bit in my logs, have yet to find out exactly what is causing it. Hope you might be able to figure it out.
Error - http://pastie.org/8190402
Out of curiosity do you have an approximate release date for this. Like days, weeks etc. No pressure or anything as I sill have a lot of cards to make. I don't want to put it out on my server till a form of decks are out.
Possibly option to add in as I am still playing around with creating cards. a Discontinued rarity. Let me try to explain this one. Some players already have cards I have deemed as BETA Series. Now once I get a better grasp on what kind of cards I will be introducing to my server. I would like to discontinue the beta series without overwriting their info with new series or allowing drops from that series. If that makes sense. So was just wondering if that is possible and I hope I haven't confused anyone.
Thanks
@travja
Maybe it's just an odd installation glitch, I'll reinstall it and see if it still happens.
@islandmat
Thanks for the input, when I get the time I'll probably add decks.
@MCrekna1
I'll see what I can do about multiple lines of description, and I'll add some comments in the config or a readme about how to make cards from the config.
@scrblue
I haven't been able to reproduce this.
A slight bug that I noticed, when you open a binder and press one of the numbers for the hot bar, it will transfer the item in even if it isn't a card, then it won't allow you to take it out if it isn't.
A server i play on recently got this and i loved it. So i got it for my own server and I'm wondering if you could make it so you could; 1) make it so you can add more cards in through the config. 2) make additional lines on the details. Maybe something like optional lines called Details2, Details3, and so on. On some cards i have i would like to have a long description and i would really appreciate this.
I would also like to put out there that it would be nice to select a group of cards that can be randomized in a deck, so players could get a fire deck or a swamp deck at random sort of thing. I plan to put a dispenser and use a plugin where a user can only click a button once and I will throw random decks in there. But if this is not possible it is not a big deal, but it was worth suggesting.
@Blacksmithkazuma
The "Inifinity X" text in the item description means that it has level 10 infinity enchantment. This is used to give the cards the purple glow effect.
@travja
Wow cool, this is a great plugin just for the fact that it is well supported. Keep up the epic work.
OK wanted to try this plugin as a player of mine recommended but I have one problem. I run a Towny Server and well /tc is the toggle for Towny Chat and Towny overrides this.
Edit - I did find out that you can use /tradingcards to use the commands. So that is good. So for anyone else you can not use /tc if you are using towny.
Also last question what is with the infinity x grey text on the cards and binder, is that the "manufacturer" name? lol
@ABCRic
Will fix it as soon as I can.
@islandmat
I can add decks :) might be some time before I do but I can add them
@ABCRic
Glad someone could figure it out. I'm not well versed with Java unfortunately. :(
Hi, Love this plugin. I was wondering if it would be possible for you to make "Decks" so that every person gets a starter deck when they enter the server, and then they can purchase booster packs with economy kinda thing. Or even the ability for the admin to give himself pre randomized decks each containing the amount of rares, uncommons, and commons you specify in the config, and the admin can give one to each of his users some how. BASICALLY i'm asking if decks are possible?
Also I was wondering if it was possible to add cards in the config instead of doing it via command, because adding 500 cards isn't going to be easy ingame.
Thanks for your time.
@travja
I am also getting Gametista's error. I did not change any configs. It only happens to my players, not me as admin, and I can't reproduce it effectively. They do not have any of the permissions or any cards.
The log does report that the error is happening at me.Travja.TradingCards.InventoryL.click(InventoryL.java:155).
Edit: After some decompiling and debugging I found out that the NullPointerException occurs on item.equals() on InventoryL.java:155, when a click occurs outside the inventory window region while it is open. Does not occur in the crafting table interface. This means that event.getCurrentItem() is returning null. A null check on item before calling item.equals should do the trick.