PEX Gruppen in Chat-Plugin aufrufen?

Da sich das Problem mit der plugin.yml nun gelöst wurde habe ich mit den Chat-Plugin angefangen. In diesem möchte ich nun abfragen ob der User die Permission xy hat und ihm je nachdem einen Prefix geben. Also ungefähr so "[User] abc >> /Nachricht/"

Hier der Code:

Main:

package de.Tini.Chat;

import org.bukkit.Bukkit;

import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin{

@Override

public void onEnable() {

Bukkit.getPluginManager().registerEvents(new Chat(), this);

}

}

Chat:

package de.Tini.Chat;

import org.bukkit.event.EventHandler;

import org.bukkit.event.Listener;

import org.bukkit.event.player.AsyncPlayerChatEvent;

public class Chat implements Listener {

@EventHandler

public void onEnable(AsyncPlayerChatEvent a) {

if(a.getPlayer().hasPermission("owner")) {

a.setFormat("§4§l[Owner] "+a.getPlayer().getName()+ "§a§l >> " + a.getMessage());

}

else if(a.getPlayer().hasPermission("admin")) {

a.setFormat("§c§l[Admin] "+a.getPlayer().getName()+ "§7 >> " + a.getMessage());

}

else if(a.getPlayer().hasPermission("supporter")) {

a.setFormat("§3§l[Supporter] "+a.getPlayer().getName()+ "§7 >> " + a.getMessage());

}

else if(a.getPlayer().hasPermission("builder")) {

a.setFormat("§2§l[Builder] "+a.getPlayer().getName()+ "§7 >> " + a.getMessage());

}

else if(a.getPlayer().hasPermission("premium")) {

a.setFormat("§l§6[Premium] "+a.getPlayer().getName()+ "§7 >> " + a.getMessage());

}

else if(a.getPlayer().hasPermission("user")) {

a.setFormat("§l§f[User] "+a.getPlayer().getName()+ "§7 >> " + a.getMessage());

}

}

}

Server, Computer, Minecraft, Mc, Minecraft Server, Plug-in
0 Antworten
minecraft geht nicht weshalb?

ich habe einen dell lapitude6400 mit win 7

---- Minecraft Crash Report ----

// You should try our sister game, Minceraft!

Time: 09.06.19 00:01

Description: Initializing game

java.lang.IllegalStateException: GLFW error 65542: WGL: The driver does not appear to support OpenGL

   at cud.b(SourceFile:195)

   at cud$$Lambda$1426/2022543673.invoke(Unknown Source)

   at org.lwjgl.glfw.GLFWErrorCallbackI.callback(GLFWErrorCallbackI.java:36)

   at org.lwjgl.system.JNI.invokePPPP(Native Method)

   at org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:1666)

   at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1847)

   at cud.<init>(SourceFile:86)

   at dkz.a(SourceFile:36)

   at cvk.au(SourceFile:465)

   at cvk.b(SourceFile:395)

   at net.minecraft.client.main.Main.main(SourceFile:154)

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

-- Head --

Thread: Client thread

Stacktrace:

   at cud.b(SourceFile:195)

   at cud$$Lambda$1426/2022543673.invoke(Unknown Source)

   at org.lwjgl.glfw.GLFWErrorCallbackI.callback(GLFWErrorCallbackI.java:36)

   at org.lwjgl.system.JNI.invokePPPP(Native Method)

   at org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:1666)

   at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1847)

   at cud.<init>(SourceFile:86)

   at dkz.a(SourceFile:36)

   at cvk.au(SourceFile:465)

-- Initialization --

Details:

Stacktrace:

   at cvk.b(SourceFile:395)

   at net.minecraft.client.main.Main.main(SourceFile:154)

-- System Details --

Details:

   Minecraft Version: 1.14.2

   Operating System: Windows 7 (amd64) version 6.1

   Java Version: 1.8.0_51, Oracle Corporation

   Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation

   Memory: 1171632560 bytes (1117 MB) / 1476395008 bytes (1408 MB) up to 2147483648 bytes (2048 MB)

   JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

   Launched Version: 1.14.2

   LWJGL: 3.2.1 build 12

   OpenGL: NO CONTEXT

   GL Caps:

   Using VBOs: Yes

   Is Modded: Probably not. Jar signature remains and client brand is untouched.

   Type: Client (map_client.txt)

   Resource Packs:

   Current Language: ~~ERROR~~ NullPointerException: null

   CPU: <unknown>

Computer, Mc
2 Antworten

Meistgelesene Fragen zum Thema Mc