Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Problem] Ze skriptem


Rekomendowane odpowiedzi

Opublikowano

Siemandero, mam problem z skriptem bo mam plugin na logowanie premium od Karolina_666, i jest mega bug w pluginie który nie pozwala na  dodawanie graczy do whitelist non-premium komendą (w skript)(premium nie ma żadnej whitelist).
Wiec pomozcie mi dodać te API do tego skriptu:
http://wklej.to/63maG
Ma to działać na zasadzie, że gracze premium nie mają whitelist a gracze non-premium muszą być dodawani żeby wejśc.
API do skript:
 

player (is|has) [not] premium
    player is [not] exception
    player has [not] enabledLogin
    player is [not] blacklisted
    player add to blacklisted
    player remove from blacklisted
    player add to enabledLogin
    player remove from enabledLogin
    player add to exceptions
    player remove from exceptions
    disable premium for player
    enable premium for player
    remove premium for player
Opublikowano
on join:
	if player is not premium:
		if {whitelist.list::*} doesn't contain player:
			kick player due to "Musisz byc na wl lub miec premium jesli chcesz wejsc"

Nie wiem czy dokladnie o to Ci chodzi, ale jesli dobrze zrozumialem powinno dzialac

Opublikowano
on join:
	if player is not premium:
		if {whitelist.list::*} doesn't contain player:
			kick player due to "Musisz byc na wl lub miec premium jesli chcesz wejsc"

Nie wiem czy dokladnie o to Ci chodzi, ale jesli dobrze zrozumialem powinno dzialac

 

Mam sam taki skript zrobić czy dodać to do tego kodu mojego?

Opublikowano

aaa juz rozumiem, wystarczy że zmienisz kilka ostatnich wersów a dokładnie to:

on connect:
	if {whitelist.on} is true:
		if player is not premium:
			if {whitelist.%player%.allow} is true:
				kick the player due to "%{kickmsg}%"
				stop
Opublikowano

 

aaa juz rozumiem, wystarczy że zmienisz kilka ostatnich wersów a dokładnie to:

on connect:
	if {whitelist.on} is true:
		if player is not premium:
			if {whitelist.%player%.allow} is true:
				kick the player due to "%{kickmsg}%"
				stop

Nie działa, whitelist jest włączonte to i tak wszyscy mogą wchodzić.

Opublikowano


on connect:

if {whitelist.on} is true:

if player is not premium:

if {whitelist.%player%.allow} is true:

kick the player due to "%{kickmsg}%"

stop

else:

if player is not premium:

if {whitelist.%player%.allow} is true:

kick the player due to "%{kickmsg}%"

stop

Opublikowano
on connect:
	if {whitelist.on} is true:
		if player is not premium:
			if {whitelist.%player%.allow} is true:
				kick the player due to "%{kickmsg}%"
				stop
	else:
		if player is not premium:
			if {whitelist.%player%.allow} is true:
				kick the player due to "%{kickmsg}%"
				stop

W konsoli:

 

[00:10:00 ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it,
[00:10:00 ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
[00:10:00 ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
[00:10:00 ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
[00:10:00 ERROR]: #!#!
[00:10:00 ERROR]: #!#! Stack trace:
[00:10:00 ERROR]: #!#! java.lang.NullPointerException
[00:10:00 ERROR]: #!#!     at com.gmail.bukkitsmerf.check.G.check(Unknown Source)
[00:10:00 ERROR]: #!#!     at ch.njol.skript.lang.Condition.run(Condition.java:58)
[00:10:00 ERROR]: #!#!     at ch.njol.skript.lang.Conditional.walk(Conditional.java:51)
[00:10:00 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91)
[00:10:00 ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)
[00:10:00 ERROR]: #!#!     at ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:149)
[00:10:00 ERROR]: #!#!     at ch.njol.skript.SkriptEventHandler$1.execute(SkriptEventHandler.java:109)
[00:10:00 ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[00:10:00 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
[00:10:00 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
[00:10:00 ERROR]: #!#!     at net.minecraft.server.v1_7_R3.PlayerList.attemptLogin(PlayerList.java:400)
[00:10:00 ERROR]: #!#!     at com.gmail.bukkitsmerf.check.A.c(Unknown Source)
[00:10:00 ERROR]: #!#!     at com.gmail.bukkitsmerf.check.A.a(Unknown Source)
[00:10:00 ERROR]: #!#!     at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:187)
[00:10:00 ERROR]: #!#!     at net.minecraft.server.v1_7_R3.ServerConnection.c(ServerConnection.java:81)
[00:10:00 ERROR]: #!#!     at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:720)
[00:10:00 ERROR]: #!#!     at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:283)
[00:10:00 ERROR]: #!#!     at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:583)
[00:10:00 ERROR]: #!#!     at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:489)
[00:10:00 ERROR]: #!#!     at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628)
[00:10:00 ERROR]: #!#!
[00:10:00 ERROR]: #!#! Version Information:
[00:10:00 ERROR]: #!#!   Skript: 2.1.2
[00:10:00 ERROR]: #!#!   Bukkit: 1.7.9-R0.3-SNAPSHOT
[00:10:00 ERROR]: #!#!   Minecraft: 1.7.9
[00:10:00 ERROR]: #!#!   Java: 1.7.0_07
[00:10:00 ERROR]: #!#!
[00:10:00 ERROR]: #!#! Running CraftBukkit: false
[00:10:00 ERROR]: #!#!
[00:10:00 ERROR]: #!#! Current node: null
[00:10:00 ERROR]: #!#! Current item: (is|has) premium
[00:10:00 ERROR]: #!#!
[00:10:00 ERROR]: #!#! Thread: Server thread
[00:10:00 ERROR]: #!#!
[00:10:00 ERROR]: #!#! End of Error.
[00:10:00 ERROR]: #!#!

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...