Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
abf83f0
test: disable flaky broadcast test
Silthus Nov 22, 2021
acc92d7
tdd all the way
Silthus Dec 15, 2021
5ec8ce9
add join and leave channel and refactor
Silthus Dec 16, 2021
5851f6e
refactor & code
Silthus Dec 16, 2021
24e6a4a
add chatter use cases
Silthus Dec 16, 2021
716852f
divide api and impl
Silthus Dec 17, 2021
a3bf639
add channel use cases
Silthus Dec 18, 2021
0822959
create messenger and bukkit sender factory
Silthus Dec 19, 2021
1cfec30
make sender factory type independent
Silthus Dec 19, 2021
a191d4a
flesh out message
Silthus Dec 19, 2021
3520ec8
tdd
Silthus Dec 21, 2021
08852dc
add generic messenger strategy
Silthus Dec 22, 2021
49f3407
extract channel and chatter interfaces
Silthus Dec 23, 2021
e6afccd
add user handler
Silthus Dec 23, 2021
6c32a5e
add channel settings
Silthus Dec 24, 2021
ce316ad
add more setting tests
Silthus Dec 24, 2021
3281258
implement basic bukkit platform
Silthus Dec 28, 2021
0f01ac2
implement commands using cloud framework
Silthus Dec 30, 2021
166d67c
add chatter injector to commands
Silthus Dec 30, 2021
68dc8f9
cleanup and implement auto joined channels
Silthus Jan 1, 2022
cd0a6e8
split join channel and load use cases into own impl
Silthus Jan 3, 2022
910587c
refactor: remove setting alias
Silthus Jan 4, 2022
c831680
fix channel loading
Silthus Jan 4, 2022
ba94ff7
refactor: extract check into own class
Silthus Jan 4, 2022
65940f9
move join channel back to chatter
Silthus Jan 4, 2022
e71d8f7
flatten messenger and replace messages with repository
Silthus Jan 4, 2022
89c3e90
add option to get sender from chatter
Silthus Jan 4, 2022
b042958
add protocollib packet adapter
Silthus Jan 5, 2022
4f9953d
working basic SOLID version
Silthus Jan 5, 2022
4f84dfc
chore(deps): update protocollib to 4.8
Silthus Jan 6, 2022
e96635e
let message take an identity source
Silthus Jan 6, 2022
b0e4b1a
only display messages from active channel
Silthus Jan 6, 2022
5b2a63a
add custom channel example
Silthus Jan 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ working/*
!working/server.properties
/.idea/

src/**/plugin.yml
bukkit/src/**/plugin.yml

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@

* add icon to leave a conversation ([31db6dc](https://github.com/Silthus/sChat/commit/31db6dc47300f6061b25f87aeffec192a6fc68c7))
* initial beta release ([8cac128](https://github.com/Silthus/sChat/commit/8cac1281e9530898bcef3c799455f61d6942a91a))
* **view:** add unread message indicator to channels ([bf720d4](https://github.com/Silthus/sChat/commit/bf720d450184a7c6e51731fe2fbb6e31fba2adb4))
* **viewer:** add unread message indicator to channels ([bf720d4](https://github.com/Silthus/sChat/commit/bf720d450184a7c6e51731fe2fbb6e31fba2adb4))
27 changes: 16 additions & 11 deletions HEADER.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
sChat, a Supercharged Minecraft Chat Plugin
This file is part of sChat, licensed under the MIT License.
Copyright (C) Silthus <https://www.github.com/silthus>
Copyright (C) sChat team and contributors

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
696 changes: 22 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ can [download sChat][5] and drop it into the `plugins/` folder. Restart your ser
## Configuration

All configuration is done inside the `config.yml`. There will always be an
up-to-date [`config.default.yml`](src/main/resources/config.default.yml) which contains the latest config values and
up-to-date [`config.default.yml`](bukkit/src/main/resources/config.default.yml) which contains the latest config values and
default settings. Copy and adjust it to your needs.

You can run `/schat reload` to reload your configuration without restarting the server.
Expand Down
230 changes: 88 additions & 142 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,164 +25,110 @@ buildscript {
}

plugins {
id 'com.github.johnrengelman.shadow' version '7.1.0'
id 'kr.entree.spigradle' version '2.2.4'
id 'io.freefair.lombok' version '6.3.0'
id 'org.cadixdev.licenser' version '0.6.1'
id 'java'
id 'jacoco'
id 'idea'
id 'com.github.johnrengelman.shadow' version '7.1.0' apply false
id 'kr.entree.spigradle' version '2.2.4' apply false
id 'io.freefair.lombok' version '6.3.0' apply false
id 'org.cadixdev.licenser' version '0.6.1' apply false
}

apply from: "$rootDir/gradle/jacoco.gradle"
apply from: "$rootDir/gradle/publish.gradle"
allprojects {
apply plugin: 'checkstyle'

if (project.hasProperty("local_script")) {
apply from: file(local_script + "/build.local.gradle")
}
dependencies {
checkstyle("ca.stellardrift:stylecheck:0.1")
}

sourceCompatibility = 16
targetCompatibility = 16
checkstyle {
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
configProperties.checkstyleSuppressionsPath = rootProject.file('config/checkstyle/supressions.xml')
}

ext {
mcVersion = project.property("mcVersion")
tasks.withType(Checkstyle) {
exclude 'net/silthus/schat/common/**'
}
}

group project.property("group")

spigot {
name = project.property("pluginName")
authors = [project.property("author")]
apiVersion = project.property("apiVersion")
load = STARTUP
depends = ['ProtocolLib']
softDepends = ['Vault', 'PlaceholderAPI', 'WorldGuard']
permissions {
'schat.player' {
description 'Contains all basic player permissions for using sChat.'
defaults 'true'
children = [
'schat.player.channel': true,
'schat.player.channel.join': true,
'schat.player.channel.leave': true,
'schat.player.channel.quickmessage': true,
'schat.player.directmessage': true
]
}
'schat.admin' {
description 'Contains all admin permissions for sChat.'
defaults 'op'
children = [
'schat.admin.reload': true,
'schat.admin.broadcast': true,
'schat.message.select': true,
'schat.message.delete': true,
'schat.nickname.set': true,
'schat.nickname.set.blocked': true,
'schat.nickname.set.others': true,
]
}
subprojects {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'io.freefair.lombok'
apply plugin: 'org.cadixdev.licenser'
apply plugin: 'jacoco'
apply plugin: 'java-library'
apply plugin: 'java-test-fixtures'
apply plugin: 'idea'

apply from: "$rootDir/gradle/jacoco.gradle"
apply from: "$rootDir/gradle/publish.gradle"

if (project.hasProperty("local_script")) {
apply from: file(local_script + "/build.local.gradle")
}
}

compileJava {
options.encoding = 'UTF-8'
options.compilerArgs += ["-parameters"]
options.fork = true
options.forkOptions.executable = 'javac'
}
sourceCompatibility = 17
targetCompatibility = 17

archivesBaseName = project.property("pluginName")

repositories {
mavenLocal()
mavenCentral()
spigot()
maven { url = 'https://repo.aikar.co/content/groups/aikar/' }
maven { url = 'https://repo.dmulloy2.net/repository/public/' }
maven { url = 'https://jitpack.io' }
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
maven { url = 'https://maven.enginehub.org/repo/' }
}
archivesBaseName = project.property("pluginName")
group project.property("group")

dependencies {
implementation spigot(mcVersion)

implementation "co.aikar:acf-paper:0.5.0-SNAPSHOT"
implementation 'com.comphenix.protocol:ProtocolLib:4.7.0'

//
// Shaded Dependencies
//
// adventure-text: https://github.com/KyoriPowered/adventure
implementation "net.kyori:adventure-api:4.9.3"
implementation "net.kyori:adventure-platform-bukkit:4.0.0"
// implementation 'net.kyori:adventure-text-minimessage:4.2.0-SNAPSHOT'
// TODO: replace branch with official snapshot once this PR is merged: https://github.com/KyoriPowered/adventure-text-minimessage/pull/187
implementation 'com.github.KyoriPowered:adventure-text-minimessage:fix~recursively-resolve-string-placeholders-SNAPSHOT'
implementation 'net.kyori:adventure-text-serializer-plain:4.9.3'
// bStats: https://bstats.org/plugin/bukkit/sChat/13304
implementation 'org.bstats:bstats-bukkit:2.2.1'
// config-mapper: https://github.com/sVoxelDev/config-mapper
implementation 'net.silthus.config-mapper:bukkit:1.6.1'

//
// Optional Plugin Integrations
//
// PlaceholderAPI: https://github.com/PlaceholderAPI/PlaceholderAPI
implementation 'me.clip:placeholderapi:2.10.10'
// Vault: https://github.com/MilkBowl/VaultAPI
implementation "com.github.MilkBowl:VaultAPI:1.7.1"
// WorldGuard: https://github.com/EngineHub/WorldGuard
implementation 'com.sk89q.worldguard:worldguard-bukkit:7.0.6'

implementation 'org.jetbrains:annotations:22.0.0'

//Test dependencies
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testImplementation 'org.mockito:mockito-core:4.0.0'
testImplementation 'net.silthus:MockBukkit:v1.17-SNAPSHOT'
// testImplementation 'com.github.seeseemelk:MockBukkit-v1.17:1.10.3'
testImplementation 'org.assertj:assertj-core:3.21.0'
}
ext {
mcVersion = project.property("mcVersion")
}

shadowJar {
archiveClassifier.set("")
dependencies {
include(dependency('co.aikar::'))
include(dependency('net.kyori::'))
include(dependency('com.github.KyoriPowered::'))
include(dependency('org.bstats::'))
include(dependency('net.silthus.config-mapper::'))
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs += ["-parameters"]
options.fork = true
options.forkOptions.executable = 'javac'
}
relocate 'co.aikar.commands', "${packageName}.acf"
relocate 'co.aikar.locales', "${packageName}.locales"
relocate 'net.kyori', "${packageName}.text"
relocate 'org.bstats', "${packageName}.bstats"
relocate 'net.silthus.configmapper', "${packageName}.configmapper"
}

tasks.build.dependsOn(shadowJar)
tasks.publish.dependsOn(shadowJar)
tasks.prepareSpigotPlugins.dependsOn(shadowJar)
repositories {
mavenLocal()
mavenCentral()
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url = 'https://repo.aikar.co/content/groups/aikar/' }
maven { url = 'https://repo.dmulloy2.net/repository/public/' }
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
maven { url = 'https://maven.enginehub.org/repo/' }
maven { url = 'https://storehouse.okaeri.eu/repository/maven-public/' }
maven { url = 'https://jitpack.io' }
}

dependencies {
api 'net.kyori:adventure-api:4.10.0-SNAPSHOT'

implementation 'net.kyori:adventure-text-minimessage:4.2.0-SNAPSHOT'
implementation 'net.kyori:adventure-text-serializer-plain:4.9.3'
implementation 'net.kyori:event-api:3.0.0'

implementation 'org.jetbrains:annotations:22.0.0'

// Test dependencies
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testImplementation 'org.mockito:mockito-core:4.0.0'
testImplementation 'org.assertj:assertj-core:3.21.0'

test {
useJUnitPlatform()
testLogging {
events "skipped", "failed"
testFixturesImplementation 'net.kyori:adventure-text-serializer-plain:4.9.3'
}
ignoreFailures = false
}

processResources {
project.properties.put("version", this.version)
expand project.properties
}
test {
useJUnitPlatform()
testLogging {
events "skipped", "failed"
}
ignoreFailures = false
}

license {
header = project.file('HEADER.txt')
include '**/*.java'
}
processResources {
project.properties.put("version", this.version)
expand project.properties
}

license {
header = rootProject.file("HEADER.txt")
include '**/*.java'
newLine = true
}

defaultTasks 'build'
defaultTasks 'licenseFormat', 'build'
}
Loading