Advertisement
Gamebuster

ConsoleUser.class

Oct 18th, 2020
2,538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.27 KB | None | 0 0
  1. package com.gamebuster19901.excite.bot.user;
  2.  
  3. import java.time.Duration;
  4. import java.util.Set;
  5.  
  6. import com.gamebuster19901.excite.Player;
  7. import com.gamebuster19901.excite.bot.audit.ban.DiscordBan;
  8. import com.gamebuster19901.excite.bot.command.MessageContext;
  9.  
  10. import net.dv8tion.jda.api.entities.User;
  11.  
  12. public class ConsoleUser extends UnloadedDiscordUser{
  13.  
  14.     static {
  15.         System.out.println("BEFORE");
  16.     }
  17.     public static final ConsoleUser INSTANCE = new ConsoleUser();
  18.     static {
  19.         System.out.println("AFTER");
  20.     }
  21.    
  22.     private final String name = "CONSOLE";
  23.    
  24.     public ConsoleUser() {
  25.         super(-1);
  26.         System.out.println("CONSTRUCTOR");
  27.     }
  28.    
  29.     @Override
  30.     public User getJDAUser() {
  31.         throw new AssertionError();
  32.     }
  33.    
  34.     @Override
  35.     @SuppressWarnings("rawtypes")
  36.     public DiscordBan ban(MessageContext context, Duration duration, String reason) {
  37.         throw new AssertionError();
  38.     }
  39.    
  40.     @Override
  41.     public String toCSV() {
  42.         throw new AssertionError();
  43.     }
  44.    
  45.     @Override
  46.     public Set<Player> getProfiles() {
  47.         throw new AssertionError();
  48.     }
  49.    
  50.     @Override
  51.     public boolean isBanned() {
  52.         return false;
  53.     }
  54.    
  55.     @Override
  56.     public int getUnpardonedBanCount() {
  57.         throw new AssertionError();
  58.     }
  59.    
  60.     @Override
  61.     public int getTotalBanCount() {
  62.         throw new AssertionError();
  63.     }
  64.    
  65.     @Override
  66.     public void setNotifyThreshold(int threshold) {
  67.         throw new AssertionError();
  68.     }
  69.    
  70.     @Override
  71.     public void setNotifyFrequency(Duration frequency) {
  72.         throw new AssertionError();
  73.     }
  74.    
  75.     @Override
  76.     public void setNotifyContinuously(boolean continuous) {
  77.         throw new AssertionError();
  78.     }
  79.    
  80.     @Override
  81.     public String requestRegistration(Player desiredProfile) {
  82.         throw new AssertionError();
  83.     }
  84.    
  85.     @Override
  86.     public boolean requestingRegistration() {
  87.         throw new AssertionError();
  88.     }
  89.    
  90.     @SuppressWarnings("rawtypes")
  91.     public void sentCommand(MessageContext context) {}
  92.    
  93.     @Override
  94.     public void sendMessage(String message) {
  95.         System.out.println(message);
  96.     }
  97.    
  98.     @SuppressWarnings("rawtypes")
  99.     @Override
  100.     public void sendMessage(MessageContext context, String message) {
  101.         System.out.println(message);
  102.     }
  103.    
  104.     @Override
  105.     public String toString() {
  106.         return name + "(" + getId() + ")";
  107.     }
  108.    
  109.     @Override
  110.     public String toDetailedString() {
  111.         return toString();
  112.     }
  113.  
  114. }
  115.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement