remove happyspeech from the project

This commit is contained in:
sirjonasxx 2020-04-24 14:51:23 +02:00
parent 59d8366104
commit 0e09ece9d6
3 changed files with 0 additions and 151 deletions

View File

@ -1,90 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>HappySpeech</artifactId>
<packaging>jar</packaging>
<version>0.0.1-beta</version>
<parent>
<groupId>G-Earth</groupId>
<artifactId>G-Earth-Parent</artifactId>
<version>1.0</version>
<relativePath>../../</relativePath>
</parent>
<build>
<resources>
<!-- Embedded FXML and CSS resources -->
<resource>
<filtering>false</filtering>
<directory>src/main/java</directory>
<includes>
<include>**/*.fxml</include>
<include>**/*.css</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
<outputDirectory>${project.build.directory}/bin</outputDirectory>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
<mainClass>extensions.happyspeech.HappySpeech</mainClass>
<useUniqueVersions>false</useUniqueVersions>
<classpathPrefix>lib/</classpathPrefix>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
<finalName>${project.artifactId}</finalName>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${project.build.directory}/bin</outputDirectory>
<archive>
<manifest>
<mainClass>extensions.happyspeech.HappySpeech</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.artifactId}</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>G-Earth</groupId>
<artifactId>G-Earth</artifactId>
<version>1.0</version>
<!--<scope>provided</scope>-->
</dependency>
</dependencies>
</project>

View File

@ -1,60 +0,0 @@
package extensions.happyspeech;
import gearth.extensions.Extension;
import gearth.extensions.ExtensionInfo;
import gearth.extensions.extra.harble.HashSupport;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import java.util.Random;
/**
* Created by Jonas on 24/06/18.
*/
/**
* This is an example extension and is not included in a G-Earth release
*/
@ExtensionInfo(
Title = "HappySpeech",
Description = "Example extension for hashSupport",
Version = "1.0",
Author = "sirjonasxx"
)
public class HappySpeech extends Extension {
public static void main(String[] args) {
new HappySpeech(args).run();
}
private HappySpeech(String[] args) {
super(args);
}
private static final String[] COLORS = {"red", "blue", "cyan", "green", "purple"};
private static final Random r = new Random();
private HashSupport hashSupport;
@Override
protected void initExtension() {
hashSupport = new HashSupport(this);
hashSupport.intercept(HMessage.Side.TOSERVER, "RoomUserShout", this::onSendMessage);
hashSupport.intercept(HMessage.Side.TOSERVER, "RoomUserTalk", this::onSendMessage);
}
private void onSendMessage(HMessage message) {
HPacket packet = message.getPacket();
String speechtext = packet.readString();
message.setBlocked(speechtext.equals("blocked"));
packet.replaceString(6, "@" + COLORS[r.nextInt(COLORS.length)] + "@" + speechtext + " :)");
}
@Override
protected void onClick() {
//{l}{u:1047}{i:0}{s:text}{i:0}{i:0}{i:0}{i:0}
hashSupport.sendToClient("RoomUserTalk", 0, "You clicked on this extension!", 0, 0, 0, 0);
}
}

View File

@ -19,7 +19,6 @@
<!-- Compile our extensions too please! -->
<module>Extensions/AdminOnConnect</module>
<module>Extensions/BlockReplacePackets</module>
<module>Extensions/HappySpeech</module>
</modules>
<build>