forked from EnigmaticaModpacks/Enigmatica2Expert
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): 📝Show message about wrong installation when either of two …
…mods is not installed
- Loading branch information
Showing
3 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#modloaded !mctsmelteryio | ||
#reloadable | ||
|
||
scripts._init.warn.wrong_installation.op.register(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#modloaded !netherendingores | ||
#reloadable | ||
|
||
scripts._init.warn.wrong_installation.op.register(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,29 @@ | ||
#modloaded !netherendingores !mctsmelteryio | ||
#priority 1 | ||
#reloadable | ||
|
||
import crafttweaker.player.IPlayer; | ||
|
||
static messageSended as bool[string] = {}; | ||
zenClass Op { | ||
zenConstructor(){} | ||
|
||
val messageSended as bool[string] = {}; | ||
val registered = false; | ||
|
||
events.onPlayerLoggedIn(function (e as crafttweaker.event.PlayerLoggedInEvent) { | ||
if (e.player.world.remote) return; | ||
function register() as void { | ||
if (registered) return; | ||
registered = true; | ||
|
||
if(!isNull(messageSended[e.player.uuid])) return; | ||
events.onPlayerLoggedIn(function (e as crafttweaker.event.PlayerLoggedInEvent) { | ||
if (e.player.world.remote) return; | ||
if(!isNull(this.messageSended[e.player.uuid])) return; | ||
|
||
e.player.world.catenation().sleep(20 * 20).then(function (world, ctx) { | ||
if(!isNull(messageSended[e.player.uuid])) return; | ||
e.player.sendRichTextMessage(crafttweaker.text.ITextComponent.fromTranslation('e2ee.warn.wrong_installation')); | ||
messageSended[e.player.uuid] = true; | ||
}).start(); | ||
}); | ||
e.player.world.catenation().sleep(20 * 20).then(function (world, ctx) { | ||
if(!isNull(this.messageSended[e.player.uuid])) return; | ||
e.player.sendRichTextMessage(crafttweaker.text.ITextComponent.fromTranslation('e2ee.warn.wrong_installation')); | ||
this.messageSended[e.player.uuid] = true; | ||
}).start(); | ||
}); | ||
} | ||
} | ||
|
||
static op as Op = Op(); |