|
1 | | -///* |
2 | | -// * This file is a part of project QuickShop, the name is QuickChat.java |
3 | | -// * Copyright (C) PotatoCraft Studio and contributors |
4 | | -// * |
5 | | -// * This program is free software: you can redistribute it and/or modify it |
6 | | -// * under the terms of the GNU General Public License as published by the |
7 | | -// * Free Software Foundation, either version 3 of the License, or |
8 | | -// * (at your option) any later version. |
9 | | -// * |
10 | | -// * This program is distributed in the hope that it will be useful, but WITHOUT |
11 | | -// * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
12 | | -// * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
13 | | -// * for more details. |
14 | | -// * |
15 | | -// * You should have received a copy of the GNU General Public License |
16 | | -// * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | | -// * |
18 | | -// */ |
19 | | -// |
20 | | -//package org.maxgamer.quickshop.chat; |
21 | | -// |
22 | | -//import org.bukkit.command.CommandSender; |
23 | | -//import org.bukkit.entity.Player; |
24 | | -//import org.bukkit.inventory.ItemStack; |
25 | | -//import org.jetbrains.annotations.NotNull; |
26 | | -//import org.jetbrains.annotations.Nullable; |
27 | | -//import org.maxgamer.quickshop.shop.Shop; |
28 | | -// |
29 | | -///** |
30 | | -// * QuickChat is a system to allow us to processing plain text and also MineDown |
31 | | -// */ |
32 | | -//public interface QuickChat { |
33 | | -// /** |
34 | | -// * Send plain text to specified receiver |
35 | | -// * |
36 | | -// * @param receiver The receiver will receive this message |
37 | | -// * @param message The plain text to be sent |
38 | | -// */ |
39 | | -// void send(@NotNull CommandSender receiver, @Nullable String message); |
40 | | -// |
41 | | -// /** |
42 | | -// * Send QuickComponent to specified receiver |
43 | | -// * |
44 | | -// * @param receiver The receiver will receive this message |
45 | | -// * @param component The plain text to be sent |
46 | | -// */ |
47 | | -// void send(@NotNull CommandSender receiver, @Nullable QuickComponent component); |
48 | | -// |
49 | | -// /** |
50 | | -// * Send chat with hover-item to specified receiver |
51 | | -// * |
52 | | -// * @param player The PLAYER will receive this message |
53 | | -// * @param text The text will sent |
54 | | -// * @param itemStack The ItemStack will append to text in message |
55 | | -// */ |
56 | | -// void sendItemHologramChat( |
57 | | -// @NotNull Player player, |
58 | | -// @NotNull String text, |
59 | | -// @NotNull ItemStack itemStack); |
60 | | -// |
61 | | -// @NotNull QuickComponent getItemHologramChat(@NotNull Shop shop, @NotNull ItemStack itemStack, @NotNull Player player, @NotNull String message); |
62 | | -// |
63 | | -// /** |
64 | | -// * Create chat with hover-item to specified receiver |
65 | | -// * |
66 | | -// * @param player The PLAYER will receive this message |
67 | | -// * @param text The text will sent |
68 | | -// * @param itemStack The ItemStack will append to text in message |
69 | | -// * @return The QuickComponent created by this method |
70 | | -// */ |
71 | | -// @NotNull QuickComponent getItemTextComponent(@NotNull Player player, @NotNull ItemStack itemStack, @NotNull String text); |
72 | | -// |
73 | | -// /** |
74 | | -// * Send click-run-command chat to specified receiver |
75 | | -// * |
76 | | -// * @param receiver The PLAYER will receive this message |
77 | | -// * @param message The text will sent |
78 | | -// * @param hoverText The will show when hover on chat |
79 | | -// * @param command The command when click to be run |
80 | | -// */ |
81 | | -// void sendExecutableChat(@NotNull CommandSender receiver, @NotNull String message, @NotNull String hoverText, @NotNull String command); |
82 | | -// |
83 | | -// /** |
84 | | -// * Send click-suggest-command chat to specified receiver |
85 | | -// * |
86 | | -// * @param receiver The PLAYER will receive this message |
87 | | -// * @param message The text will sent |
88 | | -// * @param command The command when click to be suggest |
89 | | -// */ |
90 | | -// void sendSuggestedChat(@NotNull CommandSender receiver, @NotNull String message, @NotNull String hoverText, @NotNull String command); |
91 | | -// |
92 | | -//} |
| 1 | +/* |
| 2 | + * This file is a part of project QuickShop, the name is QuickChat.java |
| 3 | + * Copyright (C) PotatoCraft Studio and contributors |
| 4 | + * |
| 5 | + * This program is free software: you can redistribute it and/or modify it |
| 6 | + * under the terms of the GNU General Public License as published by the |
| 7 | + * Free Software Foundation, either version 3 of the License, or |
| 8 | + * (at your option) any later version. |
| 9 | + * |
| 10 | + * This program is distributed in the hope that it will be useful, but WITHOUT |
| 11 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 12 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 13 | + * for more details. |
| 14 | + * |
| 15 | + * You should have received a copy of the GNU General Public License |
| 16 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | + * |
| 18 | + */ |
| 19 | + |
| 20 | +package org.maxgamer.quickshop.chat; |
| 21 | + |
| 22 | +import org.bukkit.command.CommandSender; |
| 23 | +import org.bukkit.entity.Player; |
| 24 | +import org.bukkit.inventory.ItemStack; |
| 25 | +import org.jetbrains.annotations.NotNull; |
| 26 | +import org.jetbrains.annotations.Nullable; |
| 27 | +import org.maxgamer.quickshop.shop.Shop; |
| 28 | + |
| 29 | +/** |
| 30 | + * QuickChat is a system to allow us to processing plain text and also MineDown |
| 31 | + */ |
| 32 | +public interface QuickChat { |
| 33 | + /** |
| 34 | + * Send plain text to specified receiver |
| 35 | + * |
| 36 | + * @param receiver The receiver will receive this message |
| 37 | + * @param message The plain text to be sent |
| 38 | + */ |
| 39 | + void send(@NotNull CommandSender receiver, @Nullable String message); |
| 40 | + |
| 41 | + /** |
| 42 | + * Send QuickComponent to specified receiver |
| 43 | + * |
| 44 | + * @param receiver The receiver will receive this message |
| 45 | + * @param component The plain text to be sent |
| 46 | + */ |
| 47 | + void send(@NotNull CommandSender receiver, @Nullable QuickComponent component); |
| 48 | + |
| 49 | + /** |
| 50 | + * Send chat with hover-item to specified receiver |
| 51 | + * |
| 52 | + * @param player The PLAYER will receive this message |
| 53 | + * @param text The text will sent |
| 54 | + * @param itemStack The ItemStack will append to text in message |
| 55 | + */ |
| 56 | + void sendItemHologramChat( |
| 57 | + @NotNull Player player, |
| 58 | + @NotNull String text, |
| 59 | + @NotNull ItemStack itemStack); |
| 60 | + |
| 61 | + @NotNull QuickComponent getItemHologramChat(@NotNull Shop shop, @NotNull ItemStack itemStack, @NotNull Player player, @NotNull String message); |
| 62 | + |
| 63 | + /** |
| 64 | + * Create chat with hover-item to specified receiver |
| 65 | + * |
| 66 | + * @param player The PLAYER will receive this message |
| 67 | + * @param text The text will sent |
| 68 | + * @param itemStack The ItemStack will append to text in message |
| 69 | + * @return The QuickComponent created by this method |
| 70 | + */ |
| 71 | + @NotNull QuickComponent getItemTextComponent(@NotNull Player player, @NotNull ItemStack itemStack, @NotNull String text); |
| 72 | + |
| 73 | + /** |
| 74 | + * Send click-run-command chat to specified receiver |
| 75 | + * |
| 76 | + * @param receiver The PLAYER will receive this message |
| 77 | + * @param message The text will sent |
| 78 | + * @param hoverText The will show when hover on chat |
| 79 | + * @param command The command when click to be run |
| 80 | + */ |
| 81 | + void sendExecutableChat(@NotNull CommandSender receiver, @NotNull String message, @NotNull String hoverText, @NotNull String command); |
| 82 | + |
| 83 | + /** |
| 84 | + * Send click-suggest-command chat to specified receiver |
| 85 | + * |
| 86 | + * @param receiver The PLAYER will receive this message |
| 87 | + * @param message The text will sent |
| 88 | + * @param command The command when click to be suggest |
| 89 | + */ |
| 90 | + void sendSuggestedChat(@NotNull CommandSender receiver, @NotNull String message, @NotNull String hoverText, @NotNull String command); |
| 91 | + |
| 92 | +} |
0 commit comments