Stefatorus
4 years ago
6 changed files with 112 additions and 68 deletions
@ -1,5 +1,29 @@ |
|||
# ______ _____ _____ |
|||
# | ____| __ \ / ____| |
|||
# | |__ | |__) | | ___ _ _ _ __ ___ _ __ ___ |
|||
# | __| | _ /| | / _ \| | | | '_ \ / _ \| '_ \/ __| |
|||
# | |____| | \ \| |___| (_) | |_| | |_) | (_) | | | \__ \ |
|||
# |______|_| \_\\_____\___/ \__,_| .__/ \___/|_| |_|___/ |
|||
# | | |
|||
# |_| |
|||
# Plugin config |
|||
|
|||
# You can use any craftingstore server api key. You need at least silver plan. |
|||
api-key: "CRAFTINGSTORE KEY HERE" |
|||
|
|||
settings: |
|||
# Settings for redeeming credits for store money. |
|||
redeem: |
|||
# What is the minimum credits to redeem in a coupon? |
|||
min: 100 |
|||
# What is the maximum credits to redeem in a coupon? |
|||
max: 50000 |
|||
# Settings for virtual coupon players can use for safe trading, bragging, etc. |
|||
virtual: |
|||
# What is the minimum currency to hold in an item? |
|||
min: 50 |
|||
# What is the maximum currency to hold in an item? |
|||
max: 5000 |
|||
|
|||
# Version is used for future updates |
|||
version: 1 |
@ -1,30 +1,30 @@ |
|||
package com.entryrise.coupons.utils; |
|||
|
|||
import net.md_5.bungee.api.chat.ClickEvent; |
|||
import net.md_5.bungee.api.chat.ComponentBuilder; |
|||
import net.md_5.bungee.api.chat.HoverEvent; |
|||
import net.md_5.bungee.api.chat.TextComponent; |
|||
|
|||
public class Chat { |
|||
|
|||
public static TextComponent genHoverAndSuggestTextComponent(String show, String hover, String click) { |
|||
TextComponent msg = new TextComponent(show); |
|||
msg.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(hover).create())); |
|||
msg.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + click)); |
|||
return msg; |
|||
} |
|||
|
|||
public static TextComponent genHoverAndRunCommandTextComponent(String show, String hover, String click) { |
|||
TextComponent msg = new TextComponent(show); |
|||
msg.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(hover).create())); |
|||
msg.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/" + click)); |
|||
return msg; |
|||
} |
|||
|
|||
public static TextComponent genHoverTextComponent(String show, String hover) { |
|||
TextComponent msg = new TextComponent(show); |
|||
msg.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(hover).create())); |
|||
return msg; |
|||
} |
|||
|
|||
} |
|||
package com.entryrise.coupons.utils; |
|||
|
|||
import net.md_5.bungee.api.chat.ClickEvent; |
|||
import net.md_5.bungee.api.chat.ComponentBuilder; |
|||
import net.md_5.bungee.api.chat.HoverEvent; |
|||
import net.md_5.bungee.api.chat.TextComponent; |
|||
|
|||
public class Chat { |
|||
|
|||
public static TextComponent genHoverAndSuggestTextComponent(String show, String hover, String click) { |
|||
TextComponent msg = new TextComponent(show); |
|||
msg.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(hover).create())); |
|||
msg.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, click)); |
|||
return msg; |
|||
} |
|||
|
|||
public static TextComponent genHoverAndRunCommandTextComponent(String show, String hover, String click) { |
|||
TextComponent msg = new TextComponent(show); |
|||
msg.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(hover).create())); |
|||
msg.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/" + click)); |
|||
return msg; |
|||
} |
|||
|
|||
public static TextComponent genHoverTextComponent(String show, String hover) { |
|||
TextComponent msg = new TextComponent(show); |
|||
msg.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(hover).create())); |
|||
return msg; |
|||
} |
|||
|
|||
} |
|||
|
Loading…
Reference in new issue