ItemFlip
For questions, reports bugs ask on our discord
I'm open for any suggestions
Please remember that Gradient & #HEX colors works only on 1.16+
WORKS ON JAVA11
Highly customizable ✅
CustomModelData & Base64 in GUI ✅
RGB Color support ✅
<#00FFFF>Solid
<#00FFFF>Gradient</#935353>
<RAINBOW1>Rainbow</RAINBOW>
<RAINBOW100>Rainbow</RAINBOW>
Can be disabled in specific worlds
Summary
This plugin allows your players to gamble with their items.
Players put items into defined slots, then both players need to confirm with accept button. After 3 seconds countdown flipping will start
Installation
Simply drag&drop the plugin file into plugins folder on your server and restart your server.
Permissions
itemflip.reload - Allows to use /itemflip reload command
itemflip.use - Allows to use ItemFlip command
itemflip.creative_bypass - Allows to use ItemFlip in Creative Gamemode
itemflip.world_bypass - Allows to use ItemFlip in disabled worlds
Commands
/itemflip <player> - Sends game request to the selected player
/itemflip accept <player> - Accepts game request. Can be clicked in the chat too
/itemflip decline <player> - Declines game request. Can be clicked in the chat too
Images
Config
# ItemFlip
# Author: DexterSK
# Copyright DexterSK 2023-2024. All rights reserved.
#
Logger:
Enabled: true
DateFormat: "dd.MM.yyyy HH:mm:ss"
FileName: "logger.log"
Hooks:
SkinsRestorer: true
Storage:
# Types available:
# - SQLITE
# - MYSQL
Type: SQLITE
MySQL:
# The ip of your database server
Host: localhost
# The port of your database, usually 3306;
Port: 3306
# The name of your database user
User: root
# The password of your database user
# WARNING: Please make sure only people who are allowed to know the password can access this file
Pass: ""
# The name of the database which ItemFlip should create its tables in
# Note: ItemFlip won't create this database, it must be pre-created using eg. phpMyAdmin
Data: "database_name"
# Prefix of tables
TablePrefix: "itemflip_"
# Use SSL connection?
UseSSL: false
# You can make ItemFlip ignore the two options above and use a direct URI to connect instead
# Format for MySQL servers: jdbc:mysql://<yourIp>:<yourPort>/<yourDatabase>?useSSL=false
CustomURI: ""
Settings:
Time:
LanguageTag: US
# To find out which time zones are available check out https://garygregory.wordpress.com/2013/06/18/what-are-the-java-timezone-ids/
TimeZone: 'SYSTEM_DEFAULT'
# To find out which characters do what check out https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
Format: dd.MM.yyyy HH:mm:ss
# messages prefix
Prefix: "&7[<#882285>ItemFlip</#EE6F20>&7]"
# update check on startup
CheckForUpdate: true
# If true gui will show up for both players, otherwise only for who clicked
OpenGuiForBoth: true
# If true gui will open again if player closes GUI
OpenGuiOnClose: true
Broadcast:
# Should we broadcast if player beats other player?
BroadcastWinnings: true
# Allow invitation expire ?
InviteExpire: true
# How long does it take to expire a itemflip invite? in seconds
InviteExpireTime: 30
# When enabled, instead of flipping heads we will flip p1 and p2 items
SpinItemsInsteadHeads: false
# Disable itemflip in specific worlds
DisabledWorlds:
- ''
# Disable itemflip in specific gamemodes
DisabledInGamemodes:
- ADVENTURE
- CREATIVE
- SPECTATOR
# List of material that can't be used in ItemFlip game
BlackListedMaterials: []
CreditSystem:
Enable: false
CommandCost: 10
Voucher:
# Enable / Disable the system
Enable: true
# Amount of credits user will receive when interacting with voucher
Amount: 1
#Item settings of voucher
Item:
# Material of voucher
Material: "PISTON"
DisplayName: "§7ItemFlip Voucher"
Lore:
- "&7Voucher for ItemFlip"
- "&7Amount: &b%AMOUNT% &7 Credits"
Base64: 0
CustomModelData: 0
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
TextComponent:
First: "§7Click to"
Second: " §7[§a✔§7]"
Third: "&a&lClick to accept ItemFlip"
Four: " §7[§c❌§7]"
Five: "&c&lClick to decline ItemFlip"
History:
LoreWin:
- ""
- "&c%LOSER%"
- "&a%WINNER%"
- ""
- "&a&lWON"
LoreLost:
- ""
- "&c%LOSER%"
- "&a%WINNER%"
- ""
- "&c&lLOST"
GUI:
Rows: 6
Title: "§lITEM FLIP"
ClickSound: "BLOCK_COMPARATOR_CLICK, 1f, 1f"
DeleteItemSound: "ENTITY_VILLAGER_NO, 1f, 1f"
FailSound: "ENTITY_VILLAGER_NO, 1f, 1f"
LeaveGameSound: "BLOCK_ANVIL_LAND, 1f, 1f"
InviteGameSound: "ENTITY_EXPERIENCE_ORB_PICKUP, 1f, 1f"
AcceptGameSound: "ENTITY_PLAYER_LEVELUP, 1f, 1f"
DeclineGameSound: "BLOCK_ANVIL_LAND, 1f, 1f"
# You can add more items here
FillerItems:
Border:
Slots: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 17, 18, 22, 26, 27, 31, 35, 36, 40, 44, 46, 47, 48, 49, 50, 51, 52]
Material: "GRAY_STAINED_GLASS_PANE"
DisplayName: "§7"
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
# Items below here are fixed and ID should not be removed/changed.
P1ItemBoard:
Material: "AIR"
DisplayName: "§7Empty Field"
Slots: [10, 11, 12, 19, 20, 21, 28, 29, 30, 37, 38, 39]
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
#Lore:
#- ""
P2ItemBoard:
Material: "AIR"
DisplayName: "§7Empty Field"
Slots: [14, 15, 16, 23, 24, 25, 32, 33, 34, 41, 42, 43]
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
#Lore:
#- ""
P1AcceptButton:
Material: "LIME_STAINED_GLASS_PANE"
DisplayName: "§aAccept"
Slot: 45
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
Lore:
- ""
- "§7Click to accept items!"
P1DeclineButton:
Material: "RED_STAINED_GLASS_PANE"
DisplayName: "§cDecline"
Slot: 45
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
Lore:
- ""
- "§7Click to decline items!"
P2AcceptButton:
Material: "LIME_STAINED_GLASS_PANE"
DisplayName: "§aAccept"
Slot: 53
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
Lore:
- ""
- "§7Click to accept items!"
P2DeclineButton:
Material: "RED_STAINED_GLASS_PANE"
DisplayName: "§cDecline"
Slot: 53
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
Lore:
- ""
- "§7Click to decline items!"
P1HeadItem:
Slot: 0
Material: "PLAYER_HEAD"
DisplayName: "§f§l%NAME%"
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
P2HeadItem:
Slot: 8
Material: "PLAYER_HEAD"
DisplayName: "§f§l%NAME%"
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
AnimationGUI:
Rows: 3
Title: "§lWINNER IS.."
LoseSound: "ENTITY_VILLAGER_NO, 1f, 1f"
# Animation sound used in choosing animation
AnimationSound: "BLOCK_COMPARATOR_CLICK, 1f, 1f"
# Animation speed in ticks
AnimationSpeed: 6
# Animation lenght in ticks
# Not used when using custom animations
AnimationLenght: 12
# NEW Animation System!
# Set empty if you wish to use Spinning filler items below
# Set to a animation id in the animation.yml file if you wish to use anims
AnimationID: 'animation'
# Animation to play when winner has been choosen / animation above ends
AnimationChoosenID: 'animation_choosen'
# Sound to play when winner has been choosen
AnimationChoosenSound: "ENTITY_EXPERIENCE_ORB_PICKUP, 1f, 1f"
# Items below here are fixed and ID should not be removed/changed.
FillerItems:
Spin1:
Slots: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
Material: "GRAY_STAINED_GLASS_PANE"
DisplayName: "§7"
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
Spin2:
Slots: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
Material: "YELLOW_STAINED_GLASS_PANE"
DisplayName: "§7"
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
Final:
Slots: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
Material: "LIGHT_BLUE_STAINED_GLASS_PANE"
DisplayName: "§7"
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
GameItem:
Slot: 13
Material: "PLAYER_HEAD"
DisplayName: "§f§l%NAME%"
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
HistoryServerGUI:
# Available placeholders: also papi
# "%PLAYER1%"
# "%PLAYER2%"
# "%WINNER%"
# "%LOSER%"
# "%TIME%"
# "%UUID%"
Title: "Game %PLAYER1% VS %PLAYER2%"
Rows: 6
ClickSound: BLOCK_COMPARATOR_CLICK, 1f, 1f
# You can add more items here
FillerItems:
Filler1:
Slots: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 17, 18, 22, 26, 27, 31, 35, 36, 40, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53]
Material: "GRAY_STAINED_GLASS_PANE"
DisplayName: "§7"
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
# Items below here are fixed and ID should not be removed/changed.
P1ItemBoard:
Material: "AIR"
DisplayName: ""
Slots: [10, 11, 12, 19, 20, 21, 28, 29, 30, 37, 38, 39]
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
#Lore:
#- ""
# Slot for side items for first & second player
HeadsTailsSlots: [47, 51]
Heads:
Material: EMERALD
DisplayName: §bHEADS
Lore:
- '&7Player1 %PLAYER1%'
- '&7Player2 %PLAYER2%'
- '&7Winner %WINNER%'
- '&7Loser %LOSER%'
- '&7Time %TIME%'
- '&7Side %SIDE%'
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
Tails:
Material: DIAMOND
DisplayName: §bTAILS
Lore:
- '&7Player1 %PLAYER1%'
- '&7Player2 %PLAYER2%'
- '&7Winner %WINNER%'
- '&7Loser %LOSER%'
- '&7Time %TIME%'
- '&7Side %SIDE%'
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
P2ItemBoard:
Material: "AIR"
DisplayName: ""
Slots: [14, 15, 16, 23, 24, 25, 32, 33, 34, 41, 42, 43]
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
#Lore:
#- ""
P1HeadItem:
Slot: 0
Material: PLAYER_HEAD
DisplayName: §f§l%NAME%
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
P2HeadItem:
Slot: 8
Material: PLAYER_HEAD
DisplayName: §f§l%NAME%
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
Close:
Slot: 49
Material: BARRIER
DisplayName: §cClose
Lore:
- '&7Close GUI'
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
Back:
Slot: 48
Material: ARROW
DisplayName: §cGo back
Lore:
- '&7Go to previous menu'
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
HistoryGUI:
Rows: 3
Title: '§lSERVER GAMES #%PAGE%'
OtherTitle: "§lGAMES OF %PLAYER%"
ClickSound: "BLOCK_COMPARATOR_CLICK, 1f, 1f"
# You can add more items here
FillerItems:
Filler1:
Slots: [18, 19, 20, 21, 22, 23, 24, 25, 26]
Material: "GRAY_STAINED_GLASS_PANE"
DisplayName: "§7"
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
# Items below here are fixed and ID should not be removed/changed.
# Will add list of items to the lore of game
ItemsLore:
Enable: true
MaxItems: 5
MoreString: "&f&o... and more"
Lore:
- "&f&lItems:"
Item:
# Material used by side(heads/tails)
MaterialHeads: EMERALD
# Material used by side(heads/tails)
MaterialTails: DIAMOND
DisplayName: §b%PLAYER1% §7VS §b%PLAYER2%
Lore:
- '&7Player1 %PLAYER1%'
- '&7Player2 %PLAYER2%'
- '&7Winner %WINNER%'
- '&7Loser %LOSER%'
- '&7Time %TIME%'
- '&7Side %SIDE%'
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
PrevPage:
Slot: 21
Material: ARROW
DisplayName: §7Previous
Lore:
- '&7Go to previous page'
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
Close:
Slot: 22
Material: BARRIER
DisplayName: §cClose
Lore:
- '&7Close GUI'
Base64: 0
CustomModelData: 0
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
NextPage:
Slot: 23
Material: ARROW
DisplayName: §7Next page
Lore:
- '&7Go to next page'
Base64: 0
CustomModelData: 10952
Amount: 1
Glow: false
ItemFlags:
- HIDE_ENCHANTS
- HIDE_ATTRIBUTES
# messages
Messages:
Usage: "%PREFIX% §b➥ §7Usage: /itemflip <player>"
ReloadSuccess: "%PREFIX% §b➥ §7Reloaded sucessfully!"
ReloadError: "%PREFIX% §c➥ §7Error occured!"
NotFound: "%PREFIX% §c➥ §7Player %PLAYER% is not online!"
NotEnoughPerm: "%PREFIX% §c➥ §7You dont have enough perms!"
Invited: "%PREFIX% §c➥ §7You have invited %PLAYER% to the ItemFlip game!"
InvitedYou: "%PREFIX% §c➥ §7%PLAYER% has invited you to the ItemFlip game!"
AlreadyInvited: "%PREFIX% §c➥ §7You have already invited %PLAYER%!"
GameAccepted: "%PREFIX% §b➥ §7%PLAYER% accepted your game!"
GameDeclined: "%PREFIX% §b➥ §7%PLAYER% declined your game!"
GameLeaved: "%PREFIX% §b➥ §7%PLAYER% leaved game!"
FullInventory: "%PREFIX% §c➥ §7Please make some space in inventory!"
FullInventoryDetails: "%PREFIX% §c➥ §7Not enough space in inventory. Needed: %NEEDED% you have %FREE% free slots!"
DisabledGamemode: "%PREFIX% §c➥ §7You cant use this in Creative Gamemode!"
DisabledWorld: "%PREFIX% §c➥ §7You cant use this in this world!"
BlackListedMaterial: "%PREFIX% §c➥ §7You cant use this type of material: %MATERIAL%!"
WinBroadcast: "%PREFIX% §b➥ §a%WINNER% §7defeated §c%LOSER% §7in §b%ITEMS% §7ItemFlip game"
InviteExpired1: "%PREFIX% §b➥ §a%PLAYER% §7didn't accept game after %TIME% seconds. Cancelling."
InviteExpired2: "%PREFIX% §b➥ §7You didn't accept game in %TIME% seconds. Cancelling."
UsageToggle: "%PREFIX% §b➥ §7Usage: §b/itemflip toggle broadcast"
ToggleON: "%PREFIX% §b➥ §7ItemFlip broadcast are now §a§lENABLED"
ToggleOFF: "%PREFIX% §b➥ §7ItemFlip broadcast are now §c§lDISABLED"
NotEnoughCredits: "%PREFIX% §b➥ §7You don't have enough credits to use command"
NotANumber: "%PREFIX% §b➥ §7%NUMBER% should be a numeric value"
NotAValidNumber: "%PREFIX% §b➥ §7%NUMBER% should be a number bigger than 0"
CantRemoveCredits: "%PREFIX% §b➥ §7You can't remove %NUMBER% credits, because %PLAYER% has only %CREDITS% credits"
YourCredits: "%PREFIX% §b➥ §7You have %CREDITS% credits"
OtherCredits: "%PREFIX% §b➥ §7%PLAYER% have %CREDITS% credits"
CreditsSet: "%PREFIX% §b➥ §7You have set credits of player %PLAYER% to %CREDITS% credits"
CreditsAdded: "%PREFIX% §b➥ §7You have added %CREDITS% credits to player %PLAYER%"
CreditsRemoved: "%PREFIX% §b➥ §7You have removed %CREDITS% credits from player %PLAYER%"
VoucherUsed: "%PREFIX% §b➥ §7You have used a Voucher(%AMOUNT%)"
VoucherGave: "%PREFIX% §b➥ §7You gave a Voucher(%AMOUNT%) to player %PLAYER%"
VoucherReceived: "%PREFIX% §b➥ §7You have received Voucher(%AMOUNT%)"
SummaryLoss:
- ""
- "<center>§b§lGame summary</center>"
- "<center>§cYou lost, better luck next time.</center>"
- ""
- "<center>§7Winner: §a%WINNER%</center>"
- "<center>§7Loser: §c%LOSER%</center>"
- ""
SummaryWin:
- ""
- "<center>§b§lGame summary</center>"
- "<center>§a§lWINNER</center>"
- ""
- "<center>§7Winner: §a%WINNER%</center>"
- "<center>§7Loser: §c%LOSER%</center>"
- ""
HelpMessage:
- ""
- "§7------------ ItemFlip Help ------------"
- "§b/itemflip help §7- Displays this message"
- "§b/itemflip invite <player> §7- Create a ItemFlip game"
- "§b/itemflip accept <player> §7- Accept a ItemFlip game"
- "§b/itemflip decline <player> §7- Decline a ItemFlip game"
- "§7------------ ItemFlip Help ------------"
- ""
Terms of Service
- You may not redistribute plugin, in any shape or form neither it's code or parts of it.
- You may ask me for support.
- No refunds, as one does not have a right to get a refund for such digital item, because you have been gained access to it instantly and may have used it.