Discord Binding
This commit is contained in:
parent
402b94a797
commit
2b2683b22b
2
TODO.md
2
TODO.md
@ -4,9 +4,9 @@
|
|||||||
- [-] Make Discord Webhoook for item changes
|
- [-] Make Discord Webhoook for item changes
|
||||||
- [x] deathBan reset
|
- [x] deathBan reset
|
||||||
- [x] voids exchanges
|
- [x] voids exchanges
|
||||||
|
- [x] /void give négatives values
|
||||||
- [ ] chest name
|
- [ ] chest name
|
||||||
- [ ] /void manage bring
|
- [ ] /void manage bring
|
||||||
- [ ] Dupe bug (respawn) -> Gamerule
|
- [ ] Dupe bug (respawn) -> Gamerule
|
||||||
- [x] /void give négatives values
|
|
||||||
- [ ] /void give afficher title
|
- [ ] /void give afficher title
|
||||||
- subtitle + chat
|
- subtitle + chat
|
||||||
|
@ -15,7 +15,6 @@ import org.bukkit.entity.Player;
|
|||||||
|
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import ovh.herisson.thevoidroad.DatabaseManager;
|
import ovh.herisson.thevoidroad.DatabaseManager;
|
||||||
import ovh.herisson.thevoidroad.DiscordWebhook;
|
|
||||||
import ovh.herisson.thevoidroad.TheVoidRoad;
|
import ovh.herisson.thevoidroad.TheVoidRoad;
|
||||||
import ovh.herisson.thevoidroad.Voids;
|
import ovh.herisson.thevoidroad.Voids;
|
||||||
import ovh.herisson.thevoidroad.Entity.Merchand;
|
import ovh.herisson.thevoidroad.Entity.Merchand;
|
||||||
@ -69,19 +68,6 @@ public class VoidCommands implements CommandExecutor, TabCompleter{
|
|||||||
return true;
|
return true;
|
||||||
case "skip":
|
case "skip":
|
||||||
//TODO(Merchand): Skip trade
|
//TODO(Merchand): Skip trade
|
||||||
break;
|
|
||||||
case "discord":
|
|
||||||
String link = DatabaseManager.getInstance().getConfig("discord-wh");
|
|
||||||
if(!link.equals("")){
|
|
||||||
DiscordWebhook discord = new DiscordWebhook(link);
|
|
||||||
discord.setContent("Item mis en vente pendant une heure: " + Merchand.current.x + " au prix de " + Merchand.current.y + TheVoidRoad.CoinGlyph);
|
|
||||||
try {
|
|
||||||
discord.execute();
|
|
||||||
} catch(Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "goto":
|
case "goto":
|
||||||
if(sender instanceof Player ply && m.getLocation() != null){
|
if(sender instanceof Player ply && m.getLocation() != null){
|
||||||
|
@ -123,7 +123,13 @@ public class Merchand implements Listener{
|
|||||||
String link = DatabaseManager.getInstance().getConfig("discord-wh");
|
String link = DatabaseManager.getInstance().getConfig("discord-wh");
|
||||||
if(!link.equals("")){
|
if(!link.equals("")){
|
||||||
DiscordWebhook discord = new DiscordWebhook(link);
|
DiscordWebhook discord = new DiscordWebhook(link);
|
||||||
discord.setContent("Item mis en vente pendant une heure: " + current.x + " au prix de " + current.y + TheVoidRoad.CoinGlyph);
|
discord.setUsername(m.getName());
|
||||||
|
discord.setContent("Salut, Je vend actuellement `" + current.x + "` au prix de " + current.y + TheVoidRoad.CoinGlyph);
|
||||||
|
try {
|
||||||
|
discord.execute();
|
||||||
|
} catch(Exception ex){
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
next = genTrade(e.unixhour + 1);
|
next = genTrade(e.unixhour + 1);
|
||||||
regenerate();
|
regenerate();
|
||||||
|
Loading…
Reference in New Issue
Block a user