Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

java.lang.NullPointerException #56

Open
JuicySeals opened this issue Jun 27, 2021 · 0 comments
Open

java.lang.NullPointerException #56

JuicySeals opened this issue Jun 27, 2021 · 0 comments

Comments

@JuicySeals
Copy link

JuicySeals commented Jun 27, 2021

Here is the error:

Error Exception in thread "Client thread" java.lang.ExceptionInInitializerError
at bedless.RPC.start(RPC.java:24)
at net.minecraft.client.Minecraft.(Minecraft.java:384)
at net.minecraft.client.main.Main.main(Main.java:113)
Caused by: java.lang.NullPointerException
at net.arikia.dev.drpc.DiscordRPC.copyFile(DiscordRPC.java:165)
at net.arikia.dev.drpc.DiscordRPC.loadDLL(DiscordRPC.java:153)
at net.arikia.dev.drpc.DiscordRPC.(DiscordRPC.java:21)
... 3 more

Here is the code

package bedless;

import java.util.Date;

import com.ibm.icu.text.SimpleDateFormat;

import net.arikia.dev.drpc.DiscordEventHandlers;
import net.arikia.dev.drpc.DiscordRPC;
import net.arikia.dev.drpc.DiscordRichPresence;
import net.arikia.dev.drpc.DiscordUser;
import net.arikia.dev.drpc.callbacks.ReadyCallback;

public class RPC extends Client {
	
	DiscordEventHandlers handlers = new DiscordEventHandlers.Builder().setReadyEventHandler(new ReadyCallback() {
		@Override
		public void apply(DiscordUser user) {
		      
		  }
	}).build();

	public void start() {
		
		  DiscordRPC.discordInitialize("858420957680762881", handlers, true);

		  DiscordRichPresence rich = new DiscordRichPresence.Builder("Idle").setBigImage("bedlessmain", "bedlessmain").setStartTimestamps(System.currentTimeMillis()).build();			  
		  DiscordRPC.discordUpdatePresence(rich);
	}
	
	public void stop() {
		
		DiscordRPC.discordShutdown();
	}
	
	public void joinServer() {
		DiscordRichPresence rich = new DiscordRichPresence.Builder("Idle").setBigImage("bedlessmain", "bedlessmain").build();
		DiscordRPC.discordUpdatePresence(rich);
	}
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant